|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.history.SampleCollector
public class SampleCollector
Sample collector reads values from a datasource, samples them and adds to a RecordingSession. Recording Session is a history storage format. http://dev.simantics.org/index.php/Databoard_Specification#History_Contract There is a contract for the structure of data sources. http://dev.simantics.org/index.php/Databoard_Specification#Datasource_Contract Sample Collection Steps: 1. Initialize Datasource and have it in paused state 2. Initialize Sample Collector with Subscription Parameters a. Verify subsribed variables b. Initialize variables in history, add variable specific Recording-structures c. Read initial values from Datasource 3. Start Sampling a. Initialize new Segment to each Recording b. Write initial values to History c. Add listener to Datasource d. Start Datasource e. Convert incoming events them into samples 4. Stop Sampling a. Stop Datasource b. Remove listener from Datasource c. Finalize each Segment. Write last known values todo how to deliver errors during sampling to the user, log them? collect them?
Constructor Summary | |
---|---|
SampleCollector(Accessor datasource,
Accessor recordingSession)
Create sample collector |
Method Summary | |
---|---|
void |
init(SamplingConfiguration configuration)
Initialize sample collector with the given subscription parameters. |
void |
start()
Start sampling process. |
void |
stop()
Stop collecting samples. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SampleCollector(Accessor datasource, Accessor recordingSession) throws AccessorConstructionException
datasource
- recordingSession
-
AccessorConstructionException
Method Detail |
---|
public void init(SamplingConfiguration configuration) throws SamplingException
The datasource must be initialized but paused. Variable initial values must be available.
configuration
- subscription confifguration
SamplingException
public void start() throws SamplingException
SamplingException
public void stop() throws SamplingException
SamplingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |