SELKIELogger  1.0.0
Data conversion functions for N2K messages
Collaboration diagram for Data conversion functions for N2K messages:

Functions

int8_t n2k_get_int8 (const n2k_act_message *n, size_t offset)
 Extract signed byte from N2K Message. More...
 
uint8_t n2k_get_uint8 (const n2k_act_message *n, size_t offset)
 Extract unsigned byte from N2K Message. More...
 
int16_t n2k_get_int16 (const n2k_act_message *n, size_t offset)
 Extract signed 16-bit integer from N2K Message. More...
 
uint16_t n2k_get_uint16 (const n2k_act_message *n, size_t offset)
 Extract unsigned 16-bit integer from N2K Message. More...
 
int32_t n2k_get_int32 (const n2k_act_message *n, size_t offset)
 Extract signed 32-bit integer from N2K Message. More...
 
uint32_t n2k_get_uint32 (const n2k_act_message *n, size_t offset)
 Extract unsigned 32-bit integer from N2K Message. More...
 
int64_t n2k_get_int64 (const n2k_act_message *n, size_t offset)
 Extract signed 64-bit integer from N2K Message. More...
 
uint64_t n2k_get_uint64 (const n2k_act_message *n, size_t offset)
 Extract unsigned 64-bit integer from N2K Message. More...
 
double n2k_get_double (const n2k_act_message *n, size_t offset, uint8_t size)
 Extract double from underlying integer data. More...
 
double n2k_get_udouble (const n2k_act_message *n, size_t offset, uint8_t size)
 Extract double from underlying unsigned integer data. More...
 

Detailed Description

Function Documentation

◆ n2k_get_double()

double n2k_get_double ( const n2k_act_message n,
size_t  offset,
uint8_t  size 
)

Extract double from underlying integer data.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
[in]sizeSize of underlying integer (8,16,32,64)
Returns
double - NAN if underlying data is invalid

Definition at line 125 of file N2KMessages.c.

◆ n2k_get_int16()

int16_t n2k_get_int16 ( const n2k_act_message n,
size_t  offset 
)

Extract signed 16-bit integer from N2K Message.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
Returns
Signed 16-bit integer

Definition at line 55 of file N2KMessages.c.

◆ n2k_get_int32()

int32_t n2k_get_int32 ( const n2k_act_message n,
size_t  offset 
)

Extract signed 32-bit integer from N2K Message.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
Returns
Signed 32-bit integer

Definition at line 76 of file N2KMessages.c.

◆ n2k_get_int64()

int64_t n2k_get_int64 ( const n2k_act_message n,
size_t  offset 
)

Extract signed 64-bit integer from N2K Message.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
Returns
Signed 64-bit integer

Definition at line 99 of file N2KMessages.c.

◆ n2k_get_int8()

int8_t n2k_get_int8 ( const n2k_act_message n,
size_t  offset 
)

Extract signed byte from N2K Message.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
Returns
Signed byte

Definition at line 43 of file N2KMessages.c.

◆ n2k_get_udouble()

double n2k_get_udouble ( const n2k_act_message n,
size_t  offset,
uint8_t  size 
)

Extract double from underlying unsigned integer data.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
[in]sizeSize of underlying integer (8,16,32,64)
Returns
double - NAN if underlying data is invalid

Definition at line 153 of file N2KMessages.c.

◆ n2k_get_uint16()

uint16_t n2k_get_uint16 ( const n2k_act_message n,
size_t  offset 
)

Extract unsigned 16-bit integer from N2K Message.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
Returns
Unsigned 16-bit integer

Definition at line 67 of file N2KMessages.c.

◆ n2k_get_uint32()

uint32_t n2k_get_uint32 ( const n2k_act_message n,
size_t  offset 
)

Extract unsigned 32-bit integer from N2K Message.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
Returns
Unsigned 32-bit integer

Definition at line 88 of file N2KMessages.c.

◆ n2k_get_uint64()

uint64_t n2k_get_uint64 ( const n2k_act_message n,
size_t  offset 
)

Extract unsigned 64-bit integer from N2K Message.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
Returns
Unsigned 64-bit integer

Definition at line 111 of file N2KMessages.c.

◆ n2k_get_uint8()

uint8_t n2k_get_uint8 ( const n2k_act_message n,
size_t  offset 
)

Extract unsigned byte from N2K Message.

Parameters
[in]nN2K message containing target data
[in]offsetStarting offset within n2k_act_message.data
Returns
Unsigned byte

Definition at line 34 of file N2KMessages.c.