Public Types | Public Member Functions
RouteTcpHeader Class Reference

Brief description of class still missing. More...

#include <RouteTcpHeader.h>

Inheritance diagram for RouteTcpHeader:
WaranCore::TcpHeader

List of all members.

Public Types

enum  BlockType {
  TestLeaderNegociation, MeasureResetBallast, MeasureKeepBallast, MeasureIncreaseBallast,
  SendLoadToSecond, SendLoadToLeader, MeasureResultToLeader, InfoToSecond,
  InfoToLeader, TestNow, ForwardAddRouteFromMaster, ForwardRemoveRouteFromMaster
}

Public Member Functions

 RouteTcpHeader (BlockType type)
 RouteTcpHeader (const RouteTcpHeader &o)
std::string time () const

Detailed Description

Brief description of class still missing.

Implements a serial number to tag all packets and trace bugs in logs.


Member Enumeration Documentation

Enumerator:
TestLeaderNegociation 
MeasureResetBallast 
MeasureKeepBallast 
MeasureIncreaseBallast 
SendLoadToSecond 
SendLoadToLeader 
MeasureResultToLeader 
InfoToSecond 
InfoToLeader 
TestNow 
ForwardAddRouteFromMaster 
ForwardRemoveRouteFromMaster 

Constructor & Destructor Documentation

Description of constructor still missing

References time().

    : TcpHeader(ROUTE_TCP_VERSION, type)
{
  time_t t;
  ::time(&t);
  _time=t; // for 64-bit platforms time_t is 64-bit long
           // force cast to int (32 bit) to allow communication
           // between all types of processors.
}

Member Function Documentation

std::string RouteTcpHeader::time ( ) const

Referenced by LinkBuffer::bytesAvailable(), and RouteTcpHeader().

{
  if(Log::verbosity()>=9) {
    char buffer[32];
    time_t t=_time;
    strftime(buffer, 32, ":%H:%M:%S", gmtime(&t));
    return buffer;
  } else {
    return std::string();
  }
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines