nano-client API Reference
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
XRCE Support Types

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...
 

Detailed Description

Enumeration Type Documentation

◆ NANO_XRCE_ReliableMessageLostReason

TODO.

Enumerator
NANO_XRCE_RELIABLEMESSAGELOSTREASON_LOST_BY_LOCAL_WRITER 

TODO.

NANO_XRCE_RELIABLEMESSAGELOSTREASON_LOST_BY_REMOTE_WRITER 

TODO.

Function Documentation

◆ NANO_XRCE_ClientKey_compare()

NANO_i8 NANO_XRCE_ClientKey_compare ( const NANO_XRCE_ClientKey *const  self,
const NANO_XRCE_ClientKey *const  other 
)

TODO.

Parameters
self
other
Returns
NANO_i8

◆ NANO_XRCE_ClientKey_from_u32()

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.

Parameters
selfThe key to set.
valThe value to set the key from.

◆ NANO_XRCE_ClientKey_is_valid()

NANO_bool NANO_XRCE_ClientKey_is_valid ( const NANO_XRCE_ClientKey *const  self)

Check if a NANO_XRCE_ClientKey contains a valid value.

Parameters
selfThe key to check.
Returns
NANO_BOOL_TRUE if the key is valid, NANO_BOOL_FALSE otherwise.

◆ NANO_XRCE_ClientKey_to_u32()

NANO_u32 NANO_XRCE_ClientKey_to_u32 ( NANO_XRCE_ClientKey *const  self)

Transform a client key into a NANO_u32 in native endianness.

Parameters
selfThe key to transform.
Returns
A NANO_u32 representing the value of the client key.

◆ NANO_XRCE_SeqNum_add()

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.

Parameters
selfThe sequence number.
addThe number to add.
res_outThe resulting sequence number.
Returns
NANO_RETCODE_OK if the result was successfully computer, NANO_RETCODE_INVALID_ARGS if the specified number was invalid (e.g. negative).

◆ NANO_XRCE_SeqNum_compare()

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))
Parameters
selfThe sequence number.
otherThe other sequence number
cmp_out0 if the two sequence numbers are the same, a negative value if self < other, or a positive value if self > other.
Returns
NANO_RETCODE_OK if the comparison could be sucessfully computer, NANO_RETCODE_INVALID_ARGS if the two sequence numbers cannot be uniquely compared according to "sequence number arithmetics".

◆ NANO_XRCE_SeqNum_from_u16()

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.

Parameters
selfThe sequence number to set.
valThe 16-bit integer from which to set the sequence number.

◆ NANO_XRCE_SeqNum_plusplus()

void NANO_XRCE_SeqNum_plusplus ( const NANO_XRCE_SeqNum *const  self)

TODO.

Parameters
self

◆ NANO_XRCE_SeqNum_to_u16()

NANO_u16 NANO_XRCE_SeqNum_to_u16 ( const NANO_XRCE_SeqNum *const  self)

Convert a sequence number into a 16-bit unsigned integer.

Parameters
selfThe sequence number to convert.
Returns
A NANO_u16 representing the sequence number in native endianness.

◆ NANO_XRCE_SessionId_has_client_key()

NANO_bool NANO_XRCE_SessionId_has_client_key ( const NANO_XRCE_SessionId  id)

Check if the session includes a client key.

Parameters
idthe session to inspect
Returns
NANO_BOOL_TRUE if the session includes a client key, NANO_BOOL_FALSE otherwise.

◆ NANO_XRCE_SessionId_header_size()

NANO_u16 NANO_XRCE_SessionId_header_size ( const NANO_XRCE_SessionId  id)
Parameters
id
Returns
NANO_u16

◆ NANO_XRCE_StreamId_is_builtin()

NANO_bool NANO_XRCE_StreamId_is_builtin ( const NANO_XRCE_StreamId  id)

Check if the stream is a built-in one.

Parameters
idthe stream to inspect
Returns
NANO_BOOL_TRUE if the stream is a built-in one, NANO_BOOL_FALSE otherwise.

◆ NANO_XRCE_StreamId_is_reliable()

NANO_bool NANO_XRCE_StreamId_is_reliable ( const NANO_XRCE_StreamId  id)

Check if the stream is reliable.

Parameters
idthe stream to inspect
Returns
NANO_BOOL_TRUE if the stream is reliable, NANO_BOOL_FALSE otherwise.