ALMA Computing Group

MyAlarmdouble Class Reference

This class is the implementation of the AlarmDouble IDL interface defined in baci.idl. More...

#include <acsexmplCallbacks.h>

Inheritance diagram for MyAlarmdouble:

Inheritance graph
[legend]
Collaboration diagram for MyAlarmdouble:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MyAlarmdouble (ACE_CString _prop)
 Constructor.
 ~MyAlarmdouble ()
 Destructor - nothing to delete.
void alarm_raised (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc)
 Method invoked when the double value goes out of range.
void alarm_cleared (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc)
 Method invoked when the double value goes back into the acceptable range.
CORBA::Boolean negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc)
 Method used so that client and servant can agree upon the time it takes to transmit data (generally invocations of the done method).

Detailed Description

This class is the implementation of the AlarmDouble IDL interface defined in baci.idl.

It is used so that we may create a local alarm for the value of a remote BACI property. There are only two useful methods: alarm_raised and alarm_cleared. They do just what their names imply.

Version:
"@(#) $Id: acsexmplCallbacks.h,v 1.8 2008/10/01 04:30:47 cparedes Exp $"

Definition at line 136 of file acsexmplCallbacks.h.


Constructor & Destructor Documentation

MyAlarmdouble::MyAlarmdouble ACE_CString  _prop  )  [inline]
 

Constructor.

Parameters:
_prop Name of this Alarmdouble instance
Definition at line 144 of file acsexmplCallbacks.h.

MyAlarmdouble::~MyAlarmdouble  )  [inline]
 

Destructor - nothing to delete.

Definition at line 149 of file acsexmplCallbacks.h.


Member Function Documentation

void MyAlarmdouble::alarm_cleared CORBA::Double  value,
const ACSErr::Completion &  c,
const ACS::CBDescOut &  desc
 

Method invoked when the double value goes back into the acceptable range.

Parameters:
value The double's new value
c Error handing structure.
desc Callback descriptor
Returns:
void

Definition at line 39 of file acsexmplCallbacksImpl.cpp.

void MyAlarmdouble::alarm_raised CORBA::Double  value,
const ACSErr::Completion &  c,
const ACS::CBDescOut &  desc
 

Method invoked when the double value goes out of range.

Parameters:
value The double's current (i.e., out of range) value
c Error handing structure.
desc Callback descriptor
Returns:
void

Definition at line 31 of file acsexmplCallbacksImpl.cpp.

CORBA::Boolean MyAlarmdouble::negotiate ACS::TimeInterval  time_to_transmit,
const ACS::CBDescOut &  desc
[inline]
 

Method used so that client and servant can agree upon the time it takes to transmit data (generally invocations of the done method).

A smart callback implementation would analize the value of time_to_transmit and decide whether the value is acceptable, but we just return true regardless in this simplistic example.

Parameters:
time_to_transmit Time to transmit data.
desc Callback descriptor
Returns:
True regardless of parameter values.

Definition at line 195 of file acsexmplCallbacks.h.


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