DUNE: Uniform Navigational Environment  2019.02.0
Transports::UDP::Node Class Reference

Public Member Functions

 Node (const std::string &name, const std::string &services)
 
 Node (const Node &node)
 
const std::string & getName (void) const
 
bool check (const Address &addr, unsigned port)
 
bool activate (const Address &addr)
 
bool deactivate (const Address &addr)
 
void send (UDPSocket &sock, const uint8_t *data, unsigned data_len)
 

Constructor & Destructor Documentation

Transports::UDP::Node::Node ( const std::string &  name,
const std::string &  services 
)
inline
Transports::UDP::Node::Node ( const Node node)
inline

Member Function Documentation

bool Transports::UDP::Node::activate ( const Address &  addr)
inline

Point active address to existing node service.

Parameters
[in]addrnode address.
Returns
true if activation successful, false if already activated.
bool Transports::UDP::Node::check ( const Address &  addr,
unsigned  port 
)
inline

Check if address and port are on this node's list of services.

Parameters
[in]addraddress.
[in]portport.
Returns
true if address:port is part of node list of services, false otherwise.

Referenced by Transports::UDP::Task::consume().

bool Transports::UDP::Node::deactivate ( const Address &  addr)
inline

Deactivate destination address from list of services.

Parameters
[in]addrnode address.
Returns
true if deactivation successful, false if already deactivated.
const std::string& Transports::UDP::Node::getName ( void  ) const
inline

Get node name.

Returns
node name.
void Transports::UDP::Node::send ( UDPSocket &  sock,
const uint8_t *  data,
unsigned  data_len 
)
inline

Send data to node.

Parameters
[in]sockUDP destination socket.
[in]datadata to be transmitted.
[in]data_lenlength of data to be transmitted.
Collaboration diagram for Transports::UDP::Node:
Collaboration graph