MipResources::IPCommModule Class Reference
[Communication module]

IP specification of CommModule. More...

#include <IPCommModule.h>

Inheritance diagram for MipResources::IPCommModule:

MipResources::CommModule MipResources::Resource MIPObject

List of all members.

Public Member Functions

 IPCommModule (int argc, const char *argv[])
 constructor
 ~IPCommModule ()
 constructor
ResourcePlate getPlate () const
 getPlate
void getIPAddr (int robot, IPProtocol proto, string &IPAddr, int &port)
 retrieves an IP address from the robot ID
SenderUDPgetSocket (int robot)
 provides a pointer to the sender object
void IPSendPacketString (string &packetString, SenderUDP *socket)
 physically send a packetString via IP socket
void IPSendPacketString (string &packetString)
 physically send a packetString via IP broadcasting
void IPSendPacketString (CommStoredPacketString &storedPacketString)
 process a storedPacketString for IP sending
void IPReceive ()
 physically receive packetStrings via IP (uses storePacketString) (left public for thread)
void IPSend ()
 physically send all stored packetStrings (left public for thread)
bool sendPacketString (string &packetString, CommNode recipient)
 stores the couple packetString-recipient in a buffer (virtual implementation)

Protected Attributes

Thread _IPThread


Detailed Description

IP specification of CommModule.

Author:
Fabrizio Ramundo and Paolo Stegagno
Examples:

exampleCommModule.cpp.


Constructor & Destructor Documentation

MipResources::IPCommModule::IPCommModule ( int  argc,
const char *  argv[] 
)

constructor

MipResources::IPCommModule::~IPCommModule (  )  [inline]

constructor

destructor


Member Function Documentation

ResourcePlate MipResources::IPCommModule::getPlate (  )  const [inline, virtual]

getPlate

Returns:
plate of the class

Implements MipResources::Resource.

void MipResources::IPCommModule::getIPAddr ( int  robot,
IPProtocol  proto,
string &  IPAddr,
int &  port 
)

retrieves an IP address from the robot ID

Parameters:
[in] robot robot id
[in] proto internet protocol
[out] IPAddr IP address
[out] port listening port
Todo:
private

SenderUDP * MipResources::IPCommModule::getSocket ( int  robot  ) 

provides a pointer to the sender object

Parameters:
robot robot id
Todo:
private

void MipResources::IPCommModule::IPSendPacketString ( string &  packetString,
SenderUDP socket 
)

physically send a packetString via IP socket

Parameters:
packetString string to be sent
socket pointer to the sender object
Todo:
private

void MipResources::IPCommModule::IPSendPacketString ( string &  packetString  ) 

physically send a packetString via IP broadcasting

Parameters:
packetString string to be sent
Todo:
private

void MipResources::IPCommModule::IPSendPacketString ( CommStoredPacketString storedPacketString  ) 

process a storedPacketString for IP sending

Parameters:
storedPacketString couple packetString-recipient to process
Todo:
private

void MipResources::IPCommModule::IPReceive (  ) 

physically receive packetStrings via IP (uses storePacketString) (left public for thread)

void MipResources::IPCommModule::IPSend (  ) 

physically send all stored packetStrings (left public for thread)

bool MipResources::IPCommModule::sendPacketString ( string &  packetString,
CommNode  recipient 
) [virtual]

stores the couple packetString-recipient in a buffer (virtual implementation)

Parameters:
packetString string to be sent
recipient recipient of the packet

Implements MipResources::CommModule.


Member Data Documentation


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

Generated on Mon Feb 20 07:01:12 2017 for MIP by  doxygen 1.5.6