#include <PubSubSubspace.h>
Public Member Functions | |
| PubSubSubspace (PubSubSubspaceId id) | |
| Creates a new PubSubSubspace. | |
| ~PubSubSubspace () | |
| const PubSubSubspaceId & | getId () |
| 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) |
Definition at line 33 of file PubSubSubspace.h.
| PubSubSubspace::PubSubSubspace | ( | PubSubSubspaceId | id | ) |
Creates a new PubSubSubspace.
| id | The group ID of the new group |
Definition at line 29 of file PubSubSubspace.cc.
: spaceId(id) { responsibleNode = NodeHandle::UNSPECIFIED_NODE; lastTimestamp = 0; }
| PubSubSubspace::~PubSubSubspace | ( | ) |
Definition at line 35 of file PubSubSubspace.cc.
{
}
| const PubSubSubspaceId& PubSubSubspace::getId | ( | ) | [inline] |
Definition at line 49 of file PubSubSubspace.h.
Referenced by PubSubLobby::failedNode(), PubSubLobby::handleJoin(), PubSubMMOG::handlePingCallTimeout(), PubSubLobby::handleRespCall(), PubSubMMOG::publishEvents(), PubSubMMOG::takeOverSubspace(), and PubSubMMOG::unsubscribeChild().
{ return spaceId; }
| simtime_t PubSubSubspace::getLastTimestamp | ( | ) | [inline] |
Definition at line 55 of file PubSubSubspace.h.
{ return lastTimestamp; }
| NodeHandle PubSubSubspace::getResponsibleNode | ( | ) | [inline] |
Definition at line 51 of file PubSubSubspace.h.
Referenced by PubSubLobby::failedNode(), PubSubLobby::handleJoin(), PubSubMMOG::handleMove(), PubSubMMOG::handleSubscriptionBackup(), and PubSubMMOG::takeOverSubspace().
{ return responsibleNode; }
| simtime_t PubSubSubspace::getTimeSinceLastTimestamp | ( | ) | [inline] |
Definition at line 56 of file PubSubSubspace.h.
{ return simTime() - lastTimestamp; }
| void PubSubSubspace::setResponsibleNode | ( | NodeHandle | node | ) | [inline] |
Definition at line 50 of file PubSubSubspace.h.
Referenced by PubSubLobby::failedNode(), PubSubMMOG::handleBackupCall(), PubSubMMOG::handleJoinResponse(), PubSubLobby::replaceResponsibleNode(), and PubSubMMOG::takeOverSubspace().
{ responsibleNode = node; }
| void PubSubSubspace::setTimestamp | ( | simtime_t | stamp | ) | [inline] |
Definition at line 54 of file PubSubSubspace.h.
{ lastTimestamp = stamp; }
| void PubSubSubspace::setTimestamp | ( | ) | [inline] |
Definition at line 53 of file PubSubSubspace.h.
{ lastTimestamp = simTime(); }
| 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;
}
simtime_t PubSubSubspace::lastTimestamp [protected] |
Definition at line 39 of file PubSubSubspace.h.
Referenced by getLastTimestamp(), getTimeSinceLastTimestamp(), PubSubSubspace(), and setTimestamp().
NodeHandle PubSubSubspace::responsibleNode [protected] |
Definition at line 37 of file PubSubSubspace.h.
Referenced by getResponsibleNode(), operator<<(), PubSubSubspace(), and setResponsibleNode().
PubSubSubspaceId PubSubSubspace::spaceId [protected] |
Definition at line 36 of file PubSubSubspace.h.
Referenced by getId(), and operator<<().
1.7.1