Mixe for Privacy and Anonymity in the Internet
Classes | Macros | Typedefs | Enumerations | Functions
monitoringDefs.h File Reference

Go to the source code of this file.

Classes

struct  event
 
struct  state
 

Macros

#define STATUS_FLAG(status_type)   (1<<(unsigned int)status_type)
 All state and transition definitions can be found here The server monitoring observes different states for multiple status types. More...
 
#define FIRST_STATUS   0
 
#define FIRST_EVENT   0
 
#define ENTRY_STATE   0
 
#define DOM_ELEMENT_STATUS_MESSAGE_NAME   "StatusMessage"
 
#define DOM_ELEMENT_STATE_NAME   "State"
 
#define DOM_ELEMENT_STATE_LEVEL_NAME   "StateLevel"
 
#define DOM_ELEMENT_STATE_DESCRIPTION_NAME   "StateDescription"
 
#define MAX_DESCRIPTION_LENGTH   50
 
#define MONITORING_SERVER_PORT   8080
 
#define XML_STATUS_MESSAGE_MAX_SIZE   3000
 
#define XML_STATUS_MESSAGE_START   "<StatusMessage>"
 
#define HTTP_ANSWER_PREFIX_FORMAT   "HTTP/1.1 200 OK\nContent-Length: %u\nConnection: close\nContent-Type: text/xml; charset=UTF-8\n\n"
 
#define HTTP_ANSWER_PREFIX_MAX_LENGTH   100
 
#define EVER   1
 
#define NR_STATUS_TYPES   stat_all
 
#define NETWORKING_STATUS_NAME   "NetworkingStatus"
 
#define NR_NETWORKING_STATES   st_net_overall
 
#define NR_NETWORKING_EVENTS   ev_net_overall
 
#define SYSTEM_STATUS_NAME   "SystemStatus"
 
#define NR_SYSTEM_STATES   st_sys_overall
 
#define NR_SYSTEM_EVENTS   ev_sys_overall
 
#define NR_STATE_LEVELS   stl_all
 
#define FINISH_STATE_DEFINITIONS(state_array)
 helper macros for defining states and events: More...
 
#define FINISH_EVENT_DEFINITIONS(event_array)
 
#define FINISH_NETWORKING_STATE_DEFINITIONS(state_array)
 
#define FINISH_NETWORKING_EVENT_DEFINITIONS(event_array)
 
#define FINISH_PAYMENT_STATE_DEFINITIONS(state_array)
 
#define FINISH_PAYMENT_EVENT_DEFINITIONS(event_array)
 
#define FINISH_SYSTEM_STATE_DEFINITIONS(state_array)
 
#define FINISH_SYSTEM_EVENT_DEFINITIONS(event_array)
 
#define NET_STATE_DEF(state_array, state_type, description, transitions, stateLevel)    STATE_DEF(state_array, stat_networking, state_type, description, transitions, stateLevel)
 
#define NET_EVENT_DEF(event_array, event_type, description)    EVENT_DEF(event_array, stat_networking, event_type, description)
 
#define PAY_STATE_DEF(state_array, state_type, description, transitions, stateLevel)
 
#define PAY_EVENT_DEF(event_array, event_type, description)
 
#define SYS_STATE_DEF(state_array, state_type, description, transitions, stateLevel)    STATE_DEF(state_array, stat_system, state_type, description, transitions, stateLevel)
 
#define SYS_EVENT_DEF(event_array, event_type, description)    EVENT_DEF(event_array, stat_system, event_type, description)
 
#define STATE_DEF(state_array, status_type, state_type, description, transitions, stateLevel)
 
#define EVENT_DEF(event_array, status_type, event_type, description)    event_array[status_type][event_type]->ev_description = (char *) description;
 
#define TRANS_NET_ENTRY
 NETWORKING STATE TRANSITIONS. More...
 
#define TRANS_NET_FIRST_MIX_INIT
 
#define TRANS_NET_FIRST_MIX_CONNECTED_TO_NEXT
 
#define TRANS_NET_FIRST_MIX_ONLINE
 
#define TRANS_NET_MIDDLE_MIX_INIT
 
#define TRANS_NET_MIDDLE_MIX_CONNECTED_TO_PREV
 
#define TRANS_NET_MIDDLE_MIX_CONNECTED_TO_NEXT
 
#define TRANS_NET_MIDDLE_MIX_ONLINE
 
#define TRANS_NET_LAST_MIX_INIT
 
#define TRANS_NET_LAST_MIX_CONNECTED_TO_PREV
 
#define TRANS_NET_LAST_MIX_ONLINE
 
#define TRANS_SYS_ENTRY
 SYSTEM STATE TRANSITIONS. More...
 
#define TRANS_SYS_INITIALIZING
 
#define TRANS_SYS_OPERATING
 
#define TRANS_SYS_RESTARTING
 
#define TRANS_SYS_SHUTTING_DOWN
 
#define TRANS_SYS_SHUTTING_DOWN_AFTER_SEG_FAULT    (defineTransitions(stat_system, 0))
 

Typedefs

typedef enum state_type state_type_t
 
typedef enum status_type status_type_t
 
typedef enum state_type transition_t
 
typedef enum event_type event_type_t
 
typedef enum state_level state_level_t
 
typedef struct state state_t
 
typedef struct event event_t
 

Enumerations

enum  status_type { stat_undef = -1 , stat_networking = 0 , stat_system , stat_all }
 
enum  state_type {
  st_ignore = -1 , st_net_entry = 0 , st_net_firstMixInit , st_net_firstMixConnectedToNext ,
  st_net_firstMixOnline , st_net_middleMixInit , st_net_middleMixConnectedToPrev , st_net_middleMixConnectedToNext ,
  st_net_middleMixOnline , st_net_lastMixInit , st_net_lastMixConnectedToPrev , st_net_lastMixOnline ,
  st_net_overall , st_sys_entry = 0 , st_sys_initializing , st_sys_operating ,
  st_sys_restarting , st_sys_shuttingDown , st_sys_ShuttingDownAfterSegFault , st_sys_overall
}
 
enum  event_type {
  ev_net_firstMixInited = 0 , ev_net_middleMixInited , ev_net_lastMixInited , ev_net_prevConnected ,
  ev_net_nextConnected , ev_net_prevConnectionClosed , ev_net_nextConnectionClosed , ev_net_keyExchangePrevSuccessful ,
  ev_net_keyExchangeNextSuccessful , ev_net_keyExchangePrevFailed , ev_net_keyExchangeNextFailed , ev_net_overall ,
  ev_sys_start = 0 , ev_sys_enterMainLoop , ev_sys_leavingMainLoop , ev_sys_sigTerm ,
  ev_sys_sigInt , ev_sys_sigSegV , ev_sys_overall
}
 
enum  state_level {
  stl_ok = 0 , stl_warning , stl_critical , stl_unknown ,
  stl_all
}
 

Functions

transition_tdefineTransitions (status_type_t s_type, int transitionCount,...)
 a convenience function for easily defining state transitions More...
 

Macro Definition Documentation

◆ DOM_ELEMENT_STATE_DESCRIPTION_NAME

#define DOM_ELEMENT_STATE_DESCRIPTION_NAME   "StateDescription"

Definition at line 60 of file monitoringDefs.h.

◆ DOM_ELEMENT_STATE_LEVEL_NAME

#define DOM_ELEMENT_STATE_LEVEL_NAME   "StateLevel"

Definition at line 59 of file monitoringDefs.h.

◆ DOM_ELEMENT_STATE_NAME

#define DOM_ELEMENT_STATE_NAME   "State"

Definition at line 58 of file monitoringDefs.h.

◆ DOM_ELEMENT_STATUS_MESSAGE_NAME

#define DOM_ELEMENT_STATUS_MESSAGE_NAME   "StatusMessage"

Definition at line 57 of file monitoringDefs.h.

◆ ENTRY_STATE

#define ENTRY_STATE   0

Definition at line 55 of file monitoringDefs.h.

◆ EVENT_DEF

#define EVENT_DEF (   event_array,
  status_type,
  event_type,
  description 
)     event_array[status_type][event_type]->ev_description = (char *) description;

Definition at line 421 of file monitoringDefs.h.

◆ EVER

#define EVER   1

Definition at line 71 of file monitoringDefs.h.

◆ FINISH_EVENT_DEFINITIONS

#define FINISH_EVENT_DEFINITIONS (   event_array)
Value:
FINISH_PAYMENT_EVENT_DEFINITIONS(event_array) \
FINISH_SYSTEM_EVENT_DEFINITIONS(event_array)
#define FINISH_NETWORKING_EVENT_DEFINITIONS(event_array)

Definition at line 226 of file monitoringDefs.h.

◆ FINISH_NETWORKING_EVENT_DEFINITIONS

#define FINISH_NETWORKING_EVENT_DEFINITIONS (   event_array)
Value:
"first mix initialization finished") \
NET_EVENT_DEF(event_array, ev_net_middleMixInited, \
"middle mix initialization finished") \
NET_EVENT_DEF(event_array, ev_net_lastMixInited, \
"last mix initialization finished") \
NET_EVENT_DEF(event_array, ev_net_prevConnected, \
"connection to previous mix established") \
NET_EVENT_DEF(event_array, ev_net_nextConnected, \
"connection to next mix established") \
NET_EVENT_DEF(event_array, ev_net_keyExchangePrevSuccessful, \
"key exchange with previous mix successful") \
NET_EVENT_DEF(event_array, ev_net_keyExchangeNextSuccessful, \
"key exchange with next mix successful") \
NET_EVENT_DEF(event_array, ev_net_keyExchangePrevFailed, \
"key exchange with previous mix failed") \
NET_EVENT_DEF(event_array, ev_net_keyExchangeNextFailed, \
"key exchange with next mix failed") \
NET_EVENT_DEF(event_array, ev_net_prevConnectionClosed, \
"connection to previous mix closed") \
NET_EVENT_DEF(event_array, ev_net_nextConnectionClosed, \
"connection to next mix closed")
@ ev_net_nextConnectionClosed
@ ev_net_keyExchangePrevSuccessful
@ ev_net_prevConnectionClosed
@ ev_net_middleMixInited
@ ev_net_keyExchangeNextSuccessful
@ ev_net_keyExchangePrevFailed
@ ev_net_keyExchangeNextFailed
@ ev_net_nextConnected
@ ev_net_lastMixInited
@ ev_net_prevConnected
@ ev_net_firstMixInited
#define NET_EVENT_DEF(event_array, event_type, description)

Definition at line 271 of file monitoringDefs.h.

◆ FINISH_NETWORKING_STATE_DEFINITIONS

#define FINISH_NETWORKING_STATE_DEFINITIONS (   state_array)

Definition at line 235 of file monitoringDefs.h.

◆ FINISH_PAYMENT_EVENT_DEFINITIONS

#define FINISH_PAYMENT_EVENT_DEFINITIONS (   event_array)

Definition at line 347 of file monitoringDefs.h.

◆ FINISH_PAYMENT_STATE_DEFINITIONS

#define FINISH_PAYMENT_STATE_DEFINITIONS (   state_array)

Definition at line 346 of file monitoringDefs.h.

◆ FINISH_STATE_DEFINITIONS

#define FINISH_STATE_DEFINITIONS (   state_array)
Value:
FINISH_PAYMENT_STATE_DEFINITIONS(state_array) \
FINISH_SYSTEM_STATE_DEFINITIONS(state_array)
#define FINISH_NETWORKING_STATE_DEFINITIONS(state_array)

helper macros for defining states and events:

Definition at line 221 of file monitoringDefs.h.

◆ FINISH_SYSTEM_EVENT_DEFINITIONS

#define FINISH_SYSTEM_EVENT_DEFINITIONS (   event_array)
Value:
SYS_EVENT_DEF(event_array, ev_sys_start, \
"mix startup") \
SYS_EVENT_DEF(event_array, ev_sys_enterMainLoop, \
"mix entering main loop") \
SYS_EVENT_DEF(event_array, ev_sys_leavingMainLoop, \
"mix leaving main loop") \
SYS_EVENT_DEF(event_array, ev_sys_sigTerm, \
"mix caught SIG_TERM") \
SYS_EVENT_DEF(event_array, ev_sys_sigInt, \
"mix caught SIG_INT") \
SYS_EVENT_DEF(event_array, ev_sys_sigSegV, \
"mix caught SIG_SEGV")
@ ev_sys_sigSegV
@ ev_sys_sigTerm
@ ev_sys_enterMainLoop
@ ev_sys_leavingMainLoop
@ ev_sys_start
@ ev_sys_sigInt
#define SYS_EVENT_DEF(event_array, event_type, description)

Definition at line 375 of file monitoringDefs.h.

◆ FINISH_SYSTEM_STATE_DEFINITIONS

#define FINISH_SYSTEM_STATE_DEFINITIONS (   state_array)
Value:
SYS_STATE_DEF(state_array, st_sys_entry, \
"system entry state", \
SYS_STATE_DEF(state_array, st_sys_initializing, \
"mix is initializing", \
SYS_STATE_DEF(state_array, st_sys_operating, \
"mix is operating", \
SYS_STATE_DEF(state_array, st_sys_restarting, \
"mix is restarting", \
SYS_STATE_DEF(state_array, st_sys_shuttingDown, \
"mix is shutting down", \
SYS_STATE_DEF(state_array, st_sys_ShuttingDownAfterSegFault, \
"mix is shutting down due to a segmentation fault!", \
@ stl_unknown
@ stl_ok
@ stl_warning
@ stl_critical
#define TRANS_SYS_ENTRY
SYSTEM STATE TRANSITIONS.
#define SYS_STATE_DEF(state_array, state_type, description, transitions, stateLevel)
#define TRANS_SYS_OPERATING
@ st_sys_shuttingDown
@ st_sys_ShuttingDownAfterSegFault
@ st_sys_entry
@ st_sys_restarting
@ st_sys_operating
@ st_sys_initializing
#define TRANS_SYS_SHUTTING_DOWN_AFTER_SEG_FAULT
#define TRANS_SYS_INITIALIZING
#define TRANS_SYS_SHUTTING_DOWN
#define TRANS_SYS_RESTARTING

Definition at line 354 of file monitoringDefs.h.

◆ FIRST_EVENT

#define FIRST_EVENT   0

Definition at line 54 of file monitoringDefs.h.

◆ FIRST_STATUS

#define FIRST_STATUS   0

Definition at line 53 of file monitoringDefs.h.

◆ HTTP_ANSWER_PREFIX_FORMAT

#define HTTP_ANSWER_PREFIX_FORMAT   "HTTP/1.1 200 OK\nContent-Length: %u\nConnection: close\nContent-Type: text/xml; charset=UTF-8\n\n"

Definition at line 67 of file monitoringDefs.h.

◆ HTTP_ANSWER_PREFIX_MAX_LENGTH

#define HTTP_ANSWER_PREFIX_MAX_LENGTH   100

Definition at line 69 of file monitoringDefs.h.

◆ MAX_DESCRIPTION_LENGTH

#define MAX_DESCRIPTION_LENGTH   50

Definition at line 62 of file monitoringDefs.h.

◆ MONITORING_SERVER_PORT

#define MONITORING_SERVER_PORT   8080

Definition at line 63 of file monitoringDefs.h.

◆ NET_EVENT_DEF

#define NET_EVENT_DEF (   event_array,
  event_type,
  description 
)     EVENT_DEF(event_array, stat_networking, event_type, description)

Definition at line 393 of file monitoringDefs.h.

◆ NET_STATE_DEF

#define NET_STATE_DEF (   state_array,
  state_type,
  description,
  transitions,
  stateLevel 
)     STATE_DEF(state_array, stat_networking, state_type, description, transitions, stateLevel)

Definition at line 390 of file monitoringDefs.h.

◆ NETWORKING_STATUS_NAME

#define NETWORKING_STATUS_NAME   "NetworkingStatus"

Definition at line 143 of file monitoringDefs.h.

◆ NR_NETWORKING_EVENTS

#define NR_NETWORKING_EVENTS   ev_net_overall

Definition at line 145 of file monitoringDefs.h.

◆ NR_NETWORKING_STATES

#define NR_NETWORKING_STATES   st_net_overall

Definition at line 144 of file monitoringDefs.h.

◆ NR_STATE_LEVELS

#define NR_STATE_LEVELS   stl_all

Definition at line 185 of file monitoringDefs.h.

◆ NR_STATUS_TYPES

#define NR_STATUS_TYPES   stat_all

Definition at line 85 of file monitoringDefs.h.

◆ NR_SYSTEM_EVENTS

#define NR_SYSTEM_EVENTS   ev_sys_overall

Definition at line 149 of file monitoringDefs.h.

◆ NR_SYSTEM_STATES

#define NR_SYSTEM_STATES   st_sys_overall

Definition at line 148 of file monitoringDefs.h.

◆ PAY_EVENT_DEF

#define PAY_EVENT_DEF (   event_array,
  event_type,
  description 
)

Definition at line 404 of file monitoringDefs.h.

◆ PAY_STATE_DEF

#define PAY_STATE_DEF (   state_array,
  state_type,
  description,
  transitions,
  stateLevel 
)

Definition at line 403 of file monitoringDefs.h.

◆ STATE_DEF

#define STATE_DEF (   state_array,
  status_type,
  state_type,
  description,
  transitions,
  stateLevel 
)
Value:
state_array[status_type][state_type]->st_description = (char *) description; \
state_array[status_type][state_type]->st_transitions = transitions; \
state_array[status_type][state_type]->st_stateLevel = stateLevel;
state_type
status_type

Definition at line 416 of file monitoringDefs.h.

◆ STATUS_FLAG

#define STATUS_FLAG (   status_type)    (1<<(unsigned int)status_type)

All state and transition definitions can be found here The server monitoring observes different states for multiple status types.

The status types are currently:

  1. "Network" which contains informations about the connection of the current mix to the others
  2. "Payment" refers to the current state of the mixes accounting instance module.

"System" reflects general information about the actual state of the mix process.

A state has a level that shows if the current state of a mix is ok, unknown or critical. To realize a state machine events can be defined here. The events can be linked with states to realize transitions from one state to another if an event is fired.

Several macros can be found here for the definition of status types, states and events. Transitions can also be realized via macros.

Definition at line 51 of file monitoringDefs.h.

◆ SYS_EVENT_DEF

#define SYS_EVENT_DEF (   event_array,
  event_type,
  description 
)     EVENT_DEF(event_array, stat_system, event_type, description)

Definition at line 410 of file monitoringDefs.h.

◆ SYS_STATE_DEF

#define SYS_STATE_DEF (   state_array,
  state_type,
  description,
  transitions,
  stateLevel 
)     STATE_DEF(state_array, stat_system, state_type, description, transitions, stateLevel)

Definition at line 407 of file monitoringDefs.h.

◆ SYSTEM_STATUS_NAME

#define SYSTEM_STATUS_NAME   "SystemStatus"

Definition at line 147 of file monitoringDefs.h.

◆ TRANS_NET_ENTRY

#define TRANS_NET_ENTRY
Value:
transition_t * defineTransitions(status_type_t s_type, int transitionCount,...)
a convenience function for easily defining state transitions
@ st_net_lastMixInit
@ st_net_middleMixInit
@ st_net_firstMixInit
@ stat_networking

NETWORKING STATE TRANSITIONS.

Definition at line 440 of file monitoringDefs.h.

◆ TRANS_NET_FIRST_MIX_CONNECTED_TO_NEXT

#define TRANS_NET_FIRST_MIX_CONNECTED_TO_NEXT

◆ TRANS_NET_FIRST_MIX_INIT

#define TRANS_NET_FIRST_MIX_INIT

◆ TRANS_NET_FIRST_MIX_ONLINE

#define TRANS_NET_FIRST_MIX_ONLINE

◆ TRANS_NET_LAST_MIX_CONNECTED_TO_PREV

#define TRANS_NET_LAST_MIX_CONNECTED_TO_PREV

◆ TRANS_NET_LAST_MIX_INIT

#define TRANS_NET_LAST_MIX_INIT

◆ TRANS_NET_LAST_MIX_ONLINE

#define TRANS_NET_LAST_MIX_ONLINE

◆ TRANS_NET_MIDDLE_MIX_CONNECTED_TO_NEXT

#define TRANS_NET_MIDDLE_MIX_CONNECTED_TO_NEXT

◆ TRANS_NET_MIDDLE_MIX_CONNECTED_TO_PREV

#define TRANS_NET_MIDDLE_MIX_CONNECTED_TO_PREV

◆ TRANS_NET_MIDDLE_MIX_INIT

#define TRANS_NET_MIDDLE_MIX_INIT

◆ TRANS_NET_MIDDLE_MIX_ONLINE

#define TRANS_NET_MIDDLE_MIX_ONLINE

◆ TRANS_SYS_ENTRY

#define TRANS_SYS_ENTRY
Value:

SYSTEM STATE TRANSITIONS.

Definition at line 571 of file monitoringDefs.h.

◆ TRANS_SYS_INITIALIZING

#define TRANS_SYS_INITIALIZING

◆ TRANS_SYS_OPERATING

#define TRANS_SYS_OPERATING

◆ TRANS_SYS_RESTARTING

#define TRANS_SYS_RESTARTING

◆ TRANS_SYS_SHUTTING_DOWN

#define TRANS_SYS_SHUTTING_DOWN

◆ TRANS_SYS_SHUTTING_DOWN_AFTER_SEG_FAULT

#define TRANS_SYS_SHUTTING_DOWN_AFTER_SEG_FAULT    (defineTransitions(stat_system, 0))

Definition at line 605 of file monitoringDefs.h.

◆ XML_STATUS_MESSAGE_MAX_SIZE

#define XML_STATUS_MESSAGE_MAX_SIZE   3000

Definition at line 64 of file monitoringDefs.h.

◆ XML_STATUS_MESSAGE_START

#define XML_STATUS_MESSAGE_START   "<StatusMessage>"

Definition at line 66 of file monitoringDefs.h.

Typedef Documentation

◆ event_t

typedef struct event event_t

Definition at line 187 of file monitoringDefs.h.

◆ event_type_t

typedef enum event_type event_type_t

Definition at line 187 of file monitoringDefs.h.

◆ state_level_t

typedef enum state_level state_level_t

Definition at line 187 of file monitoringDefs.h.

◆ state_t

typedef struct state state_t

Definition at line 187 of file monitoringDefs.h.

◆ state_type_t

typedef enum state_type state_type_t

Definition at line 187 of file monitoringDefs.h.

◆ status_type_t

typedef enum status_type status_type_t

Definition at line 187 of file monitoringDefs.h.

◆ transition_t

typedef enum state_type transition_t

Definition at line 187 of file monitoringDefs.h.

Enumeration Type Documentation

◆ event_type

enum event_type
Enumerator
ev_net_firstMixInited 
ev_net_middleMixInited 
ev_net_lastMixInited 
ev_net_prevConnected 
ev_net_nextConnected 
ev_net_prevConnectionClosed 
ev_net_nextConnectionClosed 
ev_net_keyExchangePrevSuccessful 
ev_net_keyExchangeNextSuccessful 
ev_net_keyExchangePrevFailed 
ev_net_keyExchangeNextFailed 
ev_net_overall 
ev_sys_start 
ev_sys_enterMainLoop 
ev_sys_leavingMainLoop 
ev_sys_sigTerm 
ev_sys_sigInt 
ev_sys_sigSegV 
ev_sys_overall 

Definition at line 114 of file monitoringDefs.h.

115 {
116  /* networking events */
122  ev_net_overall, /* only represents the number all network events */
123 #ifdef PAYMENT
124  /* payment events */
125  ev_pay_aiInited = 0, ev_pay_aiShutdown,
126  ev_pay_biConnectionSuccess, ev_pay_biConnectionFailure, ev_pay_biConnectionCriticalSubseqFailures,
127  ev_pay_dbConnectionSuccess, ev_pay_dbConnectionFailure,
128  ev_pay_overall, /* only represents the number all payment events */
129 #endif
130  /* system events */
131  ev_sys_start = 0,
134  ev_sys_overall /* only represents the number all system events */
135 };
@ ev_sys_overall
@ ev_net_overall

◆ state_level

Enumerator
stl_ok 
stl_warning 
stl_critical 
stl_unknown 
stl_all 

Definition at line 180 of file monitoringDefs.h.

181 {
183 };
@ stl_all

◆ state_type

enum state_type
Enumerator
st_ignore 
st_net_entry 
st_net_firstMixInit 
st_net_firstMixConnectedToNext 
st_net_firstMixOnline 
st_net_middleMixInit 
st_net_middleMixConnectedToPrev 
st_net_middleMixConnectedToNext 
st_net_middleMixOnline 
st_net_lastMixInit 
st_net_lastMixConnectedToPrev 
st_net_lastMixOnline 
st_net_overall 
st_sys_entry 
st_sys_initializing 
st_sys_operating 
st_sys_restarting 
st_sys_shuttingDown 
st_sys_ShuttingDownAfterSegFault 
st_sys_overall 

Definition at line 88 of file monitoringDefs.h.

89 {
90  st_ignore = -1,
91  /* networking states */
92  st_net_entry = 0,
97  st_net_overall, /* only represents the number all network states */
98 #ifdef PAYMENT
99  /* payment states */
100  st_pay_entry = 0,
101  st_pay_aiInit, st_pay_aiShutdown,
102  st_pay_biAvailable, st_pay_biUnreachable, st_pay_biPermanentlyUnreachable,
103  st_pay_dbError, st_pay_dbErrorBiUnreachable, st_pay_dbErrorBiPermanentlyUnreachable,
104  st_pay_overall, /* only represents the number all payment states */
105 #endif
106  /* system states */
107  st_sys_entry = 0,
110  st_sys_overall /* only represents the number all system states */
111 };
@ st_net_entry
@ st_net_overall
@ st_sys_overall
@ st_ignore

◆ status_type

Enumerator
stat_undef 
stat_networking 
stat_system 
stat_all 

Definition at line 74 of file monitoringDefs.h.

75 {
76  stat_undef = -1,
77  stat_networking = 0,
78 #ifdef PAYMENT
79  stat_payment,
80 #endif
82  stat_all
83 };
@ stat_all
@ stat_undef

Function Documentation

◆ defineTransitions()

transition_t* defineTransitions ( status_type_t  s_type,
int  transitionCount,
  ... 
)

a convenience function for easily defining state transitions

Parameters
s_typethe status type of the state for which the transitions are to be defined
transitionCountthe number of transitions to define
...an event_type (of type event_type_t) followed by a state transition (of type transition_t) IMPORTANT: an event type MUST be followed by a state transition!
Returns
pointer to the array where the transitions are stored, (which of course has to be disposed by delete[] when reference is not needed anymore)!