fwRPC
 All Files Functions Variables
fwRPC_pmon.ctl File Reference

Functions

dyn_mixed fwRPC_pmon_getConInfo ()
 
void fwRPC_pmon_getManagerList (dyn_mixed connectionInfo, dyn_dyn_mixed &list)
 
void fwRPC_pmon_getManagerStati (dyn_mixed connectionInfo, dyn_dyn_mixed &list)
 
int fwRPC_pmon_getManagerCount (dyn_mixed connectionInfo)
 
int fwRPC_pmon_appendCtrlManager (dyn_mixed connectionInfo, string script)
 
void fwRPC_pmon_startCtrlManager (dyn_mixed connectionInfo, int index)
 
void fwRPC_pmon_stopCtrlManager (dyn_mixed connectionInfo, int index)
 
void fwRPC_pmon_deleteCtrlManager (dyn_mixed connectionInfo, int index)
 
void fwRPC_pmon_deleteLastWorker (dyn_mixed connectionInfo)
 
void fwRPC_pmon_getWorkerCtrlManagers (dyn_mixed connectionInfo, dyn_dyn_mixed &managers)
 
private int _fwRPC_pmon_command (dyn_mixed connectionInfo, string command)
 
private int _fwRPC_pmon_query (dyn_mixed connectionInfo, string query, dyn_dyn_mixed &res)
 
private string _fwRPC_pmon_getCredentialsString (dyn_mixed connectionInfo)
 
private bool _fwRPC_pmon_waitForState (dyn_mixed coninfo, int index, int state)
 
bool fwRPC_pmon_waitForWorkerStart (unsigned WorkerNum)
 

Variables

const int fwRPC_PMON_CONINFO_HOST = 1
 
const int fwRPC_PMON_CONINFO_PORT = 2
 
const int fwRPC_PMON_CONINFO_USER = 3
 
const int fwRPC_PMON_CONINFO_PASS = 4
 
const int fwRPC_PMON_MANINFO_INDEX = 1
 
const int fwRPC_PMON_MANINFO_NUM = 2
 
const int fwRPC_PMON_MANINFO_STATE = 3
 
const int fwRPC_PMON_MANINFO_CMD = 4
 
const int fwRPC_PMON_MANINFO_STATE_STOPPED = 0
 
const int fwRPC_PMON_MANINFO_STATE_INIT = 1
 
const int fwRPC_PMON_MANINFO_STATE_RUNNING = 2
 
const int fwRPC_PMON_MANINFO_STATE_BLOCKED = 3
 
const int fwRPC_PMON_STAT_STATE = 1
 
const int fwRPC_PMON_STAT_NUM = 5
 
const int fwRPC_PMON_LIST_CMD = 6
 
const int fwRPC_PMON_STATE_WAIT_TIMESTEP = 3
 
const int fwRPC_PMON_STATE_WAIT_TIMEOUT = 10
 
const string fwRPC_WORKER_SCRIPT = "fwRPC/fwRPC_worker_script.ctl"
 

Detailed Description

This library contains helper functions for commmon PMON tasks. Currently provides facilities for CTRL manager and worker management.

Author
Victor Rodrigues (CERN, BE-ICS-SDS)

Function Documentation

private bool _fwRPC_pmon_waitForState ( dyn_mixed  coninfo,
int  index,
int  state 
)

Wait for a WCCOActrl manager state change (blocking) until a specific timeout has been reached.

Parameters
coninfo(IN, dyn_mixed) connection info object
index(IN, int) WCCOActrl manager index
state(IN, int) state to wait for
Returns
true on success false otherwise
Exceptions
nothing
int fwRPC_pmon_appendCtrlManager ( dyn_mixed  connectionInfo,
string  script 
)

Append a CTRL manager to run the specified script.

Parameters
connectionInfo(IN, dyn_mixed) mon connection info object
script(IN, string) file path to run when the mngr starts
Returns
index of created CTRL manager
Exceptions
ifthe pmon query failed
void fwRPC_pmon_deleteCtrlManager ( dyn_mixed  connectionInfo,
int  index 
)

Delete a CTRL manager at an index

Parameters
connectionInfo(IN, dyn_mixed) pmon connection info object
index(IN, int) index of CTRL manager
Returns
nothing
Exceptions
ifthe pmon query failed
void fwRPC_pmon_deleteLastWorker ( dyn_mixed  connectionInfo)

Delete the last worker. Automatically stops the CTRL manager if it's running.

Parameters
connectionInfo(IN, dyn_mixed) pmon connection info object
Returns
nothing
Exceptions
ifthe pmon query failed
dyn_mixed fwRPC_pmon_getConInfo ( )

Get connection info for the current system. For use with pmon functions in this module.

Returns
pmon connection info object
Exceptions
ifpmon username/password could not be resolved
int fwRPC_pmon_getManagerCount ( dyn_mixed  connectionInfo)

Get the number of managers.

Parameters
connectionInfo(IN, dyn_mixed) pmon connection info object
Returns
count of managers
Exceptions
ifthe pmon query failed
void fwRPC_pmon_getManagerList ( dyn_mixed  connectionInfo,
dyn_dyn_mixed &  list 
)

Get manager list.

Parameters
connectionInfo(IN, dyn_mixed) pmon connection info object
list(OUT, dyn_dyn_mixed) manager list
Returns
nothing
Exceptions
ifthe pmon query failed
void fwRPC_pmon_getManagerStati ( dyn_mixed  connectionInfo,
dyn_dyn_mixed &  list 
)

Get manager stat list.

Parameters
connectionInfo(IN, dyn_mixed) pmon connection info object
list(OUT, dyn_dyn_mixed) manager list
Returns
nothing
Exceptions
ifthe pmon query failed
void fwRPC_pmon_getWorkerCtrlManagers ( dyn_mixed  connectionInfo,
dyn_dyn_mixed &  managers 
)

Get all CTRL managers which are set to run the worker module.

Parameters
connectionInfo(IN, dyn_mixed) pmon connection info object
managers(OUT, dyn_dyn_mixed) collection of CTRL manager objects
Returns
nothing
Exceptions
ifthe pmon query failed
void fwRPC_pmon_startCtrlManager ( dyn_mixed  connectionInfo,
int  index 
)

Start CTRL manager at index.

Parameters
connectionInfo(IN, dyn_mixed) pmon connection info object
index(IN, int) index of CTRL manager
Returns
nothing
Exceptions
ifthe pmon query failed
void fwRPC_pmon_stopCtrlManager ( dyn_mixed  connectionInfo,
int  index 
)

Stop CTRL manager at index.

Parameters
connectionInfo(IN, dyn_mixed) pmon connection info object
index(IN, int) index of CTRL manager
Returns
nothing
Exceptions
ifthe pmon query failed