Functions | Variables

fwInstallationManager.ctl File Reference

Functions

int fwInstallationManager_getAllInfoFromPvss (dyn_dyn_mixed &managersInfo)
int fwInstallationManager_add (string manager, string startMode, int secKill, int restartCount, int resetMin, string commandLine, string host="", int port=4999, string user="", string pwd="")
int fwInstallationManager_appendDriver (string defActivated, string manTitle, string manager, string startMode, int secKill, int restartCount, int resetMin, string commandLine)
int fwInstallationManager_append (bool defActivated, string manTitle, string manager, string startMode, int secKill, int restartCount, int resetMin, string commandLine)
int fwInstallationManager_deleteReconfigurationAction (string manager, string startMode, int secKill, int restartCount, int resetMin, string commandLine)
int fwInstallationManager_setReconfigurationActions (dyn_string dsManager, dyn_string dsStartMode, dyn_int diSecKill, dyn_int diRestartCount, dyn_int diResetMin, dyn_string dsCommandLine)
int fwInstallationManager_getReconfigurationActions (dyn_string &dsManager, dyn_string &dsStartMode, dyn_int &diSecKill, dyn_int &diRestartCount, dyn_int &diResetMin, dyn_string &dsCommandLine)
int fwInstallationManager_executeReconfigurationAction (string manager, string startMode, int secKill, int restartCount, int resetMin, string commandLine, string host="", int port=4999, string user="", string pwd="")
int fwInstallationManager_executeAllReconfigurationActions ()
int fwInstallationManager_setMode (string manager, string commandLine, string mode)
int fwInstallationManager_stopAllOfTypes (dyn_string types, string host="", int port=4999, string user="", string pwd="")
int fwInstallationManager_shallStopManagersOfType (string managerType)
int fwInstallationManager_command (string action, string manager, string commandLine, string host="", int port=4999, string user="", string pwd="")
int fwInstallationManager_pmonGetManagers (dyn_dyn_mixed &managersInfo, string host="", string port=4999, string user="", string pwd="")
bool fwInstallationManager_switch (bool driver, string name, int number, string host="", int port=4999, string user="", string pwd="")
int fwInstallationManager_restart (string name, string commandLine, string host="", int port=4999, string user="", string pwd="")
void fwInstallationManager_waitForState (bool running, int number, int retries=0, string systemName="")
int fwInstallationManager_isRunning (string manager, string commandLine, bool &isRunning, string host="", int port=4999, string user="", string pwd="")
bool fwInstallationManager_isDriverRunning (int number, string systemName="")
int fwInstallationManager_getProperties (string type, string options, dyn_mixed &properties, string host="", int port=4999, string user="", string pwd="")
int fwInstallationManager_setProperties (string type, string currentOptions, dyn_mixed properties, string host="", string port=4999, string user="", string pwd="")

Variables

const string csFwInstallationManagerLibVersion = "5.0.0"
fwInstallationManager.ctl: Definition of constants

The following constants are used by the fwInstallationManager.ctl library

const int FW_INSTALLATION_MANAGER_PMON_IDX = 1
const int FW_INSTALLATION_MANAGER_PMON_USER = 2
const int FW_INSTALLATION_MANAGER_PMON_PWD = 3
const int FW_INSTALLATION_MANAGER_PMON_PORT = 4
const int FW_INSTALLATION_MANAGER_HOST = 5
const int FW_INSTALLATION_MANAGER_TYPE = 6
const int FW_INSTALLATION_MANAGER_OPTIONS = 7
const int FW_INSTALLATION_MANAGER_START_MODE = 8
const int FW_INSTALLATION_MANAGER_SEC_KILL = 9
const int FW_INSTALLATION_MANAGER_RESTART_COUNT = 10
const int FW_INSTALLATION_MANAGER_RESET_MIN = 11
const int FW_INSTALLATION_MANAGER_DONT_STOP_RESTART = 12

Detailed Description

This package contains general functions of the FW Component Installation tool to manipulate managers

Author:
Fernando Varela (EN-ICE)
Date:
August 2010

Function Documentation

int fwInstallationManager_add ( string  manager,
string  startMode,
int  secKill,
int  restartCount,
int  resetMin,
string  commandLine,
string  host = "",
int  port = 4999,
string  user = "",
string  pwd = "" 
)

This function allows to insert a manager into a project. It is checked before, if the manager already exists.

Parameters:
manager name of the manager
startMode {manual, once, always}
secKill seconds to kill after stop
restartCount number of restarts
resetMin restart counter reset time (minutes)
commandLine commandline for the manager
host hostname
port pmon port
user pmon user
pwd pmon password
Returns:
1 - manager added, 2 - manager already existing, 3 - manager addition disabled, 0 - manager addition failed
Author:
F. Varela (original idea by S. Schmeling)
int fwInstallationManager_append ( bool  defActivated,
string  manTitle,
string  manager,
string  startMode,
int  secKill,
int  restartCount,
int  resetMin,
string  commandLine 
)

This function appends a manager to the console of the local project.

Parameters:
defActivated if by the default the manager must be activated (i.e. no selection is done in the popup windows and the timer expires)
manTitle Text shown as title
manager name of the manager
startMode {manual, once, always}
secKill seconds to kill after stop
restartCount number of restarts
resetMin restart counter reset time (minutes)
commandLine commandline for the manager
Returns:
1 - manager added, 2 - manager already existing, 3 - manager addition disabled, 0 - manager addition failed
Author:
F. Varela (original idea by S. Schmeling)
int fwInstallationManager_appendDriver ( string  defActivated,
string  manTitle,
string  manager,
string  startMode,
int  secKill,
int  restartCount,
int  resetMin,
string  commandLine 
)

This function allows to insert a driver and the correspoding simulator in the local project. It is checked before, if the manager already exists.

Parameters:
defActivated if by the default the manager must be activated (i.e. no selection is done in the popup windows and the timer expires)
manTitle Text shown as title
manager name of the manager
startMode {manual, once, always}
secKill seconds to kill after stop
restartCount number of restarts
resetMin restart counter reset time (minutes)
commandLine commandline for the manager
Returns:
1 - manager added, 2 - manager already existing, 3 - manager addition disabled, 0 - manager addition failed
Author:
F. Varela (original idea by S. Schmeling)
int fwInstallationManager_command ( string  action,
string  manager,
string  commandLine,
string  host = "",
int  port = 4999,
string  user = "",
string  pwd = "" 
)

This function send a pmon command onto a manager

Parameters:
action {START, STOP, RESTART}
manager manager type
commandLine commandline for the manager
host hostname
port pmon port
user pmon user
pwd pmon password
Returns:
0 if OK, -1 if error
int fwInstallationManager_deleteReconfigurationAction ( string  manager,
string  startMode,
int  secKill,
int  restartCount,
int  resetMin,
string  commandLine 
)

This function deletes a manager reconfiguration action

Parameters:
manager name of the manager
startMode {manual, once, always}
secKill seconds to kill after stop
restartCount number of restarts
resetMin restart counter reset time (minutes)
commandLine commandline for the manager
Returns:
0 if OK, -1 if error
int fwInstallationManager_executeAllReconfigurationActions (  ) 

This function executes all manager reconfiguration action

Returns:
0 if OK, -1 if error
int fwInstallationManager_executeReconfigurationAction ( string  manager,
string  startMode,
int  secKill,
int  restartCount,
int  resetMin,
string  commandLine,
string  host = "",
int  port = 4999,
string  user = "",
string  pwd = "" 
)

This function executes a manager reconfiguration action

Parameters:
manager name of the manager
startMode {manual, once, always}
secKill seconds to kill after stop
restartCount number of restarts
resetMin restart counter reset time (minutes)
commandLine commandline for the manager
host hostname
port pmon port
user pmon user
pwd pmon password
Returns:
0 if OK, -1 if error
int fwInstallationManager_getAllInfoFromPvss ( dyn_dyn_mixed &  managersInfo  ) 

This function retrieves all manager properties for the local project

Parameters:
managersInfo managers' properties as a dyn_dyn_mixed matrix
Returns:
0 if OK, -1 if error
int fwInstallationManager_getProperties ( string  type,
string  options,
dyn_mixed &  properties,
string  host = "",
int  port = 4999,
string  user = "",
string  pwd = "" 
)

This function retrieves the manager properties

Parameters:
type type of manager
options manager options
properties manager properties
host hostname
port pmon port
user pmon user
pwd pmon password
Returns:
0 if OK, -1 if error
int fwInstallationManager_getReconfigurationActions ( dyn_string &  dsManager,
dyn_string &  dsStartMode,
dyn_int &  diSecKill,
dyn_int &  diRestartCount,
dyn_int &  diResetMin,
dyn_string &  dsCommandLine 
)

This function retrieves from an internal dp, the list of manager reconfiguration actions

Parameters:
dsManager names of the managers
dsStartMode array of {manual, once, always}
diSecKill array of seconds to kill after stop
diRestartCount array of number of restarts
diResetMin array of restart counter reset time (minutes)
dsCommandLine array of commandline for the manager
Returns:
0 if OK, -1 if error
bool fwInstallationManager_isDriverRunning ( int  number,
string  systemName = "" 
)

This function checks if a driver is running.

Parameters:
number driver number
systemName PVSS system where to find the manager
Returns:
true if the driver runs, false otherwise
int fwInstallationManager_isRunning ( string  manager,
string  commandLine,
bool &  isRunning,
string  host = "",
int  port = 4999,
string  user = "",
string  pwd = "" 
)

This function checks if a manager is running or not

Parameters:
manager (in) type of the pvss manager
commandLine (in) manager options
isRunning (out) manager state. If 1 the manager runs, otherwise it is stopped
host (in) hostname
port (in) pmon port
user (in) pmon user
pwd (in) pmon password
Returns:
0 if OK, -1 if error
int fwInstallationManager_pmonGetManagers ( dyn_dyn_mixed &  managersInfo,
string  host = "",
string  port = 4999,
string  user = "",
string  pwd = "" 
)

This function retrieves all managers from pmon

Parameters:
managersInfo (out) managers properties
host (in) host name where the project runs
port (in) pmon port
user (in) pmon user
pwd (in) pmon password
Returns:
0 if OK, -1 if error
Author:
F. Varela based on an original implmentation done by S. Schmeling
int fwInstallationManager_restart ( string  name,
string  commandLine,
string  host = "",
int  port = 4999,
string  user = "",
string  pwd = "" 
)

This function restarts a manager.

Parameters:
name manager type
commandLine commandline for the manager
host hostname
port pmon port
user pmon user
pwd pmon password
Returns:
0 if OK, -1 if error
int fwInstallationManager_setMode ( string  manager,
string  commandLine,
string  mode 
)

This function sets the start mode of a manager

Parameters:
manager name of the manager
commandLine commandline for the manager
mode {manual, once, always}
Returns:
0 if OK, -1 if error
int fwInstallationManager_setProperties ( string  type,
string  currentOptions,
dyn_mixed  properties,
string  host = "",
string  port = 4999,
string  user = "",
string  pwd = "" 
)

This function sets the manager properties

Parameters:
type type of manager
currentOptions manager options
properties manager properties
host hostname
port pmon port
user pmon user
pwd pmon password
Returns:
0 if OK, -1 if error
int fwInstallationManager_setReconfigurationActions ( dyn_string  dsManager,
dyn_string  dsStartMode,
dyn_int  diSecKill,
dyn_int  diRestartCount,
dyn_int  diResetMin,
dyn_string  dsCommandLine 
)

This function stores a set of manager reconfiguration action in an internal dp

Parameters:
dsManager names of the managers
dsStartMode array of {manual, once, always}
diSecKill array of seconds to kill after stop
diRestartCount array of number of restarts
diResetMin array of restart counter reset time (minutes)
dsCommandLine array of commandline for the manager
Returns:
0 if OK, -1 if error
int fwInstallationManager_shallStopManagersOfType ( string  managerType  ) 

This function retrieves from an internal dp of the installation tool whether the managers of a particular type have to be stopped prior to the installation of a component or not

Parameters:
managerType type of manager, e.g. PVSS00ui
Returns:
0 if OK, -1 if error
int fwInstallationManager_stopAllOfTypes ( dyn_string  types,
string  host = "",
int  port = 4999,
string  user = "",
string  pwd = "" 
)

This stops all managers of a set of particular types

Parameters:
types types of manager to be stopped, e.g. PVSS00ui
host hostname
port pmon port
user pmon user
pwd pmon password
Returns:
0 if OK, -1 if error
bool fwInstallationManager_switch ( bool  driver,
string  name,
int  number,
string  host = "",
int  port = 4999,
string  user = "",
string  pwd = "" 
)

This function switches between the real driver and the simulator.

Parameters:
driver if set to one the real driver is started, otherwise the simulator
name manager type
number driver number
host hostname
port pmon port
user pmon user
pwd pmon password
Returns:
0 if OK, -1 if error
void fwInstallationManager_waitForState ( bool  running,
int  number,
int  retries = 0,
string  systemName = "" 
)

This function wait for a manager to be in a particular state

Parameters:
running if set to one the function waits for the manager to be running, otherwise to be stopped
number driver number
retries how many time to retry
systemName name of the pvss system where to check the state of the manager
Returns:
0 if OK, -1 if error

Variable Documentation

const string csFwInstallationManagerLibVersion = "5.0.0"

Version of this library. Used to determine the coherency of all libraries of the installtion tool

 All Files Functions Variables