#include <generic_subscriber.hpp>
Public Types | |
typedef DataType_ | DataType |
Public Member Functions | |
uint8_t | getIfaceIndex () const |
MonotonicTime | getMonotonicTimestamp () const |
TransferPriority | getPriority () const |
NodeID | getSrcNodeID () const |
TransferID | getTransferID () const |
TransferType | getTransferType () const |
UtcTime | getUtcTimestamp () const |
bool | isAnonymousTransfer () const |
Protected Member Functions | |
ReceivedDataStructure () | |
ReceivedDataStructure (const IncomingTransfer *arg_transfer) | |
Private Member Functions | |
template<typename Ret , Ret(IncomingTransfer::*)() const Fun> | |
Ret | safeget () const |
![]() | |
Noncopyable () | |
~Noncopyable () | |
Private Attributes | |
const IncomingTransfer *const | _transfer_ |
Such weird name is necessary to avoid clashing with DataType fields. More... | |
This class extends the data structure with extra information obtained from the transport layer, such as Source Node ID, timestamps, Transfer ID, index of the interface this transfer was picked up from, etc.
PLEASE NOTE that since this class inherits the data structure type, subscription callbacks can accept either object of this class or the data structure type directly if the extra information is not needed.
For example, both of these callbacks can be used with the same data structure 'Foo': void first(const ReceivedDataStructure<Foo>& msg); void second(const Foo& msg); In the latter case, an implicit cast will happen before the callback is invoked.
This class is not copyable because it holds a reference to a stack-allocated transfer descriptor object. You can slice cast it to the underlying data type though, which would be copyable: DataType dt = rds; // where rds is of type ReceivedDataStructure<DataType> // dt is now copyable
Definition at line 39 of file generic_subscriber.hpp.
typedef DataType_ uavcan::ReceivedDataStructure< DataType_ >::DataType |
Definition at line 65 of file generic_subscriber.hpp.
|
inlineprotected |
Definition at line 54 of file generic_subscriber.hpp.
|
inlineprotected |
Definition at line 58 of file generic_subscriber.hpp.
|
inline |
Definition at line 76 of file generic_subscriber.hpp.
|
inline |
Definition at line 67 of file generic_subscriber.hpp.
|
inline |
Definition at line 72 of file generic_subscriber.hpp.
|
inline |
Definition at line 75 of file generic_subscriber.hpp.
|
inline |
Definition at line 74 of file generic_subscriber.hpp.
|
inline |
Definition at line 73 of file generic_subscriber.hpp.
|
inline |
Definition at line 71 of file generic_subscriber.hpp.
|
inline |
Definition at line 77 of file generic_subscriber.hpp.
|
inlineprivate |
Definition at line 44 of file generic_subscriber.hpp.
|
private |
Such weird name is necessary to avoid clashing with DataType fields.
Definition at line 41 of file generic_subscriber.hpp.