alma::alarmsystem::clients::test::UserPropsTest Class Reference

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

List of all members.

Public Member Functions

 UserPropsTest () throws Exception
void onAlarm (Alarm alarm)
void onException (LaserSelectionException e)
void testProperties () throws Exception
void faultStateReceived (FaultState faultState)
void sourceXMLMsgReceived (String asiMessage)

Protected Member Functions

void setUp () throws Exception
void tearDown () throws Exception

Private Member Functions

int waitForMessages (int numOfMessages)
void send_alarm (String family, String member, int code, boolean active, Properties props) throws Exception

Private Attributes

CategoryClient categoryClient
SourceClient sourceClient
Vector< AlarmalarmsReceived

Static Private Attributes

static final int MAX_TIMEOUT = 120

Detailed Description

Test transmission of user defined properties from a fault state to clients.

The test is done by a couple of alarms with user properties and listening from both the sources and categories notification channels.
The checking is almost entirely delegated to tat by printing messages on the stdout.

Author:
acaproni

Constructor & Destructor Documentation

alma::alarmsystem::clients::test::UserPropsTest::UserPropsTest (  )  throws Exception [inline]

Constructor


Member Function Documentation

void alma::alarmsystem::clients::test::UserPropsTest::faultStateReceived ( FaultState  faultState  )  [inline]
void alma::alarmsystem::clients::test::UserPropsTest::onAlarm ( Alarm  alarm  )  [inline]
void alma::alarmsystem::clients::test::UserPropsTest::onException ( LaserSelectionException  e  )  [inline]
See also:
AlarmSelectionListener

Implements cern::laser::client::services::selection::AlarmSelectionListener.

void alma::alarmsystem::clients::test::UserPropsTest::send_alarm ( String  family,
String  member,
int  code,
boolean  active,
Properties  props 
) throws Exception [inline, private]
void alma::alarmsystem::clients::test::UserPropsTest::setUp (  )  throws Exception [inline, protected]
void alma::alarmsystem::clients::test::UserPropsTest::sourceXMLMsgReceived ( String  asiMessage  )  [inline]

An XML has been received from the source NC.

The XML follows the ASIMessage.xsd schema definition and therefore it might have one or more fault states.

Parameters:
asiMessage The ASIMessage received from an alarm source

Implements alma::alarmsystem::clients::source::SourceListener.

void alma::alarmsystem::clients::test::UserPropsTest::tearDown (  )  throws Exception [inline, protected]
void alma::alarmsystem::clients::test::UserPropsTest::testProperties (  )  throws Exception [inline]

Test if the properties set while sending an alarm arrive to the CategoryClient.

The test is done by sending 2 active alarms with 2 properties and one properties respectively. The triplets of the two alarms differ only for the FC that will be used to check the correctness of the received properties.
Checking is done by listening to sources and to source NCs.

Exceptions:
Exception 

References send_alarm(), and waitForMessages().

int alma::alarmsystem::clients::test::UserPropsTest::waitForMessages ( int  numOfMessages  )  [inline, private]

Wait for the messages from the alarm system.

Parameters:
numOfMessages The number of messages to wait for
Returns:
true if all the messages are received false in case of timeout (i.e. not all the messages received in MAX_TIMEOUT seconds)

References alarmsReceived, and MAX_TIMEOUT.

Referenced by testProperties().


Member Data Documentation

The vector with the alarms received

Referenced by onAlarm(), setUp(), tearDown(), and waitForMessages().

The categoryClient to test

Referenced by setUp(), and tearDown().

Max number of seconds to wait for the messages

Referenced by waitForMessages().

The source client

Referenced by setUp(), and tearDown().


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

Generated by  doxygen 1.6.2