European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

trkwsPOS_READ_LIST Class Reference

See man page trkwsPOS_READ_LIST(4)
More...

#include <trkwsPOS_READ_LIST.h>

Collaboration diagram for trkwsPOS_READ_LIST:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 trkwsPOS_READ_LIST (const dbSYMADDRESS dbPoint, fndOBJECT *obj, const evhCB_METHOD procedure)
virtual ~trkwsPOS_READ_LIST ()
ccsCOMPL_STAT ReadPosition ()
ccsCOMPL_STAT Match (vltDOUBLE timeStamp, vltDOUBLE maxDifference=0.0)
ccsCOMPL_STAT Select (vltINT32 offset)
trkwsRING_BUFFERRingBuffer ()
evtEVENT & Evt ()
vltDOUBLE Position ()
vltDOUBLE AlphaAgc ()
vltDOUBLE DeltaAgc ()
vltDOUBLE PosEncoder ()
vltDOUBLE TimeStamp ()
const char * DbPoint ()

Private Attributes

dbSYMADDRESS dbPoint
trkwsRING_BUFFER ringBuffer
evtEVENT evt
dbLISTID listId
vltDOUBLE position
vltDOUBLE posEncoder
vltDOUBLE timeStamp
vltDOUBLE alphaAgc
vltDOUBLE deltaAgc
fndOBJECT * obj
const evhCB_METHOD procedure

Detailed Description

See man page trkwsPOS_READ_LIST(4)
Manpage of trkwsPOS_READ_LIST

trkwsPOS_READ_LIST

Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:11
Index Return to man pages list
 

NAME

trkwsPOS_READ_LIST - Support class for axes position in LCU db image

 

SYNOPSIS


#include "trkwsPOS_READ_LIST.h"

trkwsPOS_READ_LIST myList(dbPoint,obj,procedure);

 

PARENT CLASS


  public fndOBJECT
  public eccsERROR_CLASS

 

DESCRIPTION


This is a support class used by trkwsPOS_CALC(4) in order to handle new
position events coming from the database image of axis LCUs
This class handle:
   - Attaching and detaching of the callback for handling the "new position" event.
     The LCU image is linked via the scan system to the LCU point containing
     information about axis' position.
     Whenever a new value is written in the LCU, the workstation image is updated.
     An event is attached at construction time to the "timestamp" attribute of the
     LCU image, so that whenever a new value is received, the defined callback
     is executed.
   - Reading values for position from the database and storing them in a circular
     buffer.
     The ReadPosition() method, performs an atomic (multiple read) read of timestamp,
     position and row encoder position from the LCU image and saves these value in the
     next available entry of an internal circualr buffer.
   - Access to the circular buffer.
     The values stored in the circular buffer can be accessed by index via the Select()
     method or for a timestamp to be matched via the Match() method.

Access to data is base on the concept of "selected entry".
The position, encoder position and time stamp for last ring buffer entry selected
by calling ReadPosition(), Match() or Select() are available via the access methods
Position(), PosEncoder() and TimeStamp().

 

PUBLIC METHODS


  trkwsPOS_READ_LIST(const dbSYMADDRESS dbPoint,
           fndOBJECT *obj,
           const evhCB_METHOD procedure);
  virtual ~trkwsPOS_READ_LIST();
     Constructor and destructor.
     The constructor attach the event to the attribute of the dbPoint
     database address defined in trkwsDefines.h as trkwsAXIS_TIMESTAMP_ATTRNAME
     It is assumed that dbPoint is an instance of the dbl class trkwsTRACK_AXIS.
     It also build the list of attributes to be read when ReadPosition() is called.
     Using a dbMultiRead() warranties that consistent values are read.

  ccsCOMPL_STAT     ReadPosition();
     Calls dbMultiRead to atomically read timestamp, position and encoder position
     from the database and stores them on the next entry in the circular buffer.
     Returns FAILURE is the values cannot be read.

  ccsCOMPL_STAT     Match(vltDOUBLE timeStamp, vltDOUBLE maxDifference=0);
     Searches the circular buffer for an entry matching the given time stamp.
     If maxDifference != 0, two values are considered matching is their
     difference is lower than this value.
     If no match exist, returns FAILURE and set the selected values to 0.

  ccsCOMPL_STAT     Select(vltINT32 offset);
     Select from the circular buffer an entry with the given offset (see
     trkwsRING_BUFFER(4) for details).
     If no match exist, returns FAILURE and set the selected values to 0.

  trkwsRING_BUFFER &RingBuffer();
     Returns a reference to the ring buffer.

  evtEVENT         &Evt();
     Returns a reference to the event object

  const char *DbPoint();
     Returns  base point for the LCU image

  vltDOUBLE         Position();
  vltDOUBLE         PosEncoder();
  vltDOUBLE         TimeStamp();
     Return position, encoder position or time stamp for the currently selected
     entry in the ring buffer.

 

PRIVATE DATA MEMBERS


  dbSYMADDRESS     dbPoint;       Base point for the LCU image
  trkwsRING_BUFFER ringBuffer;    The ring buffer (20 entries)
  evtEVENT         evt;           The event handling object

  dbLISTID         listId;        Identifier for CCS multi read list
  vltDOUBLE        position;      Position of the selected entry
  vltDOUBLE        posEncoder;    Encoder position of the selected entry
  vltDOUBLE        timeStamp;     Time stamp of the selected entry

  fndOBJECT          *obj;        Owner object of the callback procedure
  const evhCB_METHOD  procedure;  Callback procedure to execute on event

 

SEE ALSO


trkwsPOS_CALC(4) trkwsRING_BUFFER(4)



 

Index

NAME
SYNOPSIS
PARENT CLASS
DESCRIPTION
PUBLIC METHODS
PRIVATE DATA MEMBERS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 10:11:26 GMT, April 23, 2012

Definition at line 29 of file trkwsPOS_READ_LIST.h.


Constructor & Destructor Documentation

trkwsPOS_READ_LIST::trkwsPOS_READ_LIST ( const dbSYMADDRESS  dbPoint,
fndOBJECT *  obj,
const evhCB_METHOD  procedure 
)
trkwsPOS_READ_LIST::~trkwsPOS_READ_LIST (  )  [virtual]

Member Function Documentation

vltDOUBLE trkwsPOS_READ_LIST::AlphaAgc (  )  [inline]

Definition at line 45 of file trkwsPOS_READ_LIST.h.

References alphaAgc.

Referenced by trkwsPOS_CALC::ActPosDbEventCB().

const char* trkwsPOS_READ_LIST::DbPoint (  )  [inline]

Definition at line 50 of file trkwsPOS_READ_LIST.h.

vltDOUBLE trkwsPOS_READ_LIST::DeltaAgc (  )  [inline]

Definition at line 46 of file trkwsPOS_READ_LIST.h.

References deltaAgc.

Referenced by trkwsPOS_CALC::ActPosDbEventCB().

evtEVENT& trkwsPOS_READ_LIST::Evt (  )  [inline]

Definition at line 42 of file trkwsPOS_READ_LIST.h.

References evt.

Referenced by trkwsPOS_CALC::ActPosDbEventCB().

ccsCOMPL_STAT trkwsPOS_READ_LIST::Match ( vltDOUBLE  timeStamp,
vltDOUBLE  maxDifference = 0.0 
)
vltDOUBLE trkwsPOS_READ_LIST::PosEncoder (  )  [inline]

Definition at line 47 of file trkwsPOS_READ_LIST.h.

References posEncoder.

Referenced by trkwsPOS_CALC::ActPosDbEventCB().

vltDOUBLE trkwsPOS_READ_LIST::Position (  )  [inline]

Definition at line 44 of file trkwsPOS_READ_LIST.h.

References position.

Referenced by trkwsPOS_CALC::ActPosDbEventCB().

ccsCOMPL_STAT trkwsPOS_READ_LIST::ReadPosition (  ) 
trkwsRING_BUFFER& trkwsPOS_READ_LIST::RingBuffer (  )  [inline]

Definition at line 41 of file trkwsPOS_READ_LIST.h.

References ringBuffer.

Referenced by Match(), and Select().

ccsCOMPL_STAT trkwsPOS_READ_LIST::Select ( vltINT32  offset  ) 
vltDOUBLE trkwsPOS_READ_LIST::TimeStamp (  )  [inline]

Definition at line 48 of file trkwsPOS_READ_LIST.h.

Referenced by trkwsPOS_CALC::ActPosDbEventCB().


Member Data Documentation

vltDOUBLE trkwsPOS_READ_LIST::alphaAgc [private]

Definition at line 61 of file trkwsPOS_READ_LIST.h.

Referenced by AlphaAgc().

dbSYMADDRESS trkwsPOS_READ_LIST::dbPoint [private]

Definition at line 53 of file trkwsPOS_READ_LIST.h.

Referenced by ~trkwsPOS_READ_LIST().

vltDOUBLE trkwsPOS_READ_LIST::deltaAgc [private]

Definition at line 62 of file trkwsPOS_READ_LIST.h.

Referenced by DeltaAgc().

evtEVENT trkwsPOS_READ_LIST::evt [private]

Definition at line 55 of file trkwsPOS_READ_LIST.h.

Referenced by Evt(), and ~trkwsPOS_READ_LIST().

dbLISTID trkwsPOS_READ_LIST::listId [private]

Definition at line 57 of file trkwsPOS_READ_LIST.h.

Referenced by ReadPosition(), and ~trkwsPOS_READ_LIST().

fndOBJECT* trkwsPOS_READ_LIST::obj [private]

Definition at line 64 of file trkwsPOS_READ_LIST.h.

Referenced by ~trkwsPOS_READ_LIST().

vltDOUBLE trkwsPOS_READ_LIST::posEncoder [private]

Definition at line 59 of file trkwsPOS_READ_LIST.h.

Referenced by Match(), PosEncoder(), ReadPosition(), and Select().

vltDOUBLE trkwsPOS_READ_LIST::position [private]

Definition at line 58 of file trkwsPOS_READ_LIST.h.

Referenced by Match(), Position(), ReadPosition(), and Select().

const evhCB_METHOD trkwsPOS_READ_LIST::procedure [private]

Definition at line 65 of file trkwsPOS_READ_LIST.h.

Referenced by ~trkwsPOS_READ_LIST().

Definition at line 54 of file trkwsPOS_READ_LIST.h.

Referenced by ReadPosition(), and RingBuffer().

vltDOUBLE trkwsPOS_READ_LIST::timeStamp [private]

Definition at line 60 of file trkwsPOS_READ_LIST.h.

Referenced by Match(), ReadPosition(), and Select().


The documentation for this class was generated from the following files:
Generated on Mon Apr 23 10:12:57 2012 for INTROOT API by doxygen 1.6.3