replicode
Public Member Functions | Private Member Functions | Private Attributes | List of all members
UDPChannel Class Reference

#include <udp_channel.h>

Inheritance diagram for UDPChannel:
Inheritance graph
Collaboration diagram for UDPChannel:
Collaboration graph

Public Member Functions

 UDPChannel (core::socket s, uint32_t port)
 
 ~UDPChannel ()
 
int16_t send (uint8_t *b, size_t s)
 
int16_t recv (uint8_t *b, size_t s, bool peek=false)
 
bool isConnected ()
 
bool disconnect ()
 
- Public Member Functions inherited from mBrane::sdk::BroadcastCommChannel
virtual ~BroadcastCommChannel ()
 
- Public Member Functions inherited from mBrane::sdk::CommChannel
virtual ~CommChannel ()
 
int16_t bufferedSend (uint8_t *b, size_t s, bool sendNow=false)
 
int16_t send (_Payload *p, uint8_t destinationNID)
 
int16_t recv (_Payload **p, uint8_t sourceNID)
 

Private Member Functions

bool initialiseBuffer (uint32_t len)
 

Private Attributes

core::socket s
 
sockaddr_in bcast_address
 
uint32_t bufferLen
 
char * buffer
 
uint32_t bufferContentLen
 
uint32_t bufferContentPos
 
std::mutex m_mutex
 

Additional Inherited Members

- Protected Member Functions inherited from mBrane::sdk::BroadcastCommChannel
 BroadcastCommChannel ()
 
- Protected Member Functions inherited from mBrane::sdk::CommChannel
 CommChannel ()
 
int16_t _send (__Payload *c, uint8_t destinationNID)
 
int16_t _recv (__Payload **c, uint8_t sourceNID)
 
- Protected Attributes inherited from mBrane::sdk::CommChannel
std::mutex commSendMutex
 
std::mutex commRecvMutex
 
uint8_tsendBuffer
 
uint32_t sendBufferLen
 
uint32_t sendBufferPos
 

Constructor & Destructor Documentation

UDPChannel::UDPChannel ( core::socket  s,
uint32_t  port 
)

Here is the call graph for this function:

UDPChannel::~UDPChannel ( )

Here is the call graph for this function:

Member Function Documentation

bool UDPChannel::disconnect ( )
virtual

Implements mBrane::sdk::CommChannel.

Here is the caller graph for this function:

bool UDPChannel::initialiseBuffer ( uint32_t  len)
private

Here is the caller graph for this function:

bool UDPChannel::isConnected ( )
virtual
int16_t UDPChannel::recv ( uint8_t b,
size_t  s,
bool  peek = false 
)
virtual

Implements mBrane::sdk::CommChannel.

Here is the call graph for this function:

int16_t UDPChannel::send ( uint8_t b,
size_t  s 
)
virtual

Member Data Documentation

sockaddr_in UDPChannel::bcast_address
private
char* UDPChannel::buffer
private
uint32_t UDPChannel::bufferContentLen
private
uint32_t UDPChannel::bufferContentPos
private
uint32_t UDPChannel::bufferLen
private
std::mutex UDPChannel::m_mutex
private
core::socket UDPChannel::s
private

The documentation for this class was generated from the following files: