public class TriggerBuilder
extends java.lang.Object
LoggingTrigger
Constructor and Description |
---|
TriggerBuilder() |
Modifier and Type | Method and Description |
---|---|
static Logging.Trigger |
buildAccelerometerTrigger()
Constructs a trigger for all axis data from the accelerometer.
|
static Logging.Trigger |
buildDataFilterTrigger(byte filterId,
byte dataLength)
Constructs a trigger for the output of a data filter.
|
static Logging.Trigger |
buildGPIOAnalogTrigger(boolean readSupplyRatio,
byte gpioPin)
Constructs a trigger for reading GPIO analog values.
|
static Logging.Trigger |
buildGPIODigitalTrigger(byte gpioPin)
Constructs a trigger for reading GPIO digital values.
|
static Logging.Trigger |
buildPinChangeNotifyTrigger(byte gpioPin)
Constructs a trigger for GPIO pin state change notifications.
|
public static Logging.Trigger buildAccelerometerTrigger()
LoggingTrigger
enum.LoggingTrigger.ACCELEROMETER_X_AXIS
,
LoggingTrigger.ACCELEROMETER_Y_AXIS
,
LoggingTrigger.ACCELEROMETER_Z_AXIS
public static Logging.Trigger buildGPIOAnalogTrigger(boolean readSupplyRatio, byte gpioPin)
readSupplyRatio
- True if the supply ratio should be used, false to use absolute voltagegpioPin
- GPIO pin to read fromDataProcessor#addReadFilter(Trigger, FilterConfig)
,
Logging.addReadTrigger(Trigger)
public static Logging.Trigger buildGPIODigitalTrigger(byte gpioPin)
gpioPin
- GPIO pin to read fromDataProcessor#addReadFilter(Trigger, FilterConfig)
,
Logging.addReadTrigger(Trigger)
public static Logging.Trigger buildPinChangeNotifyTrigger(byte gpioPin)
gpioPin
- GPIO pin to received notifications onpublic static Logging.Trigger buildDataFilterTrigger(byte filterId, byte dataLength)
Logging.addTrigger(Trigger)
if the data size is greater than 4 bytesfilterId
- Numerical ID of the filter the trigger representsdataLength
- How many bytes the filter data isDataProcessor.Callbacks.receivedFilterId(byte)