class CAVERNnet_mcast_c : public CAVERNnet_socketbase_c

Multicast Class

Inheritance:


Public Methods

void close ()
Close the connection
int init (char *mcastGroup, int port, int mttl = CAVERNnet_mcast_c::maxTTL)
Open a connection to the multicast IP address
int send (char *, int)
Broadcast a message to the group
int receive (char *, int)
Receive a message from the group.
void printInfo ()
Print info on the current mcast connection.
void makeNonBlocking ()
Tell mcast to use non-blocking data transfer.
unsigned long getReceiveIP ()
Get the IP address of the last message received
void getReceiveIP (char *clientIP)
Same thing except it returns a string */
void enableInstrumentation ()
Enable the logging of latency and inter-message delay
void disableInstrumentation ()
Disable the logging of latency and inter-message delay

Public


static const int OK
Status ok.
static const int FAILED
Status failed.

Accessor Functions
unsigned long getSelfIP ()
Get your own IP.
void getSelfIP (char *ip)
Get your own IP.
unsigned long getSendIP ()
Get outgoing packet's destination address.
void getSendIP (char *ip)
Get outgoing packet's destination address.
unsigned short getSelfPort ()
Get your own port.
unsigned short getSendPort ()
Get outgoing port.
unsigned short getReceivePort ()
Get incoming port.

Inherited from CAVERNnet_socketbase_c:

Public Methods

static int hostnameToIP(char *hostname, char* hostIP)
static void ipNumToString(unsigned int ip, char *ipstring)
static double getTimeInSecs()
static void getHostName(char *name, int len)
static void expandHostName(char *src, char *newname, int len)
unsigned int getTotalDataSent()
unsigned int getTotalDataRead()
double getInstantReceiveBandwidth()
double getInstantSendBandwidth()
double getAverageReceiveBandwidth()
double getAverageSendBandwidth()
void setInstantLatency(double lat)
double getInstantLatency()
double getAverageLatency()
double getMaxLatency()
double getMinLatency()
void incrementDataSent(unsigned long size)
void incrementDataRead(unsigned long size)
double getInstantInterMesgDelay()
double getMaxInterMesgDelay()
double getMinInterMesgDelay()
double getAverageInterMesgDelay()
double getSTABandwidth()
double getSTALatency()
double getBurstiness()
double getJitter()
unsigned long getPacketsRead()
unsigned long getPacketsSent()
virtual int getSocketId()
int selectSock(void *ptr, int *status, int numSocks, struct timeval *timeout)

Protected Methods

void computeInstantSendBandwidth()
void computeInstantReceiveBandwidth()
void computeAverageReceiveBandwidth()
void computeAverageSendBandwidth()
void calculateJitter(double lat)
void calculateBurstiness(double bw)

Documentation

Multicast Class. This class bypasses CAVERN's standard method for establishing connections and provides the user with direct control of multicast connections.

void enableInstrumentation()
Enable the logging of latency and inter-message delay. Note: in order for this to work, all clients that subscribe to the same multicast address must also enable their instrumentation or else the bit stream will become confused. Enabling logging prepends timestamp data that is used to compute latency. By default instrumentation is disabled except for Bandwidth measurements.

void disableInstrumentation()
Disable the logging of latency and inter-message delay. Note: in order for this to work, all clients that subscribe to the same multicast address must also disable their instrumentation or else the bit stream will become confused. By default instrumentation is disabled except for Bandwith measurements.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de