messaging
-
template<typename messageType>
class ReadFunctor - #include <messaging.h>
Read functors have read-only access to messages
Public Functions
-
inline ReadFunctor()
constructor
-
inline ReadFunctor(messageType *payloadPtr, MsgHeader *headerPtr)
constructor
-
inline const messageType &operator()()
constructor
-
inline bool isLinked()
check if this msg has been connected to
-
inline bool isWritten()
check if the message has been ever written to
-
inline uint64_t timeWritten()
return the time at which the message was written
-
inline int64_t moduleID()
return the moduleID of who wrote wrote the message
-
inline void subscribeToC(void *source)
subscribe to a C message
-
inline void subscribeToAddr(uint64_t sourceAddr)
Subscribe to the message located at the sourceAddr in memory.
-
inline void subscribeToCAddr(uint64_t sourceAddr)
Subscribe to the C message located at the sourceAddr in memory.
-
inline void subscribeTo(Message<messageType> *source)
Subscribe to a C++ message.
-
inline uint8_t isSubscribedToC(void *source)
Check if self has been subscribed to a C message.
-
inline uint8_t isSubscribedTo(Message<messageType> *source)
Check if self has been subscribed to a Cpp message.
-
inline uint8_t isSubscribedToAddr(uint64_t sourceAddr)
Check if self has been subscribed to the message at sourceAddr.
-
inline uint8_t isSubscribedToCAddr(uint64_t sourceAddr)
Check if self has been subscribed to the message at sourceAddr.
-
inline Recorder<messageType> recorder(uint64_t timeDiff = 0)
Recorder method description.
Public Members
-
BSKLogger bskLogger
< — BSK Logging
— bsk logging instance
-
messageType zeroMsgPayload = {}
— zero’d copy of the message payload type
Private Members
-
messageType *payloadPointer
— pointer to the incoming msg data
-
bool initialized
— flag indicating if the input message is connect to another message
-
inline ReadFunctor()
-
template<typename messageType>
class WriteFunctor - #include <messaging.h>
Write Functor
Public Functions
-
inline WriteFunctor()
write functor constructor
-
inline WriteFunctor(messageType *payloadPointer, MsgHeader *headerPointer)
write functor constructor
-
inline void operator()(messageType *payload, int64_t moduleID, uint64_t callTime)
write functor constructor
Private Members
-
messageType *payloadPointer
pointer to the message payload
-
inline WriteFunctor()
-
template<typename messageType>
class Message - #include <messaging.h>
forward-declare sim message for use by read functor
base class template for bsk messages
Public Functions
-
ReadFunctor<messageType> addSubscriber()
— request read rights. returns reference to class
read
variable
-
WriteFunctor<messageType> addAuthor()
— request write rights.
-
messageType *subscribeRaw(MsgHeader **msgPtr)
for plain ole c modules
-
messageType *getMsgPointers(MsgHeader **msgPtr)
for plain ole c modules
-
inline Recorder<messageType> recorder(uint64_t timeDiff = 0)
Recorder object.
-
inline bool isLinked()
check if this msg has been connected to
-
inline uint64_t getPayloadSize()
Return the memory size of the payload, be careful about dynamically sized things.
Public Members
-
WriteFunctor<messageType> write = WriteFunctor<messageType>(&payload, &header)
write functor to this message
-
messageType zeroMsgPayload = {}
zero’d copy of the message payload structure
Private Members
-
messageType payload = {}
struct defining message payload, zero’d on creation
-
ReadFunctor<messageType> read = ReadFunctor<messageType>(&payload, &header)
read functor instance
-
ReadFunctor<messageType> addSubscriber()
-
template<typename messageType>
class Recorder : public SysModel - #include <messaging.h>
Keep a time history of messages accessible to users from python
Public Functions
-
inline Recorder()
-
inline Recorder(Message<messageType> *message, uint64_t timeDiff = 0)
— Use this to record cpp messages
-
inline Recorder(void *message, uint64_t timeDiff = 0)
— Use this to record C messages
-
inline Recorder(ReadFunctor<messageType> *messageReader, uint64_t timeDiff = 0)
— Use this to keep track of what someone is reading
-
inline ~Recorder()
-
inline void SelfInit()
— self initialization
-
inline void IntegratedInit()
— cross initialization
-
inline void UpdateState(uint64_t CurrentSimNanos)
— Read and record the message
-
inline void Reset(uint64_t CurrentSimNanos)
Reset method.
-
inline std::vector<uint64_t> ×()
time recorded method
-
inline std::vector<uint64_t> ×Written()
time written method
-
inline std::vector<messageType> &record()
record method
-
inline std::string findMsgName(std::string msgName)
determine message name
-
inline void clear()
clear the recorded messages, i.e. purge the history
-
inline void updateTimeInterval(uint64_t timeDiff)
method to update the minimum time interval before recording the next message
Public Members
-
BSKLogger bskLogger
— BSK Logging
Private Members
-
std::vector<messageType> msgRecord
vector of recorded messages
-
std::vector<uint64_t> msgRecordTimes
vector of times at which messages are recorded
-
std::vector<uint64_t> msgWrittenTimes
vector of times at which messages are written
-
uint64_t nextUpdateTime = 0
[ns] earliest time at which the msg is recorded again
-
uint64_t timeInterval
[ns] recording time intervale
-
ReadFunctor<messageType> readMessage
method description
-
inline Recorder()