nano-client API Reference
|
Data Structures | |
struct | NANO_XRCE_ClientKey |
TODO. More... | |
struct | NANO_XRCE_SeqNum |
A sequence number type as defined by IETF RFC-1982 with SERIAL_BITS set to 16. More... | |
Macros | |
#define | NANO_XRCE_CLIENTKEY_INVALID { { 0x00, 0x00, 0x00, 0x00 } } |
A static initializer for an invalid client key. | |
#define | NANO_XRCE_CLIENTKEY_VALUE_LEN 4 |
Length of a NANO_XRCE_ClientKey's value, in octets. | |
#define | NANO_XRCE_SEQNUM_INITIALIZER { { 0 } /* value */ } |
Static initializer for NANO_XRCE_SeqNum value. | |
#define | NANO_XRCE_SEQNUM_SERIAL_BITS 16 |
The SERIAL_BITS constant for the implementation of IETF RFC-1982. | |
#define | NANO_XRCE_SEQNUM_VALUE_LEN (NANO_XRCE_SEQNUM_SERIAL_BITS/8) |
Length of a NANO_XRCE_SeqNum's value, in octets. | |
#define | NANO_XRCE_SESSIONID_NONE_WITH_CLIENT (0x00) |
Constant to indicate lack of a session, but presence of a client key. | |
#define | NANO_XRCE_SESSIONID_NONE_WITHOUT_CLIENT (0x80) |
Constant to indicate lack of a session, and a client key. | |
#define | NANO_XRCE_STREAMID_BUILTIN_BEST_EFFORTS (0x01) |
Constant to indicate the built-in best-effort stream. | |
#define | NANO_XRCE_STREAMID_BUILTIN_RELIABLE (0x80) |
Constant to indicate the built-in reliable stream. | |
#define | NANO_XRCE_STREAMID_NONE (0x00) |
Constant to indicate the absence of a stream. | |
Typedefs | |
typedef NANO_u8 | NANO_XRCE_SessionId |
Identifier for sessions created by a client on an agent. | |
typedef NANO_u8 | NANO_XRCE_StreamId |
Identifier for streams of XRCE messages. | |
Enumerations | |
enum | NANO_XRCE_ReliableMessageLostReason { NANO_XRCE_RELIABLEMESSAGELOSTREASON_LOST_BY_LOCAL_WRITER = 0, NANO_XRCE_RELIABLEMESSAGELOSTREASON_LOST_BY_REMOTE_WRITER = 1 } |
TODO. More... | |
Functions | |
NANO_i8 | NANO_XRCE_ClientKey_compare (const NANO_XRCE_ClientKey *const self, const NANO_XRCE_ClientKey *const other) |
TODO. More... | |
void | NANO_XRCE_ClientKey_from_u32 (NANO_XRCE_ClientKey *const self, const NANO_u32 val) |
Set a client key from a NANO_u32 in native endianness. More... | |
NANO_bool | NANO_XRCE_ClientKey_is_valid (const NANO_XRCE_ClientKey *const self) |
Check if a NANO_XRCE_ClientKey contains a valid value. More... | |
NANO_u32 | NANO_XRCE_ClientKey_to_u32 (NANO_XRCE_ClientKey *const self) |
Transform a client key into a NANO_u32 in native endianness. More... | |
void | NANO_XRCE_SeqNum_add (const NANO_XRCE_SeqNum *const self, const NANO_i16 add, NANO_XRCE_SeqNum *const res_out) |
Add a 16-bit positive signed integer to a sequence numbers. More... | |
void | NANO_XRCE_SeqNum_compare (const NANO_XRCE_SeqNum *const self, const NANO_XRCE_SeqNum *const other, NANO_i8 *cmp_out) |
Compare a sequence numbers to another. More... | |
void | NANO_XRCE_SeqNum_from_u16 (NANO_XRCE_SeqNum *const self, const NANO_u16 val) |
Set a sequence number from a 16-bit unsigned integer in native endianness. More... | |
void | NANO_XRCE_SeqNum_plusplus (const NANO_XRCE_SeqNum *const self) |
TODO. More... | |
NANO_u16 | NANO_XRCE_SeqNum_to_u16 (const NANO_XRCE_SeqNum *const self) |
Convert a sequence number into a 16-bit unsigned integer. More... | |
NANO_bool | NANO_XRCE_SessionId_has_client_key (const NANO_XRCE_SessionId id) |
Check if the session includes a client key. More... | |
NANO_u16 | NANO_XRCE_SessionId_header_size (const NANO_XRCE_SessionId id) |
NANO_bool | NANO_XRCE_StreamId_is_builtin (const NANO_XRCE_StreamId id) |
Check if the stream is a built-in one. More... | |
NANO_bool | NANO_XRCE_StreamId_is_reliable (const NANO_XRCE_StreamId id) |
Check if the stream is reliable. More... | |
NANO_i8 NANO_XRCE_ClientKey_compare | ( | const NANO_XRCE_ClientKey *const | self, |
const NANO_XRCE_ClientKey *const | other | ||
) |
TODO.
self | |
other |
void NANO_XRCE_ClientKey_from_u32 | ( | NANO_XRCE_ClientKey *const | self, |
const NANO_u32 | val | ||
) |
Set a client key from a NANO_u32 in native endianness.
self | The key to set. |
val | The value to set the key from. |
NANO_bool NANO_XRCE_ClientKey_is_valid | ( | const NANO_XRCE_ClientKey *const | self | ) |
Check if a NANO_XRCE_ClientKey contains a valid value.
self | The key to check. |
NANO_u32 NANO_XRCE_ClientKey_to_u32 | ( | NANO_XRCE_ClientKey *const | self | ) |
Transform a client key into a NANO_u32 in native endianness.
self | The key to transform. |
void NANO_XRCE_SeqNum_add | ( | const NANO_XRCE_SeqNum *const | self, |
const NANO_i16 | add, | ||
NANO_XRCE_SeqNum *const | res_out | ||
) |
Add a 16-bit positive signed integer to a sequence numbers.
self | The sequence number. |
add | The number to add. |
res_out | The resulting sequence number. |
void NANO_XRCE_SeqNum_compare | ( | const NANO_XRCE_SeqNum *const | self, |
const NANO_XRCE_SeqNum *const | other, | ||
NANO_i8 * | cmp_out | ||
) |
Compare a sequence numbers to another.
Two sequence numbers, s1 and s2, and their NANO_u16 representations, u1 and u2, can only be compared if:
u1 == u2
u1 > u2 && (u1 - u2) == (1 << (NANO_XRCE_SEQNUM_SERIAL_BITS-1))
u1 < u2 && (u2 - u1) == (1 << (NANO_XRCE_SEQNUM_SERIAL_BITS-1))
self | The sequence number. |
other | The other sequence number |
cmp_out | 0 if the two sequence numbers are the same, a negative value if self < other, or a positive value if self > other. |
void NANO_XRCE_SeqNum_from_u16 | ( | NANO_XRCE_SeqNum *const | self, |
const NANO_u16 | val | ||
) |
Set a sequence number from a 16-bit unsigned integer in native endianness.
self | The sequence number to set. |
val | The 16-bit integer from which to set the sequence number. |
void NANO_XRCE_SeqNum_plusplus | ( | const NANO_XRCE_SeqNum *const | self | ) |
TODO.
self |
NANO_u16 NANO_XRCE_SeqNum_to_u16 | ( | const NANO_XRCE_SeqNum *const | self | ) |
Convert a sequence number into a 16-bit unsigned integer.
self | The sequence number to convert. |
NANO_bool NANO_XRCE_SessionId_has_client_key | ( | const NANO_XRCE_SessionId | id | ) |
Check if the session includes a client key.
id | the session to inspect |
NANO_u16 NANO_XRCE_SessionId_header_size | ( | const NANO_XRCE_SessionId | id | ) |
id |
NANO_bool NANO_XRCE_StreamId_is_builtin | ( | const NANO_XRCE_StreamId | id | ) |
Check if the stream is a built-in one.
id | the stream to inspect |
NANO_bool NANO_XRCE_StreamId_is_reliable | ( | const NANO_XRCE_StreamId | id | ) |
Check if the stream is reliable.
id | the stream to inspect |