
Public Member Functions | |
| AlarmSender (SenderMode mode, long param) throws Exception | |
| void | run () |
Static Public Member Functions | |
| static void | printUsage () |
| static void | main (String[] args) |
Private Types | |
| enum | SenderMode { NEVER_ENDING, TIME_LIMIT, NUM_OF_ALARMS } |
Private Member Functions | |
| void | send_alarm (String family, String member, int code, boolean active) throws Exception |
Private Attributes | |
| ComponentClient | client = null |
| SenderMode | mode |
| long | param |
| ACSAlarmSystemInterface | alarmSource |
Static Private Attributes | |
| static final int | TIME_INTERVAL = 250 |
An object sending alarms and used to check the system outside of tat.
This process sends the same alarms defined in CategoryClientTest to use the same CDB. It is composed of a thread whose termination is defined by the first parameter of the command line (i.e. a SenderMode.)
enum alma::alarmsystem::clients::test::AlarmSender::SenderMode [private] |
| alma::alarmsystem::clients::test::AlarmSender::AlarmSender | ( | SenderMode | mode, | |
| long | param | |||
| ) | throws Exception [inline] |
Constructor.
| mode | The way of functioning | |
| param | Depends on the selected mode It can be the number of alarms to send or the time (seconds). It is ignored if the mode is NEVER_ENDING |
ComponentClient References alarmSource, client, mode, and param.
Referenced by main().
| static void alma::alarmsystem::clients::test::AlarmSender::main | ( | String[] | args | ) | [inline, static] |
References AlarmSender(), mode, param, and printUsage().
| static void alma::alarmsystem::clients::test::AlarmSender::printUsage | ( | ) | [inline, static] |
| void alma::alarmsystem::clients::test::AlarmSender::run | ( | ) | [inline] |
The thread sending alarms. the termination of the thread depends on the selected SenderMode.
The thread is composed of a loop that sends each alarms until the max limit of alarms or time is reached or forever if the mode is NEVER_ENDING.
The loop send all the alarms defined in AlarmsFromCDB as active then as inactive and so on.
References mode, param, send_alarm(), and TIME_INTERVAL.
| void alma::alarmsystem::clients::test::AlarmSender::send_alarm | ( | String | family, | |
| String | member, | |||
| int | code, | |||
| boolean | active | |||
| ) | throws Exception [inline, private] |
Push an alarm
| active | If true the alarm is active |
References alarmSource, alma::alarmsystem::source::ACSAlarmSystemInterface::push(), alma::alarmsystem::source::ACSFaultState::setDescriptor(), and alma::alarmsystem::source::ACSFaultState::setUserTimestamp().
Referenced by run().
Referenced by AlarmSender(), and send_alarm().
ComponentClient alma::alarmsystem::clients::test::AlarmSender::client = null [private] |
Referenced by AlarmSender().
Referenced by AlarmSender(), main(), printUsage(), and run().
long alma::alarmsystem::clients::test::AlarmSender::param [private] |
Referenced by AlarmSender(), main(), and run().
final int alma::alarmsystem::clients::test::AlarmSender::TIME_INTERVAL = 250 [static, private] |
Referenced by run().
1.6.2