SF2 C++ FRC Class Library
Sensor Fusion Framework (SF2) for FRC
|
The ITimestampedQuaternionSensor interface should be implemented by any sensor which generates timestamped Quaternions (e.g., the navX-MXP). More...
#include <ISensorDataSource.h>
Public Member Functions | |
virtual bool | subscribe (ISensorDataSubscriber *subscriber)=0 |
Subscribes the provided subscriber object for callbacks whenever new TimestampedQuaternion data is received by the sensor. More... | |
virtual bool | unsubscribe (ISensorDataSubscriber *subscriber)=0 |
Unsubscribes the previously-registered subscriber object for callbacks whenever new Sensor Data is received by the sensor. More... | |
virtual bool | getCurrent (vector< IQuantity * > &quantities, Timestamp &curr_ts)=0 |
Retrieves the most recently-received Sensor Data value. More... | |
virtual bool | reset (int quantity_index)=0 |
For those quantities which can be reset to their default (e.g., an IMU Yaw, or an encoder counter), this method will cause the reset to occur. More... | |
virtual void | getSensorDataSourceInfos (vector< SensorDataSourceInfo * > &out)=0 |
The ITimestampedQuaternionSensor interface should be implemented by any sensor which generates timestamped Quaternions (e.g., the navX-MXP).
|
pure virtual |
Retrieves the most recently-received Sensor Data value.
tq |
Implemented in navXSensor.
|
pure virtual |
For those quantities which can be reset to their default (e.g., an IMU Yaw, or an encoder counter), this method will cause the reset to occur.
If the quantity is reset successful, true is returned. If the quantity could not be reset, or if the quantity does not support resetting, false is returned.
quantity_index |
Implemented in navXSensor.
|
pure virtual |
Subscribes the provided subscriber object for callbacks whenever new TimestampedQuaternion data is received by the sensor.
subscriber | - object implementing the ISensorDataSubscriber<T> interface which will be called back whenever new data arrives. |
Implemented in navXSensor.
|
pure virtual |
Unsubscribes the previously-registered subscriber object for callbacks whenever new Sensor Data is received by the sensor.
The subscriber should have been previously registered for callbacks via the subscribe() method.
subscriber | - object implementing the ISensorDataSubscriber<T> interface, which up success will no longer be called back whenever new data arrives. |
Implemented in navXSensor.