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

Collaboration diagram for alma::alarmsystem::clients::test::AlarmSender:
Collaboration graph
[legend]

List of all members.

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

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

The different ways of working of this client.

Author:
almadev
Enumerator:
NEVER_ENDING 
TIME_LIMIT 
NUM_OF_ALARMS 

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

References alarmSource, client, mode, and param.

Referenced by main().


Member Function Documentation

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]

Print the USAGE string in the standard output

References mode.

Referenced by main().

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]

Member Data Documentation

Referenced by AlarmSender(), and send_alarm().

Referenced by AlarmSender().

Referenced by AlarmSender(), main(), printUsage(), and run().

Referenced by AlarmSender(), main(), and run().

Referenced by run().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2