|
neic-glass3
1.4.6
|
glasscore detection node class The detection fabric consists of a collection of nets which in turn contain a list of nodes, each of which is capable of detecting and nucleating a new event. The individual nets are added to the detection fabric (CWeb) by such commands as 'Grid' or 'Global'. More...
#include <WebList.h>

Public Member Functions | |
| CWebList (int numThreads=0) | |
| CWebList constructor. More... | |
| ~CWebList () | |
| CWebList destructor. More... | |
| void | clear () |
| CWebList clear function. More... | |
| bool | receiveExternalMessage (std::shared_ptr< json::Object > com) |
| CWebList communication receiving function. More... | |
| bool | addWeb (std::shared_ptr< json::Object > com) |
| Add web ('Grid', etc) to list using provided configuration. More... | |
| bool | removeWeb (std::shared_ptr< json::Object > com) |
| Remove web ('Grid', etc) from list by name. More... | |
| void | updateSite (std::shared_ptr< CSite > site) |
| Update a site in the webs This function updates the given site in all appropriate webs in the list of webs. More... | |
| bool | hasSite (std::shared_ptr< CSite > site) |
| Check if the webs have a site This function checks to see if the given site is used in any web in the list. More... | |
| bool | healthCheck () |
| check to see if each web thread is still functional More... | |
| const CSiteList * | getSiteList () const |
| Get the CSiteList pointer used by this web list for site lookups. More... | |
| void | setSiteList (CSiteList *siteList) |
| Set the CSiteList pointer used by this web list for site lookups. More... | |
| std::shared_ptr< CWeb > | getControllingWeb (double dLat, double dLon) |
| Get controlling web for coordinates. More... | |
| int | size () const |
| Get the current size of the web list. More... | |
glasscore detection node class The detection fabric consists of a collection of nets which in turn contain a list of nodes, each of which is capable of detecting and nucleating a new event. The individual nets are added to the detection fabric (CWeb) by such commands as 'Grid' or 'Global'.
CWebList uses smart pointers (std::shared_ptr).
|
explicit |
CWebList constructor.
| glasscore::CWebList::~CWebList | ( | ) |
CWebList destructor.
| bool glasscore::CWebList::addWeb | ( | std::shared_ptr< json::Object > | com | ) |
Add web ('Grid', etc) to list using provided configuration.
This method creates a web and then configures it by passing the configuration to the 'dispatch' message in the CWeb
This capability is to add a local aftershock (or induced seismicity) web quickly (and without restarting anything) after a main shock, and then to remove it (again without a restart) once the seismicity dies down, through some glass configuration control channel (i.e. kafka). The belief going forward is that this will be a relatively common occurrence.
| com | - A pointer to a json::object containing the web configuration |
| void glasscore::CWebList::clear | ( | ) |
| std::shared_ptr< CWeb > glasscore::CWebList::getControllingWeb | ( | double | dLat, |
| double | dLon | ||
| ) |
Get controlling web for coordinates.
This function returns the controlling web based on the provided coordinates
| dLat | - A double containing the latitude to use |
| dLon | - A double containing the longitude to use |
| const CSiteList * glasscore::CWebList::getSiteList | ( | ) | const |
| bool glasscore::CWebList::hasSite | ( | std::shared_ptr< CSite > | site | ) |
Check if the webs have a site This function checks to see if the given site is used in any web in the list.
| site | - A shared pointer to a CSite object containing the site to check |
| bool glasscore::CWebList::healthCheck | ( | ) |
check to see if each web thread is still functional
Checks each web thread to see if it is still responsive.
| bool glasscore::CWebList::receiveExternalMessage | ( | std::shared_ptr< json::Object > | com | ) |
CWebList communication receiving function.
The function used by CWebList to receive communication (such as configuration or input data), from outside the glasscore library, or it's parent CGlass.
Supports Global (generate global grid) Shell (generate grid at single depth), Grid (generate local grid), Single (generate single node), GetWeb (generate output message detailing detection graph database) inputs.
| com | - A pointer to a json::object containing the communication. |
| bool glasscore::CWebList::removeWeb | ( | std::shared_ptr< json::Object > | com | ) |
Remove web ('Grid', etc) from list by name.
This method removes a web from the list
This capability is to add a local aftershock (or induced seismicity) web quickly (and without restarting anything) after a main shock, and then to remove it (again without a restart) once the seismicity dies down, through some glass configuration control channel (i.e. kafka). The belief going forward is that this will be a relatively common occurrence.
| com | - A pointer to a json::object containing name of the web to be removed. |
| void glasscore::CWebList::setSiteList | ( | CSiteList * | siteList | ) |
| int glasscore::CWebList::size | ( | ) | const |
Get the current size of the web list.
| void glasscore::CWebList::updateSite | ( | std::shared_ptr< CSite > | site | ) |
Update a site in the webs This function updates the given site in all appropriate webs in the list of webs.
| site | - A shared_ptr to a CSite object containing the site to add |
1.8.11