public class SinkUnisensLogger extends AbstractSink
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_COMMENT
You can store a free comment for this entry.
|
static java.lang.String |
CONFIG_CONTENT_CLASS
This is the content class of the incoming data.
|
static java.lang.String |
CONFIG_ENTRY_ID
Specify the entryId without file extensions.
|
static java.lang.String |
CONFIG_EVENT_COMMENT_LENGTH
If you want to overwrite the default length of the comment string for
events of 10, you'll can set a new comment length.
|
static java.lang.String |
CONFIG_EVENT_TYPE_LENGTH
If you want to overwrite the default length of the type string for events
of 1, you'll can set a new type length.
|
static java.lang.String |
CONFIG_FILE_FORMAT
Choose a file format for the data.
|
static java.lang.String |
CONFIG_LOGGING_PATH
This is the path where the Unisens data set will be created.
|
static java.lang.String |
CONFIG_NUMBER_OF_CHANNELS
Specify the number of input channels for any multichannel logging.
|
static java.lang.String |
CONFIG_SAMPLE_RATE
This is the sample rate of the incoming data.
|
static java.lang.String |
CONFIG_SENSOR_ID
You can store a sensor ID (e.g.
|
static java.lang.String |
FILE_FORMAT_BIN
Binary file format for data file.
|
static java.lang.String |
FILE_FORMAT_CSV
CSV file format for data file.
|
static java.lang.String |
FILE_FORMAT_XML
XML file format for data file.
|
Constructor and Description |
---|
SinkUnisensLogger(LifeCycleManager manager,
java.util.HashMap<java.lang.String,java.lang.String> configuration)
Create new
SinkUnisensLogger |
Modifier and Type | Method and Description |
---|---|
protected void |
configure()
Performs custom configuration-tasks (e.g. creating connections to
databases, etc.).
|
DataDescription[] |
getInputDescription()
Returns a
DataDescription describing the data, the Sink is able
to process. |
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 |
processData(DataEntry entry)
Passes a
DataEntry to the AbstractSink , which needs to be
processed. |
protected void |
stop()
Performs custom stopping-tasks (e.g. releasing connections etc).
|
protected void |
train()
Indicates that the System is now in
State.TRAINING . |
getDescriptionsForIncomingData, getSinkConnector, initConnector, receiveData, stopComponent, stopReceiving
configureComponent, disableMeasuring, enableMeasuring, getLifeCycleManager, getState, isReadyToMeasure, measureComponent, trainComponent
public static final java.lang.String CONFIG_CONTENT_CLASS
public static final java.lang.String CONFIG_SAMPLE_RATE
public static final java.lang.String CONFIG_LOGGING_PATH
public static final java.lang.String CONFIG_SENSOR_ID
public static final java.lang.String CONFIG_ENTRY_ID
public static final java.lang.String CONFIG_COMMENT
public static final java.lang.String CONFIG_FILE_FORMAT
public static final java.lang.String FILE_FORMAT_CSV
public static final java.lang.String FILE_FORMAT_BIN
public static final java.lang.String FILE_FORMAT_XML
public static final java.lang.String CONFIG_NUMBER_OF_CHANNELS
public static final java.lang.String CONFIG_EVENT_TYPE_LENGTH
public static final java.lang.String CONFIG_EVENT_COMMENT_LENGTH
public SinkUnisensLogger(LifeCycleManager manager, java.util.HashMap<java.lang.String,java.lang.String> configuration) throws InstantiationException
SinkUnisensLogger
manager
- LifeCycleManager
to register to.configuration
- HashMap
containing configuration.InstantiationException
- if configuration is invalid.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
public DataDescription[] getInputDescription()
Sink
DataDescription
describing the data, the Sink
is able
to process.DataDescription
describing the data, the Sink
is able to
process.protected void processData(DataEntry entry)
AbstractSink
DataEntry
to the AbstractSink
, which needs to be
processed.processData
in class AbstractSink
entry
- DataEntry
to be processed.