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

Global Dictionary of name/value strings. More...

#include <GlobalDictionary.h>

Public Member Functions

virtual void setInitialEntries (const std::vector< std::pair< fe::String, fe::String >> &entries)
 Initialize Global Dictionary with the given entries. More...
 
virtual bool start (uint16_t receivePort)
 Starts the Global Dictionary with the port for receiving requests. More...
 
virtual void stop (void)
 Stop the Global Dictionary server. More...
 
virtual bool running (void)
 Returns to true if the Global Dictionary server is running. More...
 
virtual void deleteEntriesByID (uint8_t id)
 Delete entries by the given ID. More...
 
virtual void clear ()
 Clears the entire Global Dictionary. More...
 
virtual uint64_t getUpdateCounter ()
 Returns to true if the Global Dictionary server is running. More...
 

Protected Member Functions

virtual void requestThread ()
 
virtual void dictionaryGet (char *nameList, char *nameListEnd, uint16_t responsePort)
 Global dictionary functions. More...
 
virtual void dictionarySet (uint8_t id, char *nameValueList, char *nameValueListEnd, uint16_t responsePort)
 
virtual void dictionaryUnset (char *nameList, char *nameListEnd, uint16_t responsePort)
 
virtual void dictionaryGetRegex (char *nameList, uint16_t responsePort)
 
virtual void dictionaryClear (uint16_t responsePort)
 
virtual void displayDictionary ()
 
void setupSimpleResponse (uint8_t type, uint16_t result)
 
void sendResponseMsg (uint16_t responsePort)
 

Protected Attributes

bool m_initialized
 
bool m_done
 
bool m_running
 
std::vector< uint8_t > m_responseMsg
 
char m_fromIPaddress [16]
 
std::thread * m_requestThread
 
fe::sp< fe::SingleMasterm_spSingleMaster
 
fe::sp< fe::ext::MessageReliableUDPIm_reliableMessageSystem
 
std::map< fe::String, std::pair< uint8_t, fe::String > > m_globalDictionary
 
std::atomic< uint64_t > m_updateCounter
 

Detailed Description

Global Dictionary of name/value strings.

Member Function Documentation

◆ clear()

void beacon::GlobalDictionary::clear ( )
virtual

Clears the entire Global Dictionary.

◆ deleteEntriesByID()

void beacon::GlobalDictionary::deleteEntriesByID ( uint8_t  id)
virtual

Delete entries by the given ID.

◆ dictionaryGet()

void beacon::GlobalDictionary::dictionaryGet ( char *  nameList,
char *  nameListEnd,
uint16_t  responsePort 
)
protectedvirtual

Global dictionary functions.

◆ getUpdateCounter()

virtual uint64_t beacon::GlobalDictionary::getUpdateCounter ( )
inlinevirtual

Returns to true if the Global Dictionary server is running.

◆ running()

bool beacon::GlobalDictionary::running ( void  )
virtual

Returns to true if the Global Dictionary server is running.

◆ setInitialEntries()

void beacon::GlobalDictionary::setInitialEntries ( const std::vector< std::pair< fe::String, fe::String >> &  entries)
virtual

Initialize Global Dictionary with the given entries.

◆ start()

bool beacon::GlobalDictionary::start ( uint16_t  receivePort)
virtual

Starts the Global Dictionary with the port for receiving requests.

References fe::failure(), and fe::Registry::manage().

◆ stop()

void beacon::GlobalDictionary::stop ( void  )
virtual

Stop the Global Dictionary server.


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