OpenJAUS Software Development Kit  4.3.1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
openjaus::transport::AS5669::JudpInterface Class Reference

#include <JudpInterface.h>

Inherits openjaus::transport::Interface.

Public Member Functions

 JudpInterface ()
 
virtual ~JudpInterface ()
 
 JudpInterface (JudpSettingsInterface *settings, std::vector< std::string > interfaces)
 
const std::map< uint32_t, std::list< transport::CompressedHeader *> > & getHeaderMap () const
 Accessor to get the value of headerMap. More...
 
bool setHeaderMap (std::map< uint32_t, std::list< transport::CompressedHeader * > > headerMap)
 Accessor to set value of headerMap. More...
 
virtual void run ()
 
virtual void stop ()
 
virtual std::string toString () const
 
virtual void addAckNakCallback (void(*callback)(const AckNakEventArgs &args))
 
virtual void addAckNakCallback (void(*callback)(void *object, const AckNakEventArgs &args), void *object)
 
virtual void removeAckNakCallback (void(*callback)(const AckNakEventArgs &args))
 
virtual void removeAckNakCallback (void(*callback)(void *object, const AckNakEventArgs &args), void *object)
 
- Public Member Functions inherited from openjaus::transport::Interface
 Interface ()
 
virtual ~Interface ()
 
 Interface (InterfaceSettingsInterface *settings)
 
const std::map< WrapperType, system::PriorityQueue *> & getRecvQueues () const
 Accessor to get the value of recvQueues. More...
 
uint16_t getSequenceNumber () const
 Accessor to get the value of sequenceNumber. More...
 
bool setSequenceNumber (uint16_t sequenceNumber)
 Accessor to set value of sequenceNumber. More...
 
system::PriorityQueuegetRecvQueue () const
 Accessor to get the value of recvQueue. More...
 
bool setRecvQueue (system::PriorityQueue *recvQueue)
 Accessor to set value of recvQueue. More...
 
const system::PriorityQueuegetSendQueue () const
 Accessor to get the value of sendQueue. More...
 
const system::ThreadgetRecvThread () const
 Accessor to get the value of recvThread. More...
 
const system::ThreadgetSendThread () const
 Accessor to get the value of sendThread. More...
 
system::NetworkInterfacegetSubsIf () const
 Accessor to get the value of subsIf. More...
 
bool setSubsIf (system::NetworkInterface *subsIf)
 Accessor to set value of subsIf. More...
 
system::NetworkInterfacegetNodeIf () const
 Accessor to get the value of nodeIf. More...
 
bool setNodeIf (system::NetworkInterface *nodeIf)
 Accessor to set value of nodeIf. More...
 
AddressgetAddress () const
 Accessor to get the value of address. More...
 
bool setAddress (Address *address)
 Accessor to set value of address. More...
 
bool send (Wrapper *message)
 Operation send. More...
 
bool open (Address tAddress)
 Operation open. More...
 
bool close ()
 Operation close. More...
 
bool broadcast (Wrapper message)
 Operation broadcast. More...
 
bool setRecvQueue (WrapperType type, system::PriorityQueue *queue)
 Operation setRecvQueue. More...
 
bool checkAddresses (Wrapper *message)
 Operation checkAddresses. More...
 

Protected Member Functions

virtual void * recvThreadMethod ()
 
virtual void * sendThreadMethod ()
 
virtual void sendMessage (Wrapper *wrapper)
 
void receiveJudpPacket (JudpPacket &packet)
 
virtual void handleIncomingAckNakRequest (Wrapper *wrapper)
 
virtual void handleIncomingAck (Wrapper *wrapper)
 
virtual void handleIncomingNak (Wrapper *wrapper)
 
virtual void handleAckSend (Wrapper *ack)
 
virtual void handleNakSend (Wrapper *nak)
 Sends a NAK over the interface. More...
 
virtual void sendDirect (Wrapper *wrapper)
 Sends the Wrapper as is, without any additional processing. More...
 
virtual void sendTo (JudpAddress *address, JudpPacket &packet)
 
virtual void timeoutResend (Wrapper *wrapper)
 
virtual void nakResend (Wrapper *wrapper)
 
virtual void processConfigurationMessage (JudpPacket &packet, Wrapper *wrapper)
 
virtual void processJausMessage (JudpPacket &packet, Wrapper *wrapper)
 
virtual void processOpenJausMessage (JudpPacket &packet, Wrapper *wrapper)
 
- Protected Member Functions inherited from openjaus::transport::Interface
void recvLargeMessage (Wrapper *wrapper)
 
void sendLargeMessage (Wrapper *wrapper)
 
bool messageIsForMe (Wrapper *const wrapper)
 
virtual bool sendInternal (Wrapper *message)
 

Protected Attributes

std::map< uint32_t, std::list< transport::CompressedHeader *> > headerMap
 
- Protected Attributes inherited from openjaus::transport::Interface
std::map< WrapperType, system::PriorityQueue *> recvQueues
 
uint16_t sequenceNumber
 
system::PriorityQueuerecvQueue
 
system::PriorityQueue sendQueue
 
system::Thread recvThread
 
system::Thread sendThread
 
system::NetworkInterfacesubsIf
 
system::NetworkInterfacenodeIf
 
Addressaddress
 
std::map< transport::Address, JausLargeMessageBuffer * > largeMessageMap
 

Private Member Functions

std::list< JudpAddress *> getDestinationAddresses (transport::Wrapper *wrapper)
 
void processMessage (JudpPacket &packet, Wrapper *wrapper)
 
void configureAckNak (Wrapper *wrapper)
 
bool isAckOrNak (Wrapper *wrapper)
 
void storeMessage (Wrapper *wrapper)
 
void handleAckNakTimeout (system::Timer *timer)
 
void cleanupAckNakSupport ()
 
void executeAckNakCallback (const AckNakEventArgs &args)
 
void deleteTimerFromMap (std::map< system::Timer *, transport::AckNakObject *>::iterator &it)
 
void getBroadcastAddresses (std::list< JudpAddress *> &addresses)
 
void getUnicastAddresses (transport::Wrapper *wrapper, std::list< JudpAddress *> &addresses)
 
void getJausUnicastAddresses (transport::Wrapper *wrapper, std::list< JudpAddress *> &addresses)
 
void getConfigurationUnicastAddresses (transport::Wrapper *wrapper, std::list< JudpAddress *> &addresses)
 
void getOpenJausUnicastAddresses (transport::Wrapper *wrapper, std::list< JudpAddress *> &addresses)
 

Static Private Member Functions

static void addBroadcastAddressToList (std::list< JudpAddress *> &addresses, system::InetAddress address)
 

Private Attributes

JudpSettingsInterfacesettings
 
system::Mutex ackNakMutex
 
std::map< uint16_t, AckNakObject * > ackNakMessages
 
std::map< system::Timer *, AckNakObject * > activeTimers
 
std::map< system::Timer *, AckNakObject * > inactiveTimers
 
std::vector< Interface::CallbackackNakCallbacks
 
std::vector< SocketInterface * > socketInterfaces
 
system::Queue< JudpPacket * > socketRxQueue
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const JudpInterface &object)
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const JudpInterface *object)
 

Additional Inherited Members

- Static Public Member Functions inherited from openjaus::transport::Interface
static std::vector< AS5669::JausWrapper * > splitLargeMessage (Wrapper *wrapper)
 

Constructor & Destructor Documentation

§ JudpInterface() [1/2]

openjaus::transport::AS5669::JudpInterface::JudpInterface ( )

§ ~JudpInterface()

openjaus::transport::AS5669::JudpInterface::~JudpInterface ( )
virtual

§ JudpInterface() [2/2]

openjaus::transport::AS5669::JudpInterface::JudpInterface ( JudpSettingsInterface settings,
std::vector< std::string >  interfaces 
)

Member Function Documentation

§ addAckNakCallback() [1/2]

void openjaus::transport::AS5669::JudpInterface::addAckNakCallback ( void(*)(const AckNakEventArgs &args)  callback)
virtual

§ addAckNakCallback() [2/2]

void openjaus::transport::AS5669::JudpInterface::addAckNakCallback ( void(*)(void *object, const AckNakEventArgs &args)  callback,
void *  object 
)
virtual

§ addBroadcastAddressToList()

void openjaus::transport::AS5669::JudpInterface::addBroadcastAddressToList ( std::list< JudpAddress *> &  addresses,
system::InetAddress  address 
)
staticprivate

§ cleanupAckNakSupport()

void openjaus::transport::AS5669::JudpInterface::cleanupAckNakSupport ( )
private

§ configureAckNak()

void openjaus::transport::AS5669::JudpInterface::configureAckNak ( Wrapper wrapper)
private

§ deleteTimerFromMap()

void openjaus::transport::AS5669::JudpInterface::deleteTimerFromMap ( std::map< system::Timer *, transport::AckNakObject *>::iterator &  it)
private

§ executeAckNakCallback()

void openjaus::transport::AS5669::JudpInterface::executeAckNakCallback ( const AckNakEventArgs args)
private

§ getBroadcastAddresses()

void openjaus::transport::AS5669::JudpInterface::getBroadcastAddresses ( std::list< JudpAddress *> &  addresses)
private

§ getConfigurationUnicastAddresses()

void openjaus::transport::AS5669::JudpInterface::getConfigurationUnicastAddresses ( transport::Wrapper wrapper,
std::list< JudpAddress *> &  addresses 
)
private

§ getDestinationAddresses()

std::list< JudpAddress * > openjaus::transport::AS5669::JudpInterface::getDestinationAddresses ( transport::Wrapper wrapper)
private

§ getHeaderMap()

const std::map< uint32_t, std::list< transport::CompressedHeader *> > & openjaus::transport::AS5669::JudpInterface::getHeaderMap ( ) const

§ getJausUnicastAddresses()

void openjaus::transport::AS5669::JudpInterface::getJausUnicastAddresses ( transport::Wrapper wrapper,
std::list< JudpAddress *> &  addresses 
)
private

§ getOpenJausUnicastAddresses()

void openjaus::transport::AS5669::JudpInterface::getOpenJausUnicastAddresses ( transport::Wrapper wrapper,
std::list< JudpAddress *> &  addresses 
)
private

§ getUnicastAddresses()

void openjaus::transport::AS5669::JudpInterface::getUnicastAddresses ( transport::Wrapper wrapper,
std::list< JudpAddress *> &  addresses 
)
private

§ handleAckNakTimeout()

void openjaus::transport::AS5669::JudpInterface::handleAckNakTimeout ( system::Timer timer)
private

§ handleAckSend()

void openjaus::transport::AS5669::JudpInterface::handleAckSend ( Wrapper ack)
protectedvirtual

§ handleIncomingAck()

void openjaus::transport::AS5669::JudpInterface::handleIncomingAck ( Wrapper wrapper)
protectedvirtual

§ handleIncomingAckNakRequest()

void openjaus::transport::AS5669::JudpInterface::handleIncomingAckNakRequest ( Wrapper wrapper)
protectedvirtual

§ handleIncomingNak()

void openjaus::transport::AS5669::JudpInterface::handleIncomingNak ( Wrapper wrapper)
protectedvirtual

§ handleNakSend()

void openjaus::transport::AS5669::JudpInterface::handleNakSend ( Wrapper nak)
protectedvirtual

Sends a NAK over the interface. By default, the NAK is not handled is simply deleted.

Reimplemented from openjaus::transport::Interface.

§ isAckOrNak()

bool openjaus::transport::AS5669::JudpInterface::isAckOrNak ( Wrapper wrapper)
private

§ nakResend()

void openjaus::transport::AS5669::JudpInterface::nakResend ( Wrapper wrapper)
protectedvirtual

§ processConfigurationMessage()

void openjaus::transport::AS5669::JudpInterface::processConfigurationMessage ( JudpPacket packet,
Wrapper wrapper 
)
protectedvirtual

§ processJausMessage()

void openjaus::transport::AS5669::JudpInterface::processJausMessage ( JudpPacket packet,
Wrapper wrapper 
)
protectedvirtual

§ processMessage()

void openjaus::transport::AS5669::JudpInterface::processMessage ( JudpPacket packet,
Wrapper wrapper 
)
private

§ processOpenJausMessage()

void openjaus::transport::AS5669::JudpInterface::processOpenJausMessage ( JudpPacket packet,
Wrapper wrapper 
)
protectedvirtual

§ receiveJudpPacket()

void openjaus::transport::AS5669::JudpInterface::receiveJudpPacket ( JudpPacket packet)
protected

§ recvThreadMethod()

void * openjaus::transport::AS5669::JudpInterface::recvThreadMethod ( )
protectedvirtual

Reimplemented from openjaus::transport::Interface.

§ removeAckNakCallback() [1/2]

void openjaus::transport::AS5669::JudpInterface::removeAckNakCallback ( void(*)(const AckNakEventArgs &args)  callback)
virtual

§ removeAckNakCallback() [2/2]

void openjaus::transport::AS5669::JudpInterface::removeAckNakCallback ( void(*)(void *object, const AckNakEventArgs &args)  callback,
void *  object 
)
virtual

§ run()

void openjaus::transport::AS5669::JudpInterface::run ( )
virtual

Reimplemented from openjaus::transport::Interface.

§ sendDirect()

void openjaus::transport::AS5669::JudpInterface::sendDirect ( Wrapper wrapper)
protectedvirtual

§ sendMessage()

void openjaus::transport::AS5669::JudpInterface::sendMessage ( Wrapper wrapper)
protectedvirtual

§ sendThreadMethod()

void * openjaus::transport::AS5669::JudpInterface::sendThreadMethod ( )
protectedvirtual

Reimplemented from openjaus::transport::Interface.

§ sendTo()

void openjaus::transport::AS5669::JudpInterface::sendTo ( JudpAddress address,
JudpPacket packet 
)
protectedvirtual

§ setHeaderMap()

bool openjaus::transport::AS5669::JudpInterface::setHeaderMap ( std::map< uint32_t, std::list< transport::CompressedHeader * > >  headerMap)
Parameters
headerMapThe value of the new headerMap.

§ stop()

void openjaus::transport::AS5669::JudpInterface::stop ( )
virtual

Reimplemented from openjaus::transport::Interface.

§ storeMessage()

void openjaus::transport::AS5669::JudpInterface::storeMessage ( Wrapper wrapper)
private

§ timeoutResend()

void openjaus::transport::AS5669::JudpInterface::timeoutResend ( Wrapper wrapper)
protectedvirtual

§ toString()

std::string openjaus::transport::AS5669::JudpInterface::toString ( ) const
virtual

Reimplemented from openjaus::transport::Interface.

Friends And Related Function Documentation

§ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const JudpInterface object 
)
friend

§ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const JudpInterface object 
)
friend

Member Data Documentation

§ ackNakCallbacks

std::vector<Interface::Callback> openjaus::transport::AS5669::JudpInterface::ackNakCallbacks
private

§ ackNakMessages

std::map<uint16_t, AckNakObject*> openjaus::transport::AS5669::JudpInterface::ackNakMessages
private

§ ackNakMutex

system::Mutex openjaus::transport::AS5669::JudpInterface::ackNakMutex
private

§ activeTimers

std::map<system::Timer*, AckNakObject*> openjaus::transport::AS5669::JudpInterface::activeTimers
private

§ headerMap

std::map< uint32_t, std::list< transport::CompressedHeader * > > openjaus::transport::AS5669::JudpInterface::headerMap
protected

§ inactiveTimers

std::map<system::Timer*, AckNakObject*> openjaus::transport::AS5669::JudpInterface::inactiveTimers
private

§ settings

JudpSettingsInterface* openjaus::transport::AS5669::JudpInterface::settings
private

§ socketInterfaces

std::vector<SocketInterface *> openjaus::transport::AS5669::JudpInterface::socketInterfaces
private

§ socketRxQueue

system::Queue<JudpPacket *> openjaus::transport::AS5669::JudpInterface::socketRxQueue
private

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