Basic implementation of Xbus message parsing and generation for embedded processors. The code has no dependencies and should also work for other MCU architectures than ARM provided a C99 compiler is available.
Dependents: MTi-1_example_LPC1768 MTi-1_rikbeun MTi-1_example MTi-1_example ... more
XbusParserCallback Struct Reference
Callback function structure for use with the XbusParser. More...
#include <xbusparser.h>
Data Fields | |
void *(* | allocateBuffer )(size_t bufSize) |
Allocate a buffer for message reception. | |
void(* | deallocateBuffer )(void const *buffer) |
Deallocate a buffer that was previously allocated by a call to allocateBuffer. | |
void(* | handleMessage )(struct XbusMessage const *message) |
Handle a received message. |
Detailed Description
Callback function structure for use with the XbusParser.
Definition at line 34 of file xbusparser.h.
Field Documentation
void*(* allocateBuffer)(size_t bufSize) |
Allocate a buffer for message reception.
- Parameters:
-
bufSize The size of the buffer to allocate.
- Returns:
- Pointer to buffer to use for message reception, or NULL if a buffer cannot be allocated.
- Note:
- It is the resposibility of the user to deallocate the message data buffers pointed to by XbusMessage structures passed to the handleMessage() callback function.
Definition at line 46 of file xbusparser.h.
void(* deallocateBuffer)(void const *buffer) |
Deallocate a buffer that was previously allocated by a call to allocateBuffer.
Definition at line 52 of file xbusparser.h.
void(* handleMessage)(struct XbusMessage const *message) |
Handle a received message.
- Note:
- If the passed XbusMessage structure has a non-null data pointer then it is the responsibility of the user to free this once handling of the message is complete.
Definition at line 61 of file xbusparser.h.
Generated on Thu Jul 14 2022 08:57:02 by 1.7.2