public interface RouteComponent
Modifier and Type | Interface and Description |
---|---|
static class |
RouteComponent.AccountType
Types of information the accounter processor can append to the data
|
static interface |
RouteComponent.Action
Similar to a
CodeBlock except this interface is specifically for
data producers |
Modifier and Type | Method and Description |
---|---|
RouteComponent |
account()
Variant of
account(AccountType) that defaults to recalculating timestamps |
RouteComponent |
account(RouteComponent.AccountType type)
Add additional information to the payload to assist in checking if streamed data is lost
|
RouteComponent |
accumulate()
Accumulates a running sum of all data samples passing through this component and outputs the current tally
|
RouteComponent |
average(byte nSamples)
Deprecated.
Renamed to
lowpass in SDK v3.1 |
RouteComponent |
buffer()
Stores the input data in memory.
|
RouteComponent |
count()
Counts the number of data samples that have passed through this component and outputs the current count
|
RouteComponent |
delay(byte samples)
Stops data from leaving until at least N samples have been collected.
|
RouteComponent |
end()
Signifies the end of a split or multicast route.
|
RouteComponent |
filter(Comparison op,
ComparisonOutput output,
java.lang.Number... references)
Variant of
filter(Comparison, Number...) where the filter can output values providing
additional details about the comparison. |
RouteComponent |
filter(Comparison op,
ComparisonOutput output,
java.lang.String... dataNames)
Variant of
filter(Comparison, ComparisonOutput, Number...) where reference values are outputs
from other sensors or processors. |
RouteComponent |
filter(Comparison op,
java.lang.Number... references)
Remove data from the route that does not satisfy the comparison
|
RouteComponent |
filter(Comparison op,
java.lang.String... dataNames)
Variant of the
filter(Comparison, Number...) function where the reference values are outputs
from other sensors or processors |
RouteComponent |
filter(DifferentialOutput output,
java.lang.Number distance)
Removes data that it is not a minimum distance away from a reference value.
|
RouteComponent |
filter(ThresholdOutput output,
java.lang.Number threshold)
Remove data from the route that doesn't not cross the threshold
|
RouteComponent |
filter(ThresholdOutput output,
java.lang.Number threshold,
java.lang.Number hysteresis)
Variant of
filter(ThresholdOutput, Number) with a configurable hysteresis value for data
that frequently oscillates around the threshold boundary |
RouteComponent |
find(PulseOutput output,
java.lang.Number threshold,
short samples)
Scans the input data for a pulse.
|
RouteComponent |
fuse(java.lang.String... bufferNames)
Combines data from multiple sources into 1 packet.
|
RouteComponent |
highpass(byte nSamples)
Applies a high pass filter over the input data, available in firmware v1.3.4 and later
|
RouteComponent |
index(int i)
Gets a specific component value from the split data value
|
RouteComponent |
limit(int period)
Reduce the amount of data allowed through such that the output data rate matches the delay
|
RouteComponent |
limit(Passthrough type,
short value)
Only allow data through under certain user controlled conditions
|
RouteComponent |
log(Subscriber subscriber)
Records the input data to the on-board logger, retrieved when a log download is started
|
RouteComponent |
lowpass(byte nSamples)
Applies a low pass filter over the input data.
|
RouteComponent |
map(Function1 fn)
Apply a 1 input function to all of the input data
|
RouteComponent |
map(Function2 fn,
java.lang.Number rhs)
Apply a 2 input function to all of the input data
|
RouteComponent |
map(Function2 fn,
java.lang.String... dataNames)
Variant of
map(Function2, Number) where the rhs value is the output of another
sensor or processor |
RouteMulticast |
multicast()
Splits the route directing the input data to different end points
|
RouteComponent |
name(java.lang.String name)
Assigns a user-defined name identifying the data processor.
|
RouteComponent |
pack(byte count)
Packs multiple input values into 1 BTLE packet.
|
RouteComponent |
react(RouteComponent.Action action)
Programs the board to react in response to data being created by the most resent sensor or processor
|
RouteSplit |
split()
Separates multi=component data into its individual values
|
RouteComponent |
stream(Subscriber subscriber)
Streams the input data to the local device
|
RouteComponent |
to()
Signals the creation of a new multicast branch
|
RouteMulticast multicast()
RouteComponent to()
RouteSplit split()
RouteComponent index(int i)
i
- Position in the split values array to returnRouteComponent end()
RouteComponent name(java.lang.String name)
name
- Value to name the most recent data processorDataProcessor.edit(String, Class)
,
DataProcessor.state(String)
RouteComponent stream(Subscriber subscriber)
subscriber
- Subscriber to handle the received dataRouteComponent log(Subscriber subscriber)
subscriber
- Subscriber to handle the received dataRouteComponent react(RouteComponent.Action action)
action
- On-board action to executeRouteComponent buffer()
RouteComponent fuse(java.lang.String... bufferNames)
bufferNames
- Named buffer components holding the extra data to combineRouteComponent count()
RouteComponent accumulate()
RouteComponent highpass(byte nSamples)
nSamples
- Number of previous data samples to compare againstRouteComponent lowpass(byte nSamples)
nSamples
- Number of previous data samples to compare against@Deprecated RouteComponent average(byte nSamples)
lowpass
in SDK v3.1nSamples
- Number of samples to average overRouteComponent delay(byte samples)
samples
- Number of samples to collectRouteComponent map(Function1 fn)
fn
- Function to useRouteComponent map(Function2 fn, java.lang.Number rhs)
fn
- Function to userhs
- Second input for the functionRouteComponent map(Function2 fn, java.lang.String... dataNames)
map(Function2, Number)
where the rhs value is the output of another
sensor or processorfn
- Function to apply to the input datadataNames
- Keys identifying which sensor or processor data to feed into the mapperRouteComponent limit(int period)
period
- How often to allow data through, in milliseconds (ms)RouteComponent limit(Passthrough type, short value)
type
- Passthrough operation typevalue
- Initial value to set the passthrough limiter toRouteComponent find(PulseOutput output, java.lang.Number threshold, short samples)
output
- Type of summary data to outputthreshold
- Value the sensor data must exceed for a valid pulsesamples
- Minimum number of samples that must be above the threshold for a valid pulseRouteComponent filter(Comparison op, java.lang.Number... references)
op
- Comparison operation to performreferences
- Reference values to compare against, can be multiple values if the board
is on firmware v1.2.3 or laterRouteComponent filter(Comparison op, java.lang.String... dataNames)
filter(Comparison, Number...)
function where the reference values are outputs
from other sensors or processorsop
- Comparison operation to performdataNames
- Names identifying which sensor or processor data to use as the reference value when
new values are producedRouteComponent filter(Comparison op, ComparisonOutput output, java.lang.Number... references)
filter(Comparison, Number...)
where the filter can output values providing
additional details about the comparison. This variant component is only supported starting with
firmware v1.2.5. Note that if ComparisonOutput.PASS_FAIL
or ComparisonOutput.ZONE
is used, component will instead function as a map
component.op
- Comparison operation to perform.output
- Output type the filter should producereferences
- Reference values to compare against, can be multiple values if the board
is on firmware v1.2.3 or laterRouteComponent filter(Comparison op, ComparisonOutput output, java.lang.String... dataNames)
filter(Comparison, ComparisonOutput, Number...)
where reference values are outputs
from other sensors or processors.op
- Comparison operation to performoutput
- Output type of the filterdataNames
- Names identifying which sensor or processor data to use as the reference value when
new values are producedRouteComponent filter(ThresholdOutput output, java.lang.Number threshold)
output
- Type of output the filter will producethreshold
- Threshold boundary the data must crossRouteComponent filter(ThresholdOutput output, java.lang.Number threshold, java.lang.Number hysteresis)
filter(ThresholdOutput, Number)
with a configurable hysteresis value for data
that frequently oscillates around the threshold boundaryoutput
- Type of output the filter will producethreshold
- Threshold boundary the data must crosshysteresis
- Minimum distance between the boundary and value that indicates a successful crossingRouteComponent filter(DifferentialOutput output, java.lang.Number distance)
output
- Type of output the filter will producedistance
- Minimum distance from the reference valueRouteComponent pack(byte count)
count
- Number of input values to packRouteComponent account()
account(AccountType)
that defaults to recalculating timestampsRouteComponent account(RouteComponent.AccountType type)
type
- Type of information to append to the data<