public class SourceEcgGenerator extends AbstractSource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_CONTENT_CLASS_ECG
Specifies the content class for ECG output.
|
static java.lang.String |
CONFIG_CONTENT_CLASS_HR
Specifies the content class for heart rate output.
|
static java.lang.String |
CONFIG_PRODUCE_ECG
Enable ECG output by setting any string to this key.
|
static java.lang.String |
CONFIG_PRODUCE_HR
Enable heart rate output by setting any string to this key.
|
Constructor and Description |
---|
SourceEcgGenerator(LifeCycleManager manager,
java.util.HashMap<java.lang.String,java.lang.String> configuration)
Create new
SourceEcgGenerator |
Modifier and Type | Method and Description |
---|---|
protected void |
configure()
Performs custom configuration-tasks (e.g. creating connections to
databases, etc.).
|
DataDescription[] |
getOutputDescription()
Returns a
DataDescription describing the data, the Source provides. |
protected void |
measure()
Called to indicate the component to start measuring, that is sending,
respectively processing data, that is valid for the studie's results.
|
protected void |
stop()
Performs custom stopping-tasks (e.g. releasing connections etc).
|
protected void |
train()
Indicates that the System is now in
State.TRAINING . |
getSourceConnector, initConnector, writeOutput
configureComponent, disableMeasuring, enableMeasuring, getLifeCycleManager, getState, isReadyToMeasure, measureComponent, stopComponent, trainComponent
public static final java.lang.String CONFIG_CONTENT_CLASS_ECG
public static final java.lang.String CONFIG_CONTENT_CLASS_HR
public static final java.lang.String CONFIG_PRODUCE_ECG
public static final java.lang.String CONFIG_PRODUCE_HR
public SourceEcgGenerator(LifeCycleManager manager, java.util.HashMap<java.lang.String,java.lang.String> configuration) throws InstantiationException
SourceEcgGenerator
manager
- LifeCycleManager
to register to.configuration
- HashMap
containing configuration.InstantiationException
- if configuration is invalid.public DataDescription[] getOutputDescription()
Source
DataDescription
describing the data, the Source
provides.DataDescription
describing the data, the Source
provides.protected void configure()
SystemComponent
State.CONFIG
.configure
in class SystemComponent
protected void train()
SystemComponent
State.TRAINING
.SystemComponent
s are supposed to start producing data as soon as
they enter this state, for a lot of data is timed relative to the entry
of State.TRAINING
. The produced data does not have to be valid,
though it should be reasonable to enable SystemComponent
s
following in the dispatching-chain to train themselves to the form of
incoming data.train
in class SystemComponent
protected void measure()
SystemComponent
State.MEASURING
, which follows the
State.TRAINING
.measure
in class SystemComponent
protected void stop()
SystemComponent
SystemComponent
's
life-cycle.stop
in class SystemComponent