MetaWear C# SDK
1.2.0
C# API for MbientLab's sensor platform
|
Component in a route definition More...
Public Member Functions | |
IRouteMulticast | Multicast () |
Creates a branch in the route that direct the input data to different end points More... | |
IRouteComponent | To () |
Signals the creation of a new multicast branch More... | |
IRouteSplit | Split () |
Separates multi-component data into its individual values More... | |
IRouteComponent | Index (int i) |
Gets a specific component value from the split data value More... | |
IRouteComponent | Stream (Action< IData > handler) |
Streams the input data to the local device. This component is represented by the ISubscriber interface. More... | |
IRouteComponent | Stream () |
Variant of Stream(Action<IData>) that enables a data stream but does not yet assign a data handler. The handler can be later attached with ISubscriber.Attach(Action<IData>) More... | |
IRouteComponent | Log (Action< IData > handler) |
Records the input data to the on-board logger, retrieved later when a log download is started. This component is represented by the ISubscriber interface. More... | |
IRouteComponent | Log () |
Variant of Log(Action<IData>) that sets up the logger but does not yet assign a data handler. The handler can be later attached with ISubscriber.Attach(Action<IData>) More... | |
IRouteComponent | React (Action< IDataToken > action) |
Programs the board to react in response to data being created by the most resent sensor or processor More... | |
IRouteComponent | Name (string name) |
Assigns a user-defined name identifying a processor, producer, or subscriber. The name can be used to create feedback and feedforward loops, or refere to subscribers by name rather than index. More... | |
IRouteComponent | Accumulate () |
Accumulates a running sum of all data samples passing through this component and outputs the current tally More... | |
IRouteComponent | Count () |
Counts the number of data samples that have passed through this component and outputs the current count More... | |
IRouteBranchEnd | Buffer () |
Stores the input data in memory which can be extracted by reading the buffer state. As this buffer does not have an output, the route cannot continue so it must either end or control is passed back to the most recent split or multicast More... | |
IRouteComponent | Delay (byte samples) |
Stops data from passing until at least N samples have been collected. More... | |
IRouteComponent | Average (byte samples) |
Computes a moving average over the previous N samples. This component will not output data until the first average i.e. until N samples have been received. More... | |
IRouteComponent | HighPass (byte samples) |
Applies a high pass filter over the input data, available on firmware v1.3.4 and later. More... | |
IRouteComponent | LowPass (byte samples) |
Applies a low pass filter over the input data, available on firmware v1.3.4 and later. More... | |
IRouteComponent | Filter (Comparison op, params float[] references) |
Remove data from the route that does not satisfy the comparison More... | |
IRouteComponent | Filter (Comparison op, ComparisonOutput output, params float[] references) |
Variant of Filter(Comparison, float[]) where the filter output provides additional details about the comparison. This variant component is only supported starting with firmware v1.2.5. Note that if ComparisonOutput.Reference or ComparisonOutput.Zone is used, component will instead function as a More... | |
IRouteComponent | Filter (Comparison op, params string[] names) |
Variant of the Filter(Comparison, float[]) function where the reference values are outputs from other sensors or processors More... | |
IRouteComponent | Filter (Comparison op, ComparisonOutput output, params string[] names) |
Variant of Filter(Comparison, ComparisonOutput, float[]) where reference values are outputs from other sensors or processors. More... | |
IRouteComponent | Find (Pulse pulse, float threshold, ushort samples) |
Scans the input data for a pulse. When one is detected, output a summary of the scanned data More... | |
IRouteComponent | Find (Threshold threshold, float boundary) |
Scans the input data for values that cross a boundary, either falling below or rising above More... | |
IRouteComponent | Find (Threshold threshold, float boundary, float hysteresis) |
Variant of Find(Threshold, float) with a configurable hysteresis value for data that frequently oscillates around the threshold boundary More... | |
IRouteComponent | Find (Differential differential, float distance) |
Scans the input data for sequential data that is a minimum distance away More... | |
IRouteComponent | Limit (Passthrough type, ushort value) |
Only allow data through under certain user controlled conditions More... | |
IRouteComponent | Limit (uint period) |
Reduce the amount of data allowed through such that the output data rate matches the delay More... | |
IRouteComponent | Map (Function1 fn) |
Apply a 1 input function to all of the input data More... | |
IRouteComponent | Map (Function2 fn, float rhs) |
Apply a 2 input function to all of the input data More... | |
IRouteComponent | Map (Function2 fn, params string[] names) |
Variant of Map(Function2, float) where the rhs value is the output of another data producer More... | |
IRouteComponent | Account () |
Variant of Account(AccountType) that defaults to recalculating timestamps More... | |
IRouteComponent | Account (AccountType type) |
Add additional information to the payload to assist in checking if streamed data is lost More... | |
IRouteComponent | Pack (byte count) |
Packs multiple input values into 1 BTLE packet. Used to reduce the number of packets broadcasted over the link. More... | |
IRouteComponent | Fuse (params string[] bufferNames) |
Combines data from multiple sources into 1 packet, available on firmware v1.4.4+. The additional data you want to combine must first be stored into a named buffer. More... | |
Component in a route definition
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Account | ( | ) |
Variant of Account(AccountType) that defaults to recalculating timestamps
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Account | ( | AccountType | type | ) |
Add additional information to the payload to assist in checking if streamed data is lost
type | Type of information to append to the data |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Accumulate | ( | ) |
Accumulates a running sum of all data samples passing through this component and outputs the current tally
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Average | ( | byte | samples | ) |
Computes a moving average over the previous N samples. This component will not output data until the first average i.e. until N samples have been received.
samples | Number of samples to average over |
IRouteBranchEnd MbientLab.MetaWear.Builder.IRouteComponent.Buffer | ( | ) |
Stores the input data in memory which can be extracted by reading the buffer state. As this buffer does not have an output, the route cannot continue so it must either end or control is passed back to the most recent split or multicast
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Count | ( | ) |
Counts the number of data samples that have passed through this component and outputs the current count
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Delay | ( | byte | samples | ) |
Stops data from passing until at least N samples have been collected.
samples | Number of samples to collect |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Filter | ( | Comparison | op, |
params float [] | references | ||
) |
Remove data from the route that does not satisfy the comparison
op | Comparison operation to perform |
references | Reference values to compare against, can be multiple values if the board is on firmware v1.2.3 or later |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Filter | ( | Comparison | op, |
ComparisonOutput | output, | ||
params float [] | references | ||
) |
Variant of Filter(Comparison, float[]) where the filter output provides additional details about the comparison. This variant component is only supported starting with firmware v1.2.5. Note that if ComparisonOutput.Reference or ComparisonOutput.Zone is used, component will instead function as a
map
op | Comparison operation to perform |
output | Output type the filter should produce |
references | Reference values to compare against, can be multiple values if the board is on firmware v1.2.3 or later |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Filter | ( | Comparison | op, |
params string [] | names | ||
) |
Variant of the Filter(Comparison, float[]) function where the reference values are outputs from other sensors or processors
op | Comparison operation to perform |
names | Names identifying which sensor or processor data to use as the reference value when new values are produced |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Filter | ( | Comparison | op, |
ComparisonOutput | output, | ||
params string [] | names | ||
) |
Variant of Filter(Comparison, ComparisonOutput, float[]) where reference values are outputs from other sensors or processors.
op | Comparison operation to perform |
output | Output type of the filter |
names | Names identifying which sensor or processor data to use as the reference value when new values are produced |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Find | ( | Pulse | pulse, |
float | threshold, | ||
ushort | samples | ||
) |
Scans the input data for a pulse. When one is detected, output a summary of the scanned data
pulse | Type of summary data to output |
threshold | Value the sensor data must exceed for a valid pulse |
samples | Minimum number of samples that must be above the threshold for a valid pulse |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Find | ( | Threshold | threshold, |
float | boundary | ||
) |
Scans the input data for values that cross a boundary, either falling below or rising above
threshold | Type of summary data to output |
boundary | Threshold boundary the data must cross |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Find | ( | Threshold | threshold, |
float | boundary, | ||
float | hysteresis | ||
) |
Variant of Find(Threshold, float) with a configurable hysteresis value for data that frequently oscillates around the threshold boundary
threshold | Type of summary data to output |
boundary | Threshold boundary the data must cross |
hysteresis | Minimum distance between the boundary and value that indicates a successful crossing |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Find | ( | Differential | differential, |
float | distance | ||
) |
Scans the input data for sequential data that is a minimum distance away
differential | |
distance |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Fuse | ( | params string [] | bufferNames | ) |
Combines data from multiple sources into 1 packet, available on firmware v1.4.4+.
The additional data you want to combine must first be stored into a named buffer.
bufferNames | Named buffer components holding the extra data to combine |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.HighPass | ( | byte | samples | ) |
Applies a high pass filter over the input data, available on firmware v1.3.4 and later.
samples | Number of previous data samples to compare against |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Index | ( | int | i | ) |
Gets a specific component value from the split data value
i | Position in the split values array to return |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Limit | ( | Passthrough | type, |
ushort | value | ||
) |
Only allow data through under certain user controlled conditions
type | Passthrough operation type |
value | Initial value to set the passthrough limiter to |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Limit | ( | uint | period | ) |
Reduce the amount of data allowed through such that the output data rate matches the delay
period | How often to allow data through, in milliseconds (ms) |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Log | ( | Action< IData > | handler | ) |
Records the input data to the on-board logger, retrieved later when a log download is started. This component is represented by the ISubscriber interface.
handler | Handler to process the received data |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Log | ( | ) |
Variant of Log(Action<IData>) that sets up the logger but does not yet assign a data handler.
The handler can be later attached with ISubscriber.Attach(Action<IData>)
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.LowPass | ( | byte | samples | ) |
Applies a low pass filter over the input data, available on firmware v1.3.4 and later.
This componenet replaces the Average(byte) component.
samples | Number of previous data samples to compare against |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Map | ( | Function1 | fn | ) |
Apply a 1 input function to all of the input data
fn | Function to use |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Map | ( | Function2 | fn, |
float | rhs | ||
) |
Apply a 2 input function to all of the input data
fn | Function to use |
rhs | Second operand for the function |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Map | ( | Function2 | fn, |
params string [] | names | ||
) |
Variant of Map(Function2, float) where the rhs value is the output of another data producer
fn | Function to apply to the input data |
names | Names identifying which producer to feed into the mapper |
IRouteMulticast MbientLab.MetaWear.Builder.IRouteComponent.Multicast | ( | ) |
Creates a branch in the route that direct the input data to different end points
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Name | ( | string | name | ) |
Assigns a user-defined name identifying a processor, producer, or subscriber. The name can be used to create feedback and feedforward loops, or refere to subscribers by name rather than index.
Processors and subscribers are retrieved by name with the IDataProcessor interface and IRoute.LookupSubscriber(string) method respectively.
name | Assigned unique name to the most recent data producer (sensor or data processor) |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Pack | ( | byte | count | ) |
Packs multiple input values into 1 BTLE packet. Used to reduce the number of packets broadcasted over the link.
count | Number of input values to pack |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.React | ( | Action< IDataToken > | action | ) |
Programs the board to react in response to data being created by the most resent sensor or processor
action | On-board action to execute |
IRouteSplit MbientLab.MetaWear.Builder.IRouteComponent.Split | ( | ) |
Separates multi-component data into its individual values
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Stream | ( | Action< IData > | handler | ) |
Streams the input data to the local device. This component is represented by the ISubscriber interface.
handler | Handler to process the received data |
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.Stream | ( | ) |
Variant of Stream(Action<IData>) that enables a data stream but does not yet assign a data handler.
The handler can be later attached with ISubscriber.Attach(Action<IData>)
IRouteComponent MbientLab.MetaWear.Builder.IRouteComponent.To | ( | ) |
Signals the creation of a new multicast branch