Free Electron
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
beacon::BeaconServer Class Reference

Node registration and simulation time syncronization. More...

#include <BeaconServer.h>

Inheritance diagram for beacon::BeaconServer:
Inheritance graph
[legend]

Public Member Functions

virtual bool startup (const char *fileName)
 
virtual bool start (uint16_t beaconPort, uint16_t gdPort) override
 
virtual void stop () override
 
virtual bool running () override
 
void getList (std::list< NodeEntry > &registeredNodes)
 

Protected Attributes

GlobalDictionary m_globalDictionary
 

Private Member Functions

void registrationThread ()
 
void add (const uint32_t ipAddress, const uint16_t replyPort)
 
void remove (const uint32_t ipAddress)
 
void remove (const uint8_t id)
 
void keepAlive (const uint32_t id)
 
void sendTimeResponse (const int64_t time, const int64_t estBeaconTime, const uint16_t port)
 
void sendKeepAliveResponse (const uint16_t port)
 
void sendUpdatedList ()
 
void sendListMsgToAll (const fe::ext::Messagegram &msg)
 
void checkForDeadNodes ()
 
int64_t getCurrentTime ()
 
void displayList ()
 
void clearList ()
 

Private Attributes

bool m_initialized
 
std::atomic< bool > m_done
 
std::atomic< bool > m_running
 
uint8_t m_id
 
std::thread * m_registeringThread
 
fe::sp< fe::SingleMasterm_spSingleMaster
 
fe::sp< fe::ext::MessageIm_recMsgSystem
 
fe::sp< fe::ext::MessageIm_sendMsgSystem
 
std::list< NodeEntry > m_registeredNodes
 
std::mutex m_nodeListMutex
 
fe::ext::Messagegram m_listMsg
 
fe::ext::Messagegram m_timeMsg
 
fe::ext::Messagegram m_respMsg
 

Detailed Description

Node registration and simulation time syncronization.


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