Hermes SDK Documentation
Classes | Public Member Functions | Static Public Member Functions | List of all members
HermesSDK::Hive Class Reference

Public Member Functions

 Hive (hiveNodeCallback &_onNodeFound, hiveNodeCallback &_onLocalNodeFound, hiveNodeCallback &_onNodeRemoved)
 
 Hive (const Hive &)=delete
 
Hiveoperator= (const Hive &)=delete
 
void Configure (std::string _name, bool _useLoopback=true, int _beaconPort=(int) Hermes::Protocol::DefaultPorts::HivePort, int _broadcastIntervalInSeconds=1, int _deadNodeTimeoutInSeconds=10)
 
void Join ()
 
void Stop ()
 

Static Public Member Functions

static void CleanEnvironmentVariables ()
 support function to remove environment variables from the runtime environment for running the SDK More...
 
static void CleanEnvironmentVariable (std::wstring p_EnvironmentVariable)
 support function to remove an environment variable from the runtime environment for running the SDK More...
 
static bool DoesEnvironmentVariableExist (std::wstring p_EnvironmentVariable)
 
static std::unique_ptr< HiveFindCoordinator (std::string _name, int _beaconPort, hiveNodeCallback &_onNodeFound, hiveNodeCallback &_onLocalNodeFound, hiveNodeCallback &_onNodeRemoved, bool _useLoopback)
 
static std::unique_ptr< HiveFindLocalCoordinator (std::string _name, int _beaconPort, hiveNodeCallback &_onNodeFound, hiveNodeCallback &_onLocalNodeFound, hiveNodeCallback &_onNodeRemoved)
 
static std::unique_ptr< HiveFindNetworkCoordinator (std::string _name, int _beaconPort, hiveNodeCallback &_onNodeFound, hiveNodeCallback &_onLocalNodeFound, hiveNodeCallback &_onNodeRemoved)
 

Member Function Documentation

◆ CleanEnvironmentVariable()

void HermesSDK::Hive::CleanEnvironmentVariable ( std::wstring  p_EnvironmentVariable)
static

support function to remove an environment variable from the runtime environment for running the SDK

Parameters
p_EnvironmentVariable

◆ CleanEnvironmentVariables()

void HermesSDK::Hive::CleanEnvironmentVariables ( )
static

support function to remove environment variables from the runtime environment for running the SDK

◆ FindCoordinator()

std::unique_ptr< Hive > HermesSDK::Hive::FindCoordinator ( std::string  _name,
int  _beaconPort,
hiveNodeCallback &  _onAnyNodeFound,
hiveNodeCallback &  _onLocalNodeFound,
hiveNodeCallback &  _onNodeRemoved,
bool  _useLoopback 
)
static

Finds a Hermes instance. Searches the local network for running instances of Hermes.

Parameters
_nameName to give the returned Hive when it is created
_beaconPortUDP port to search for broadcasting Hermes instances on. Hermes is internally defaulted to 9999
_onAnyNodeFoundCallback function, called when a Hermes instance is found on the local network
_onLocalNodeFoundCallback function, called when a Hermes instance is found on the local PC
_onNodeRemovedCallback function, called when a node goes away
Returns
A Hive instance, whose coordinator can be used for the Caretaker Connect() function

◆ FindLocalCoordinator()

std::unique_ptr< Hive > HermesSDK::Hive::FindLocalCoordinator ( std::string  _name,
int  _beaconPort,
hiveNodeCallback &  _onAnyNodeFound,
hiveNodeCallback &  _onLocalNodeFound,
hiveNodeCallback &  _onNodeRemoved 
)
static

Finds a Hermes instance. Searches the local PC for running instances of Hermes.

Parameters
_nameName to give the returned Hive when it is created
_beaconPortUDP port to search for broadcasting Hermes instances on. Hermes is internally defaulted to 9999
_onAnyNodeFoundCallback function, called when a Hermes instance is found on the local network
_onLocalNodeFoundCallback function, called when a Hermes instance is found on the local PC
_onNodeRemovedCallback function, called when a node goes away
Returns
A Hive instance, whose coordinator can be used for the Caretaker Connect() function

◆ FindNetworkCoordinator()

std::unique_ptr< Hive > HermesSDK::Hive::FindNetworkCoordinator ( std::string  _name,
int  _beaconPort,
hiveNodeCallback &  _onAnyNodeFound,
hiveNodeCallback &  _onLocalNodeFound,
hiveNodeCallback &  _onNodeRemoved 
)
static

Finds a network Hermes instance. Searches the network for running instances of Hermes.

Parameters
_nameName to give the returned Hive when it is created
_beaconPortUDP port to search for broadcasting Hermes instances on. Hermes is internally defaulted to 9999
_onAnyNodeFoundCallback function, called when a Hermes instance is found on the local network
_onLocalNodeFoundCallback function, called when a Hermes instance is found on the local PC
_onNodeRemovedCallback function, called when a node goes away
Returns
A Hive instance, whose coordinator can be used for the Caretaker Connect() function

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