OverSim
PubSubSubspace Class Reference

#include <PubSubSubspace.h>

Inheritance diagram for PubSubSubspace:
PubSubSubspaceIntermediate PubSubSubspaceLobby PubSubSubspaceResponsible

Public Member Functions

 PubSubSubspace (PubSubSubspaceId id)
 Creates a new PubSubSubspace.
 ~PubSubSubspace ()
const PubSubSubspaceIdgetId ()
void setResponsibleNode (NodeHandle node)
NodeHandle getResponsibleNode ()
void setTimestamp ()
void setTimestamp (simtime_t stamp)
simtime_t getLastTimestamp ()
simtime_t getTimeSinceLastTimestamp ()

Protected Attributes

PubSubSubspaceId spaceId
NodeHandle responsibleNode
simtime_t lastTimestamp

Friends

std::ostream & operator<< (std::ostream &o, const PubSubSubspace &subspace)

Detailed Description

Definition at line 33 of file PubSubSubspace.h.

Constructor & Destructor Documentation

PubSubSubspace::PubSubSubspace ( PubSubSubspaceId  id)

Creates a new PubSubSubspace.

Parameters
idThe group ID of the new group

Definition at line 29 of file PubSubSubspace.cc.

PubSubSubspace::~PubSubSubspace ( )

Definition at line 35 of file PubSubSubspace.cc.

{
}

Member Function Documentation

simtime_t PubSubSubspace::getLastTimestamp ( )
inline

Definition at line 55 of file PubSubSubspace.h.

{ return lastTimestamp; }
simtime_t PubSubSubspace::getTimeSinceLastTimestamp ( )
inline

Definition at line 56 of file PubSubSubspace.h.

{ return simTime() - lastTimestamp; }
void PubSubSubspace::setTimestamp ( )
inline

Definition at line 53 of file PubSubSubspace.h.

{ lastTimestamp = simTime(); }
void PubSubSubspace::setTimestamp ( simtime_t  stamp)
inline

Definition at line 54 of file PubSubSubspace.h.

{ lastTimestamp = stamp; }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const PubSubSubspace subspace 
)
friend

Definition at line 39 of file PubSubSubspace.cc.

{
o << "Id: " << subspace.spaceId << " responsible: " << subspace.responsibleNode;
return o;
}

Member Data Documentation

simtime_t PubSubSubspace::lastTimestamp
protected
NodeHandle PubSubSubspace::responsibleNode
protected
PubSubSubspaceId PubSubSubspace::spaceId
protected

Definition at line 36 of file PubSubSubspace.h.

Referenced by getId(), and operator<<().


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