SELKIELogger
1.0.0
|
Modules | |
Data conversion functions for N2K messages | |
PGN Specific helper functions | |
Files | |
file | N2KConnection.h |
file | N2KMessages.h |
file | N2KTypes.h |
Classes | |
struct | n2k_act_message |
Macros | |
#define | N2K_TO_DEGREES 0.0057295779513082332 |
Convert raw angular value to degrees. | |
#define | ACT_ESC 0x10 |
Escape character. | |
#define | ACT_SOT 0x02 |
Start of text. | |
#define | ACT_EOT 0x03 |
End of text. | |
#define | ACT_N2K 0x93 |
N2k Message. | |
#define | ACT_BEM 0xA0 |
BEM CMD ?? | |
Functions | |
bool | n2k_act_to_bytes (const n2k_act_message *act, uint8_t **out, size_t *len) |
Convert N2K message to a series of bytes compatible with ACT gateway devices. More... | |
bool | n2k_act_from_bytes (const uint8_t *in, const size_t len, n2k_act_message **msg, size_t *pos, bool debug) |
Convert a series of recieved bytes from ACT gateway devices into a message representation. More... | |
uint8_t | n2k_act_checksum (const n2k_act_message *msg) |
Calculate checksum for n2k_act_message. More... | |
void | n2k_act_print (const n2k_act_message *msg) |
Print representation of an n2k_act_message to standard output. More... | |
uint8_t n2k_act_checksum | ( | const n2k_act_message * | msg | ) |
Calculate checksum for n2k_act_message.
[in] | msg | ntk_act_message input |
Definition at line 248 of file N2KTypes.c.
bool n2k_act_from_bytes | ( | const uint8_t * | in, |
const size_t | len, | ||
n2k_act_message ** | msg, | ||
size_t * | pos, | ||
bool | debug | ||
) |
Convert a series of recieved bytes from ACT gateway devices into a message representation.
Will allocate an n2k_act_message for output, which must be freed by caller.
[in] | in | Array of bytes |
[in] | len | Number of bytes available in array |
[out] | msg | Pointer to n2k_act_message pointer for output |
[out] | pos | Number of bytes consumed |
[in] | debug | Set true for more verbose output |
Definition at line 98 of file N2KTypes.c.
void n2k_act_print | ( | const n2k_act_message * | msg | ) |
Print representation of an n2k_act_message to standard output.
Prints message as a sequence of bytes in hexadecimal form.
[in] | msg | n2k_act_message to be printed |
Definition at line 275 of file N2KTypes.c.
bool n2k_act_to_bytes | ( | const n2k_act_message * | act, |
uint8_t ** | out, | ||
size_t * | len | ||
) |
Convert N2K message to a series of bytes compatible with ACT gateway devices.
Allocates an array of bytes and converts n2k_act_message into a transmittable series of bytes
Array will need to be freed by caller
[in] | act | n2k_act_message to be packed |
[out] | out | Pointer to array of bytes |
[out] | len | Will be set to message length after conversion |
Definition at line 38 of file N2KTypes.c.