Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::alarmsystem::clients::test::AlarmSender Class Reference

List of all members.

Public Member Functions

 AlarmSender (SenderMode mode, long param) throws Exception
Override void run ()

Static Public Member Functions

void printUsage ()
void main (String[] args)

Package Types


Private Types

enum  SenderMode { NEVER_ENDING, TIME_LIMIT, null }

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

final int TIME_INTERVAL = 250

Detailed Description

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.)

Author:
almadev


Member Enumeration Documentation

enum alma::alarmsystem::clients::test::AlarmSender::SenderMode [private]
 

The different ways of working of this client.

Author:
almadev
Enumeration values:
NEVER_ENDING 
TIME_LIMIT 
null  The SenderMode for the passed string

Parameters:
str The string describing the mode
Returns:
a SenderMode for the passed string null if the string does not describe any SenderMode


Constructor & Destructor Documentation

alma::alarmsystem::clients::test::AlarmSender::AlarmSender SenderMode  mode,
long  param
throws Exception [inline]
 

Constructor.

Parameters:
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
See also:
ComponentClient


Member Function Documentation

void alma::alarmsystem::clients::test::AlarmSender::main String[]  args  )  [inline, static]
 

void alma::alarmsystem::clients::test::AlarmSender::printUsage  )  [inline, static]
 

Print the USAGE string in the standard output

Override 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.

void alma::alarmsystem::clients::test::AlarmSender::send_alarm String  family,
String  member,
int  code,
boolean  active
throws Exception [inline, private]
 

Push an alarm

Parameters:
active If true the alarm is active


Member Data Documentation

ACSAlarmSystemInterface alma::alarmsystem::clients::test::AlarmSender::alarmSource [private]
 

ComponentClient alma::alarmsystem::clients::test::AlarmSender::client = null [private]
 

SenderMode alma::alarmsystem::clients::test::AlarmSender::mode [private]
 

long alma::alarmsystem::clients::test::AlarmSender::param [private]
 

final int alma::alarmsystem::clients::test::AlarmSender::TIME_INTERVAL = 250 [static, private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:01:35 2009 for ACS Java API by doxygen 1.3.8