rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
Classes | Macros | Typedefs | Enumerations | Functions
network_flow_endpoint.h File Reference
#include "rmw/types.h"
#include "rmw/visibility_control.h"
Include dependency graph for network_flow_endpoint.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rmw_network_flow_endpoint_t
 Structure that describes network flow endpoint of a publisher or subscription. More...
 

Macros

#define RMW_INET_ADDRSTRLEN   48
 

Typedefs

typedef enum rmw_transport_protocol_t rmw_transport_protocol_t
 Transport protocol types. More...
 
typedef enum rmw_internet_protocol_t rmw_internet_protocol_t
 Internet protocol types. More...
 
typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_t rmw_network_flow_endpoint_t
 Structure that describes network flow endpoint of a publisher or subscription. More...
 

Enumerations

enum  rmw_transport_protocol_t { RMW_TRANSPORT_PROTOCOL_UNKNOWN = 0, RMW_TRANSPORT_PROTOCOL_UDP, RMW_TRANSPORT_PROTOCOL_TCP, RMW_TRANSPORT_PROTOCOL_COUNT }
 Transport protocol types. More...
 
enum  rmw_internet_protocol_t { RMW_INTERNET_PROTOCOL_UNKNOWN = 0, RMW_INTERNET_PROTOCOL_IPV4, RMW_INTERNET_PROTOCOL_IPV6, RMW_INTERNET_PROTOCOL_COUNT }
 Internet protocol types. More...
 

Functions

rmw_network_flow_endpoint_t rmw_get_zero_initialized_network_flow_endpoint (void)
 Return a rmw_network_flow_endpoint_t struct with zero-initialized members. More...
 
const char * rmw_network_flow_endpoint_get_transport_protocol_string (const rmw_transport_protocol_t transport_protocol)
 Convert to string variant of transport protocol. More...
 
const char * rmw_network_flow_endpoint_get_internet_protocol_string (const rmw_internet_protocol_t internet_protocol)
 Convert to string variant of internet protocol. More...
 
rmw_ret_t rmw_network_flow_endpoint_set_internet_address (rmw_network_flow_endpoint_t *network_flow_endpoint, const char *internet_address, size_t size)
 Set internet address in the rmw_network_flow_endpoint_t struct. More...
 

Macro Definition Documentation

◆ RMW_INET_ADDRSTRLEN

#define RMW_INET_ADDRSTRLEN   48

Maximum length of internet address string including terminating null Inspired from linux/inet.h

Typedef Documentation

◆ rmw_transport_protocol_t

Transport protocol types.

◆ rmw_internet_protocol_t

Internet protocol types.

◆ rmw_network_flow_endpoint_t

Structure that describes network flow endpoint of a publisher or subscription.

Enumeration Type Documentation

◆ rmw_transport_protocol_t

Transport protocol types.

Enumerator
RMW_TRANSPORT_PROTOCOL_UNKNOWN 
RMW_TRANSPORT_PROTOCOL_UDP 
RMW_TRANSPORT_PROTOCOL_TCP 
RMW_TRANSPORT_PROTOCOL_COUNT 

◆ rmw_internet_protocol_t

Internet protocol types.

Enumerator
RMW_INTERNET_PROTOCOL_UNKNOWN 
RMW_INTERNET_PROTOCOL_IPV4 
RMW_INTERNET_PROTOCOL_IPV6 
RMW_INTERNET_PROTOCOL_COUNT 

Function Documentation

◆ rmw_get_zero_initialized_network_flow_endpoint()

rmw_network_flow_endpoint_t rmw_get_zero_initialized_network_flow_endpoint ( void  )

Return a rmw_network_flow_endpoint_t struct with zero-initialized members.

◆ rmw_network_flow_endpoint_get_transport_protocol_string()

const char* rmw_network_flow_endpoint_get_transport_protocol_string ( const rmw_transport_protocol_t  transport_protocol)

Convert to string variant of transport protocol.

Parameters
[in]transport_protocoltransport_protocol_t to be converted

◆ rmw_network_flow_endpoint_get_internet_protocol_string()

const char* rmw_network_flow_endpoint_get_internet_protocol_string ( const rmw_internet_protocol_t  internet_protocol)

Convert to string variant of internet protocol.

Parameters
[in]internet_protocolinternet_protocol_t to be converted

◆ rmw_network_flow_endpoint_set_internet_address()

rmw_ret_t rmw_network_flow_endpoint_set_internet_address ( rmw_network_flow_endpoint_t network_flow_endpoint,
const char *  internet_address,
size_t  size 
)

Set internet address in the rmw_network_flow_endpoint_t struct.

Parameters
[in]network_flow_endpointnetwork_flow_endpoint_t to be initialized
[in]internet_addressthe internet address as C-style string
[in]sizesize of internet_address excluding terminating null
Returns
RMW_RET_OK on successfull initilization, or
RMW_RET_INVALID_ARGUMENT if network_flow_endpoint is NULL, or
RMW_RET_INVALID_ARGUMENT if internet_address is NULL, or
RMW_RET_INVALID_ARGUMENT if size is not less than RMW_INET_ADDRSTRLEN, or
RMW_RET_ERROR when an unspecified error occurs.