|
Arduino C++ Library for VLCB
|
a derived class to extend the base long message class to handle multiple concurrent messages, sending and receiving More...
#include <LongMessageService.h>
Public Member Functions | |
| bool | allocateContexts (byte num_receive_contexts=NUM_EX_CONTEXTS, unsigned int receive_buffer_len=EX_BUFFER_LEN, byte num_send_contexts=NUM_EX_CONTEXTS) |
| allocate memory for receive and send contexts | |
| bool | sendLongMessage (const void *msg, const unsigned int msg_len, const byte stream_id) |
| bool | process () |
| void | subscribe (byte *stream_ids, const byte num_stream_ids, void(*messagehandler)(void *msg, unsigned int msg_len, byte stream_id, byte status)) |
| subscribe to a range of stream IDs | |
| virtual void | processReceivedMessageFragment (const VlcbMessage *frame) |
| handle an incoming long message Controller message fragment | |
| byte | is_sending () |
| void | use_crc (bool use_crc) |
| set whether to calculate and compare a CRC of the message | |
Additional Inherited Members |
a derived class to extend the base long message class to handle multiple concurrent messages, sending and receiving
| bool VLCB::LongMessageServiceEx::allocateContexts | ( | byte | num_receive_contexts = NUM_EX_CONTEXTS, |
| unsigned int | receive_buffer_len = EX_BUFFER_LEN, | ||
| byte | num_send_contexts = NUM_EX_CONTEXTS ) |
allocate memory for receive and send contexts
| bool VLCB::LongMessageServiceEx::sendLongMessage | ( | const void * | msg, |
| const unsigned int | msg_len, | ||
| const byte | stream_id ) |
initiate sending of a long message this method sends the first message - the header packet the remainder of the message is sent in fragments from the process() method
| bool VLCB::LongMessageServiceEx::process | ( | ) |
the process method is called regularly from the user's loop function we use this to send the individual fragments of any outgoing messages and check the message receive timeouts
| void VLCB::LongMessageServiceEx::subscribe | ( | byte * | stream_ids, |
| const byte | num_stream_ids, | ||
| void(* | messagehandler )(void *msg, unsigned int msg_len, byte stream_id, byte status) ) |
subscribe to a range of stream IDs
|
virtual |
handle an incoming long message Controller message fragment
Reimplemented from VLCB::LongMessageService.
| byte VLCB::LongMessageServiceEx::is_sending | ( | ) |
report state of long message sending returns number of streams currently in progress
| void VLCB::LongMessageServiceEx::use_crc | ( | bool | use_crc | ) |
set whether to calculate and compare a CRC of the message