eLabSDK.Experiment.Section.Sample Class
Class that extends the Experiment.Section class for adding sample sections
Constructor
eLabSDK.Experiment.Section.Sample
(
-
object
Parameters:
-
object
Object-
sectionID
Int -
type
eLabSDK.Experiment.Section.SECTIONTYPE(SAMPLESIN or SAMPLESOUT)
-
Item Index
Properties
Events
Methods
addSamples
(
-
sampleIDs
Add Samples to the section
Parameters:
-
sampleIDs
Array
addSection
(
-
configObject
-
onCreated
Adds a section to this experiment
Parameters:
-
configObject
Obj-
header
String- Section Header Text
-
type
eLabSDK.Experiment.Section.SECTIONTYPE- Section Type
-
-
onCreated
Function
getExperimentID
()
Int
Returns:
Int:
experimentID
getMeta
()
Returns:
metadata of section
getSection
(
eLabSDK.Experiment.Section
-
sectionID
Gets the section object by ID
Parameters:
-
sectionID
Type
Returns:
eLabSDK.Experiment.Section:
section or null of it doest not exist
getStudyID
()
Int
Returns:
Int:
studyID
Properties
object.type
eLabSDK.Experiment.Section.SECTIONTYPE
sections
Array
Array of eLabSDK.Experiment.Section
Sections of experiment
Events
onCreated
Use
this
to access class
Example:
var ev = experimentObject.onCreated(function () {
alert('Experiment created');
});
onLoaded
Use
this
to access class
Example:
var ev = experimentObject.onLoaded(function () {
alert('Experiment onLoaded');
});
onSampleAdded
Event Payload:
-
object
eLabSDK.Experiment.ContentUpdater.Sample
Example:
var sampleSection = experiment.sections[0];
sampleSection.onSampleAdded(function(){
alert('samples are added!');
});
sampleSection.addSamples([1234]);