A message object passed around in the message bus. Holds anything created with make_data<>().
More...
#include <message.hpp>
|
void * | get_data () const |
|
message * | make_copy () const |
|
| message (uint8_t name, const std::shared_ptr< void > &data=nullptr) |
|
| message (uint8_t name, uint32_t base_data0, const std::shared_ptr< void > &data=nullptr) |
|
|
static void * | operator new (size_t) |
|
static void | operator delete (void *) |
|
|
uint32_t | base_data0 = 0 |
|
uint16_t | base_data1 = 0 |
|
uint8_t | base_data2 = 0 |
|
uint8_t | msg_name {} |
|
A message object passed around in the message bus. Holds anything created with make_data<>().
Only use new message() and delete() for the creation of a message.
Definition at line 21 of file message.hpp.
◆ message()
message::message |
( |
uint8_t |
name, |
|
|
const std::shared_ptr< void > & |
data = nullptr |
|
) |
| |
|
inlineexplicit |
- Parameters
-
name | The type of message. See ST::msg_type. |
data | The data the message carries - created with make_data<>() or is nullptr |
Definition at line 44 of file message.hpp.
◆ get_data()
void * message::get_data |
( |
| ) |
const |
|
inline |
- Returns
- The data contained within a message. Always a void* that MUST be properly cast to an actual type on the other end
Definition at line 80 of file message.hpp.
◆ make_copy()
message * message::make_copy |
( |
| ) |
const |
|
inline |
- Returns
- A copy of this message.
Definition at line 87 of file message.hpp.
The documentation for this class was generated from the following files: