public class ProcessorSlidingMean extends AbstractProcessor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_CONTENT_CLASS_INPUT
Specifies the content class for the input signal.
|
static java.lang.String |
CONFIG_CONTENT_CLASS_OUTPUT
Specifies the content class for the output signal.
|
static java.lang.String |
CONFIG_NUMBER_OF_CHANNELS
Defines the number of channels of the incoming and outgoing signal.
|
static java.lang.String |
CONFIG_SAMPLE_RATE
Defines the sample rate of the incoming and outgoing signal.
|
static java.lang.String |
CONFIG_WINDOW_WIDTH
Defines the number of samples for the window that calculates the mean
value.
|
Constructor and Description |
---|
ProcessorSlidingMean(LifeCycleManager manager,
java.util.HashMap<java.lang.String,java.lang.String> configuration)
Create new
ProcessorSlidingMean |
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. |
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 |
processData(DataEntry entry)
Passes a
DataEntry to the AbstractProcessor 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, getSourceConnector, initConnector, receiveData, stopComponent, stopReceiving
configureComponent, disableMeasuring, enableMeasuring, getLifeCycleManager, getState, isReadyToMeasure, measureComponent, trainComponent
public static final java.lang.String CONFIG_WINDOW_WIDTH
public static final java.lang.String CONFIG_CONTENT_CLASS_INPUT
public static final java.lang.String CONFIG_CONTENT_CLASS_OUTPUT
public static final java.lang.String CONFIG_SAMPLE_RATE
public static final java.lang.String CONFIG_NUMBER_OF_CHANNELS
public ProcessorSlidingMean(LifeCycleManager manager, java.util.HashMap<java.lang.String,java.lang.String> configuration) throws InstantiationException
ProcessorSlidingMean
manager
- LifeCycleManager
to register to.configuration
- HashMap
containing configuration.InstantiationException
- if configuration is invalid.protected void configure()
SystemComponent
State.CONFIG
.configure
in class SystemComponent
public DataDescription[] getOutputDescription()
Source
DataDescription
describing the data, the Source
provides.DataDescription
describing the data, the Source
provides.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 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
protected void processData(DataEntry entry)
AbstractProcessor
DataEntry
to the AbstractProcessor
which needs
to be processed.processData
in class AbstractProcessor