ifw-sup  1.0.0
Classes | Functions | Variables
sup::subsim::common Namespace Reference

Classes

class  ActionMgr
 
class  ActionsDisable
 
class  ActionsEnable
 
class  ActionsInit
 
class  ActionsSetup
 
class  ActionsStd
 
class  ActivityDisabling
 
class  ActivityEnabling
 
class  ActivityInitialising
 
class  ActivitySettingUp
 
class  AppCmdsImpl
 
class  Config
 
class  DataContext
 
class  DbInterface
 
class  IConfig
 
struct  ReplyConfigData
 
class  StdCmdsImpl
 

Functions

template<class EVENT_DONE , class EVENT_ERR >
void EmulateEvent (const IConfig &config, rad::SMAdapter &sm, const std::string cmd, rad::ThreadActivity *activity)
 

Variables

constexpr auto CONFIG_DEFAULT_PROCNAME = "ocfSupervisor"
 
constexpr auto CONFIG_DEFAULT_FILENAME = ""
 
constexpr auto CONFIG_DEFAULT_SCXML_FILENAME = "Supervisor.xml"
 
constexpr auto CONFIG_DEFAULT_LOGLEVEL = "ERROR"
 
constexpr auto CONFIG_DEFAULT_DB_ENDPOINT = "127.0.0.1:6379"
 
constexpr int CONFIG_DEFAULT_DB_TIMEOUT = 2
 
constexpr auto CONFIG_DEFAULT_REQ_ENDPOINT = "tcp://*:5578"
 
constexpr auto CONFIG_DEFAULT_PUB_ENDPOINT = "tcp://*:5568"
 
constexpr unsigned int CONFIG_DEFAULT_CMD_TOUT = 60000
 
constexpr auto CONFIG_COMMAND_INIT = "Init"
 
constexpr auto CONFIG_COMMAND_ENABLE = "Enable"
 
constexpr auto CONFIG_COMMAND_DISABLE = "Disable"
 
constexpr auto CONFIG_COMMAND_SETUP = "Setup"
 
constexpr auto CONFIG_ENVVAR_DBHOST = "DB_HOST"
 
const short SRV_STATE_NOT_OPERATIONAL = 1
 
const short SRV_STATE_OPERATIONAL = 2
 
const short SRV_SUBSTATE_NOTREADY = 1
 
const short SRV_SUBSTATE_READY = 2
 
const short SRV_SUBSTATE_IDLE = 3
 
const short SRV_SUBSTATE_INITIALISING = 4
 
const short SRV_SUBSTATE_ENABLING = 5
 
const short SRV_SUBSTATE_SETTINGUP = 6
 
const short SRV_SUBSTATE_ERROR = 10
 
const std::string SRV_STATE_NOT_OPERATIONAL_STR = "NotOperational"
 
const std::string SRV_STATE_OPERATIONAL_STR = "Operational"
 
const std::string SRV_STATE_UNAVAILABLE_STR = "Unavailable"
 
const std::string SRV_SUBSTATE_NOTREADY_STR = "NotReady"
 
const std::string SRV_SUBSTATE_READY_STR = "Ready"
 
const std::string SRV_SUBSTATE_IDLE_STR = "Idle"
 
const std::string SRV_SUBSTATE_INITIALISING_STR = "Initialising"
 
const std::string SRV_SUBSTATE_ENABLING_STR = "Enabling"
 
const std::string SRV_SUBSTATE_SETTINGUP_STR = "SettingUp"
 
const std::string SRV_SUBSTATE_ERROR_STR = "Error"
 
const std::unordered_map< short, std::string > SrvStateMap
 
const std::unordered_map< std::string, short > SrvStateStrMap
 
const std::unordered_map< short, std::string > SrvSubstateMap
 
const std::unordered_map< std::string, short > SrvSubstateStrMap
 
const std::string KEY_CONTROL_STATE = "state"
 
const std::string KEY_CONTROL_SUBSTATE = "substate"
 
const std::string KEY_CONTROL_STATUS = "status"
 
const std::string KEY_CONTROL_STATE_STR = "state_str"
 
const std::string KEY_CONTROL_SUBSTATE_STR = "substate_str"
 
const std::string KEY_CONFIG_REQ_ENDPOINT = "req_endpoint"
 
const std::string KEY_CONFIG_PUB_ENDPOINT = "pub_endpoint"
 
const std::string KEY_CONFIG_SUB_ENDPOINT = "sub_endpoint"
 
const std::string KEY_CONFIG_EXT_PUB_ENDPOINT = "ext_pub_endpoint"
 
const std::string KEY_CONFIG_EXT_SUB_ENDPOINT = "ext_sub_endpoint"
 
const std::string KEY_CONFIG_DB_ENDPOINT = "db_endpoint"
 
const std::string KEY_CONFIG_DB_TIMEOUT = "db_timeout"
 
const std::string KEY_CONFIG_SM_SCXML = "scxml"
 
const std::string KEY_CONFIG_FILENAME = "filename"
 
const std::string KEY_CONFIG_LOG_LEVEL = "loglevel"
 
const std::string KEY_CONFIG_SERVER_ID = "server_id"
 
const std::string KEY_CONFIG_SERVER = "server"
 
const std::string KEY_CONFIG_COMANDS = "commands"
 
const std::string KEY_CONFIG_CMDTOUT = "cmdtout"
 
const std::string KEY_CONFIG_REPLY_TYPE = "reply_ok"
 
const std::string KEY_CONFIG_REPLY_DELAY = "reply_delay"
 
const std::string KEY_CONFIG_REPLY_ERR_MSG = "reply_error_msg"
 

Function Documentation

◆ EmulateEvent()

template<class EVENT_DONE , class EVENT_ERR >
void sup::subsim::common::EmulateEvent ( const IConfig config,
rad::SMAdapter &  sm,
const std::string  cmd,
rad::ThreadActivity *  activity 
)

Variable Documentation

◆ CONFIG_COMMAND_DISABLE

constexpr auto sup::subsim::common::CONFIG_COMMAND_DISABLE = "Disable"
constexpr

◆ CONFIG_COMMAND_ENABLE

constexpr auto sup::subsim::common::CONFIG_COMMAND_ENABLE = "Enable"
constexpr

◆ CONFIG_COMMAND_INIT

constexpr auto sup::subsim::common::CONFIG_COMMAND_INIT = "Init"
constexpr

◆ CONFIG_COMMAND_SETUP

constexpr auto sup::subsim::common::CONFIG_COMMAND_SETUP = "Setup"
constexpr

◆ CONFIG_DEFAULT_CMD_TOUT

constexpr unsigned int sup::subsim::common::CONFIG_DEFAULT_CMD_TOUT = 60000
constexpr

◆ CONFIG_DEFAULT_DB_ENDPOINT

constexpr auto sup::subsim::common::CONFIG_DEFAULT_DB_ENDPOINT = "127.0.0.1:6379"
constexpr

◆ CONFIG_DEFAULT_DB_TIMEOUT

constexpr int sup::subsim::common::CONFIG_DEFAULT_DB_TIMEOUT = 2
constexpr

◆ CONFIG_DEFAULT_FILENAME

constexpr auto sup::subsim::common::CONFIG_DEFAULT_FILENAME = ""
constexpr

no default value to force user to specify config filename since it overwrites the command line options.

◆ CONFIG_DEFAULT_LOGLEVEL

constexpr auto sup::subsim::common::CONFIG_DEFAULT_LOGLEVEL = "ERROR"
constexpr

◆ CONFIG_DEFAULT_PROCNAME

constexpr auto sup::subsim::common::CONFIG_DEFAULT_PROCNAME = "ocfSupervisor"
constexpr

Default application configuration values.

◆ CONFIG_DEFAULT_PUB_ENDPOINT

constexpr auto sup::subsim::common::CONFIG_DEFAULT_PUB_ENDPOINT = "tcp://*:5568"
constexpr

◆ CONFIG_DEFAULT_REQ_ENDPOINT

constexpr auto sup::subsim::common::CONFIG_DEFAULT_REQ_ENDPOINT = "tcp://*:5578"
constexpr

◆ CONFIG_DEFAULT_SCXML_FILENAME

constexpr auto sup::subsim::common::CONFIG_DEFAULT_SCXML_FILENAME = "Supervisor.xml"
constexpr

◆ CONFIG_ENVVAR_DBHOST

constexpr auto sup::subsim::common::CONFIG_ENVVAR_DBHOST = "DB_HOST"
constexpr

Application configuration environment variables

◆ KEY_CONFIG_CMDTOUT

const std::string sup::subsim::common::KEY_CONFIG_CMDTOUT = "cmdtout"

◆ KEY_CONFIG_COMANDS

const std::string sup::subsim::common::KEY_CONFIG_COMANDS = "commands"

◆ KEY_CONFIG_DB_ENDPOINT

const std::string sup::subsim::common::KEY_CONFIG_DB_ENDPOINT = "db_endpoint"

◆ KEY_CONFIG_DB_TIMEOUT

const std::string sup::subsim::common::KEY_CONFIG_DB_TIMEOUT = "db_timeout"

◆ KEY_CONFIG_EXT_PUB_ENDPOINT

const std::string sup::subsim::common::KEY_CONFIG_EXT_PUB_ENDPOINT = "ext_pub_endpoint"

◆ KEY_CONFIG_EXT_SUB_ENDPOINT

const std::string sup::subsim::common::KEY_CONFIG_EXT_SUB_ENDPOINT = "ext_sub_endpoint"

◆ KEY_CONFIG_FILENAME

const std::string sup::subsim::common::KEY_CONFIG_FILENAME = "filename"

◆ KEY_CONFIG_LOG_LEVEL

const std::string sup::subsim::common::KEY_CONFIG_LOG_LEVEL = "loglevel"

◆ KEY_CONFIG_PUB_ENDPOINT

const std::string sup::subsim::common::KEY_CONFIG_PUB_ENDPOINT = "pub_endpoint"

◆ KEY_CONFIG_REPLY_DELAY

const std::string sup::subsim::common::KEY_CONFIG_REPLY_DELAY = "reply_delay"

◆ KEY_CONFIG_REPLY_ERR_MSG

const std::string sup::subsim::common::KEY_CONFIG_REPLY_ERR_MSG = "reply_error_msg"

◆ KEY_CONFIG_REPLY_TYPE

const std::string sup::subsim::common::KEY_CONFIG_REPLY_TYPE = "reply_ok"

◆ KEY_CONFIG_REQ_ENDPOINT

const std::string sup::subsim::common::KEY_CONFIG_REQ_ENDPOINT = "req_endpoint"

◆ KEY_CONFIG_SERVER

const std::string sup::subsim::common::KEY_CONFIG_SERVER = "server"

◆ KEY_CONFIG_SERVER_ID

const std::string sup::subsim::common::KEY_CONFIG_SERVER_ID = "server_id"

◆ KEY_CONFIG_SM_SCXML

const std::string sup::subsim::common::KEY_CONFIG_SM_SCXML = "scxml"

◆ KEY_CONFIG_SUB_ENDPOINT

const std::string sup::subsim::common::KEY_CONFIG_SUB_ENDPOINT = "sub_endpoint"

◆ KEY_CONTROL_STATE

const std::string sup::subsim::common::KEY_CONTROL_STATE = "state"

◆ KEY_CONTROL_STATE_STR

const std::string sup::subsim::common::KEY_CONTROL_STATE_STR = "state_str"

◆ KEY_CONTROL_STATUS

const std::string sup::subsim::common::KEY_CONTROL_STATUS = "status"

◆ KEY_CONTROL_SUBSTATE

const std::string sup::subsim::common::KEY_CONTROL_SUBSTATE = "substate"

◆ KEY_CONTROL_SUBSTATE_STR

const std::string sup::subsim::common::KEY_CONTROL_SUBSTATE_STR = "substate_str"

◆ SRV_STATE_NOT_OPERATIONAL

const short sup::subsim::common::SRV_STATE_NOT_OPERATIONAL = 1

◆ SRV_STATE_NOT_OPERATIONAL_STR

const std::string sup::subsim::common::SRV_STATE_NOT_OPERATIONAL_STR = "NotOperational"

◆ SRV_STATE_OPERATIONAL

const short sup::subsim::common::SRV_STATE_OPERATIONAL = 2

◆ SRV_STATE_OPERATIONAL_STR

const std::string sup::subsim::common::SRV_STATE_OPERATIONAL_STR = "Operational"

◆ SRV_STATE_UNAVAILABLE_STR

const std::string sup::subsim::common::SRV_STATE_UNAVAILABLE_STR = "Unavailable"

◆ SRV_SUBSTATE_ENABLING

const short sup::subsim::common::SRV_SUBSTATE_ENABLING = 5

◆ SRV_SUBSTATE_ENABLING_STR

const std::string sup::subsim::common::SRV_SUBSTATE_ENABLING_STR = "Enabling"

◆ SRV_SUBSTATE_ERROR

const short sup::subsim::common::SRV_SUBSTATE_ERROR = 10

◆ SRV_SUBSTATE_ERROR_STR

const std::string sup::subsim::common::SRV_SUBSTATE_ERROR_STR = "Error"

◆ SRV_SUBSTATE_IDLE

const short sup::subsim::common::SRV_SUBSTATE_IDLE = 3

◆ SRV_SUBSTATE_IDLE_STR

const std::string sup::subsim::common::SRV_SUBSTATE_IDLE_STR = "Idle"

◆ SRV_SUBSTATE_INITIALISING

const short sup::subsim::common::SRV_SUBSTATE_INITIALISING = 4

◆ SRV_SUBSTATE_INITIALISING_STR

const std::string sup::subsim::common::SRV_SUBSTATE_INITIALISING_STR = "Initialising"

◆ SRV_SUBSTATE_NOTREADY

const short sup::subsim::common::SRV_SUBSTATE_NOTREADY = 1

◆ SRV_SUBSTATE_NOTREADY_STR

const std::string sup::subsim::common::SRV_SUBSTATE_NOTREADY_STR = "NotReady"

◆ SRV_SUBSTATE_READY

const short sup::subsim::common::SRV_SUBSTATE_READY = 2

◆ SRV_SUBSTATE_READY_STR

const std::string sup::subsim::common::SRV_SUBSTATE_READY_STR = "Ready"

◆ SRV_SUBSTATE_SETTINGUP

const short sup::subsim::common::SRV_SUBSTATE_SETTINGUP = 6

◆ SRV_SUBSTATE_SETTINGUP_STR

const std::string sup::subsim::common::SRV_SUBSTATE_SETTINGUP_STR = "SettingUp"

◆ SrvStateMap

const std::unordered_map<short, std::string> sup::subsim::common::SrvStateMap

◆ SrvStateStrMap

const std::unordered_map<std::string, short> sup::subsim::common::SrvStateStrMap

◆ SrvSubstateMap

const std::unordered_map<short, std::string> sup::subsim::common::SrvSubstateMap

◆ SrvSubstateStrMap

const std::unordered_map<std::string, short> sup::subsim::common::SrvSubstateStrMap
sup::subsim::common::SRV_SUBSTATE_SETTINGUP_STR
const std::string SRV_SUBSTATE_SETTINGUP_STR
Definition: dataContext.hpp:49
sup::subsim::common::SRV_SUBSTATE_ENABLING
const short SRV_SUBSTATE_ENABLING
Definition: dataContext.hpp:36
sup::subsim::common::SRV_SUBSTATE_SETTINGUP
const short SRV_SUBSTATE_SETTINGUP
Definition: dataContext.hpp:37
sup::subsim::common::SRV_SUBSTATE_IDLE_STR
const std::string SRV_SUBSTATE_IDLE_STR
Definition: dataContext.hpp:46
sup::subsim::common::SRV_SUBSTATE_READY_STR
const std::string SRV_SUBSTATE_READY_STR
Definition: dataContext.hpp:45
sup::subsim::common::SRV_SUBSTATE_ERROR
const short SRV_SUBSTATE_ERROR
Definition: dataContext.hpp:38
sup::subsim::common::SRV_STATE_NOT_OPERATIONAL_STR
const std::string SRV_STATE_NOT_OPERATIONAL_STR
Definition: dataContext.hpp:40
sup::subsim::common::SRV_SUBSTATE_ENABLING_STR
const std::string SRV_SUBSTATE_ENABLING_STR
Definition: dataContext.hpp:48
sup::subsim::common::SRV_STATE_NOT_OPERATIONAL
const short SRV_STATE_NOT_OPERATIONAL
Definition: dataContext.hpp:28
sup::subsim::common::SRV_STATE_OPERATIONAL_STR
const std::string SRV_STATE_OPERATIONAL_STR
Definition: dataContext.hpp:41
sup::subsim::common::SRV_SUBSTATE_ERROR_STR
const std::string SRV_SUBSTATE_ERROR_STR
Definition: dataContext.hpp:50
sup::subsim::common::SRV_SUBSTATE_IDLE
const short SRV_SUBSTATE_IDLE
Definition: dataContext.hpp:34
sup::subsim::common::SRV_SUBSTATE_INITIALISING_STR
const std::string SRV_SUBSTATE_INITIALISING_STR
Definition: dataContext.hpp:47
sup::subsim::common::SRV_SUBSTATE_NOTREADY
const short SRV_SUBSTATE_NOTREADY
Definition: dataContext.hpp:32
sup::subsim::common::SRV_SUBSTATE_INITIALISING
const short SRV_SUBSTATE_INITIALISING
Definition: dataContext.hpp:35
sup::subsim::common::SRV_SUBSTATE_READY
const short SRV_SUBSTATE_READY
Definition: dataContext.hpp:33
sup::subsim::common::SRV_STATE_OPERATIONAL
const short SRV_STATE_OPERATIONAL
Definition: dataContext.hpp:29
sup::subsim::common::SRV_SUBSTATE_NOTREADY_STR
const std::string SRV_SUBSTATE_NOTREADY_STR
Definition: dataContext.hpp:44