Interface to data received from the bus. More...
#include <datareference.h>
Public Member Functions | |
virtual void | update ()=0 |
virtual void | readFromCan (const CanAeroMetadata &meta, const can_t &can)=0 |
virtual std::vector< can_t > | write (const CanAeroMetadata &meta)=0 |
virtual bool | needRequest () const =0 |
virtual void | requested ()=0 |
virtual bool | hasChanged () const =0 |
virtual bool | isSelfPublished () const =0 |
Interface to data received from the bus.
If you need more customization in what should happen when data is received, you should implement this interface with template-classes.
virtual bool SCS::TypelessDataReference::hasChanged | ( | ) | const [pure virtual] |
Implemented in SCS::DataReference< T >.
virtual bool SCS::TypelessDataReference::isSelfPublished | ( | ) | const [pure virtual] |
Implemented in SCS::DataReference< T >.
virtual bool SCS::TypelessDataReference::needRequest | ( | ) | const [pure virtual] |
Implemented in SCS::DataReference< T >.
virtual void SCS::TypelessDataReference::readFromCan | ( | const CanAeroMetadata & | meta, |
const can_t & | can | ||
) | [pure virtual] |
Read the actual value from incoming data, perform epsilon checks and check for losses.
Implemented in SCS::DataReference< T >.
virtual void SCS::TypelessDataReference::requested | ( | ) | [pure virtual] |
Reset the internal timer when data was requested, but not yet received, to prevent request-flooding.
Implemented in SCS::DataReference< T >.
virtual void SCS::TypelessDataReference::update | ( | ) | [pure virtual] |
Check if data has been update from the bus and sync application data.
Implemented in SCS::DataReference< T >.
virtual std::vector<can_t> SCS::TypelessDataReference::write | ( | const CanAeroMetadata & | meta | ) | [pure virtual] |
Take the value of application data and contruct a CAN message (or an array of messsages) from it.
Implemented in SCS::DataReference< T >.