BusBricks: Message_content_t Struct Reference
BusBricks  0.1
Customize bus-communication
Loading...
Searching...
No Matches
Message_content_t Struct Reference

Represents the content of a message with sender and receiver information. More...

#include <Message.h>

Public Member Functions

 Message_content_t ()
 Default constructor for Message_content_t.
 
 Message_content_t (char sender_id, char receiver_id, String msg_txt, uint8_t txt_size)
 Parameterized constructor for Message_content_t.
 

Public Attributes

char sender_id
 
char receiver_id
 
String msg_text
 

Detailed Description

Represents the content of a message with sender and receiver information.

This structure is used to encapsulate a message including the sender ID, receiver ID, and the message text.

Constructor & Destructor Documentation

◆ Message_content_t() [1/2]

Message_content_t::Message_content_t ( )
inline

Default constructor for Message_content_t.

Initializes sender_id and receiver_id to 0x0. The msg_text is initialized as an empty string.

◆ Message_content_t() [2/2]

Message_content_t::Message_content_t ( char sender_id,
char receiver_id,
String msg_txt,
uint8_t txt_size )
inline

Parameterized constructor for Message_content_t.

Initializes the sender_id, receiver_id, and msg_text with the provided values. The message text is appended with a null terminator.

Parameters
sender_idThe ID of the sender (1 byte).
receiver_idThe ID of the receiver (1 byte).
msg_txtThe message text to initialize.
txt_sizeThe size of the message text (not used in this implementation but could be used for validation or other purposes).

Member Data Documentation

◆ msg_text

String Message_content_t::msg_text

The text of the message as a String.

Note
The msg_text is automatically null-terminated in the constructor, though it is already a String type which inherently handles null-termination.

◆ receiver_id

char Message_content_t::receiver_id

The ID of the receiver (1 byte).

◆ sender_id

char Message_content_t::sender_id

The ID of the sender (1 byte).


The documentation for this struct was generated from the following file: