In file rtddinput.h:

class rtddManager : public channelHandler

Class for channel input from the rtdd.

Inheritance:


Public Methods

explicit rtddManager (gdsStorage* dat = 0, testpointMgr* TPMgr = 0, double Lazytime = 0)
Default constructor
~rtddManager ()
Destructor.
bool connect (const char* server = 0, int port = 0)
Connect method.
bool init (gdsStorage* dat = 0)
Init method.
bool init (testpointMgr* TPMgr)
Init method.
bool areSet () const
Are channels set method.
bool areUsed () const
Are channels used method.
bool set (tainsec_t start = 0, tainsec_t* active = 0)
Set method.
bool set (taisec_t start, taisec_t duration)
Set method.
bool busy () const
Busy method.
bool clear (bool lazy = false)
Clear method.
bool add (const string& name, int* inUseCount = 0)
Add method.
bool add (const rtddChannel& chn, int* inUseCount = 0)
Add method.
bool add (const string& chnname, const rtddChannel::partitionlist& partitions, bool useActiveTime = false)
Add method.
bool add (const string& name, int Decimate1, int Decimate2 = 1, tainsec_t Zoomstart = 0, double Zoomfreq = 0, bool rmvDelay = true)
Add method.
bool del (const string& chnname)
Delete method.
bool del ()
Delete method.
bool reset (const string& chnname)
Reset method.
bool reset ()
Reset method.
tainsec_t timeStamp () const
Time stamp method.
tainsec_t maxDelay () const
Time delay method.
tainsec_t receivedTime () const
Receive time method.

Protected Fields

typedef std::vector <rtddChannel> channellist
channel list
mutable recursivemutex mux
mutex to protect object
gdsStorage* storage
Pointer to storage object
testpointMgr* tpMgr
Pointer to test point object
channellist channels
list of RTDD channels
double lazytime
time to keep test points around after clear/delete
double cleartime
time when a lazy clear occured (0 indicates no clear)
bool RTmode
Real-time mode?
bool fastUpdate
fast/slow NDS writer?
tainsec_t lasttimestamp
timestamp of last data transfer
tainsec_t stoptime
stop time of transfer (when reading old data)
tainsec_t lasttime
actual time when last data transfer occured
DAQSocket nds
NDS interface object

Protected Methods

channellist::iterator find (const string& name) const
Find method.
void cleanup ()
Cleanup method.

Inherited from channelHandler:

Public Fields

char siteDefault
char siteForce
char ifoDefault
char ifoForce

Public Methods

bool setSiteIfo(char SiteDefault, char SiteForce, char IfoDefault, char IfoForce)
bool channelInfo(const string& name, gdsChnInfo_t& info) const
string channelName(const string& name) const

Documentation

Class for reading a set of channels from the real-time data distribution system. This object manages a list of rtddChannel objects. Usage: In general, a diagnostics test should only use add and del methods at the beginning and end of the test, respectively. On the other hand a diagnostics supervisory task should use set and clear to start and stop the data flow.

explicit rtddManager(gdsStorage* dat = 0, testpointMgr* TPMgr = 0, double Lazytime = 0)
Constructs a real-time data distribution management object.
Parameters:
dat - storage object
TPmgr - test point manager
Lazytime - Time to wait for cleanup after a lazy clear

~rtddManager()
Destructs a real-time data distribution management object.

bool connect(const char* server = 0, int port = 0)
Establishes connection to the network data server. If the server is a 0 pointer (default), the server name is read from the parameter file. If the port number is zero (default), the port number is read from parameter file.
Returns:
true if successful
Parameters:
server - name of NDS
port - port number of NDS

bool init(gdsStorage* dat = 0)
Initializes the storage object pointer.
Returns:
true if successful
Parameters:
dat - storage object

bool init(testpointMgr* TPMgr)
Initializes the test point manager pointer.
Returns:
true if successful
Parameters:
TPMgr - test point manager

bool areSet() const
Returns true if all channels are set active.
Returns:
true if set

bool areUsed() const
Returns true if all channels are in use.
Returns:
true if set

bool set(tainsec_t start = 0, tainsec_t* active = 0)
Requests channel data by sending a request to the RTDD API. (This will not set test points!) This method will request on-line data from the NDS.
Returns:
true if successful
Parameters:
start - time when channels are needed
active - time when channels become available

bool set(taisec_t start, taisec_t duration)
Requests channel data by sending a request to the RTDD API. (This will not set test points!) This method works with a start time and duration and therefore will lookup data from the NDS archive. Start time and duration are given in multiples of GPS seconds.
Returns:
true if successful
Parameters:
start - start time of request
duration - requested time interval

bool busy() const
Returns true if the RTDD is currently busy reading data from the NDS.
Returns:
true if busy

bool clear(bool lazy = false)
Clears channels by sending a request to the RTDD API. (This will not clear test points!)
Returns:
true if successful
Parameters:
lazy - lazy clear if true

bool add(const string& name, int* inUseCount = 0)
Adds a channel to the internal list. (Channel is added to the test point manager if it is a test point.) Optionally, the inUse count (after adding it) of the channel is returned.
Returns:
true if successful
Parameters:
name - channel name
inUseCount - number of uses (return)

bool add(const rtddChannel& chn, int* inUseCount = 0)
Adds a channel to the internal list. (Channel is added to the test point manager if it is a test point.) Optionally, the inUse count (after adding it) of the channel is returned.
Returns:
true if successful
Parameters:
chn - channel information
inUseCount - number of uses (return)

bool add(const string& chnname, const rtddChannel::partitionlist& partitions, bool useActiveTime = false)
Adds a partitions to a channel.
Returns:
true if successful
Parameters:
chnname - name of channel
partitions - partition list
useActiveTime - if true active time will be used

bool add(const string& name, int Decimate1, int Decimate2 = 1, tainsec_t Zoomstart = 0, double Zoomfreq = 0, bool rmvDelay = true)
Adds a preprocessing stage to a channel.
Returns:
true if successful
Parameters:
chnname - name of channel
Decimate1 - first decimation rate (power of 2)
Decimate2 - second decimation rate (power of 2)
Zoomstart - time zero for down-conversion
Zoomfreq - down-conversion frequency
rmvDelay - remove decimation filter delay

bool del(const string& chnname)
Deletes a channel from the internal list. If a lazy clear was done, the the list entry is only marked for deletion. (Channel is deleted from the test point manager if it is a test point.)
Returns:
true if successful
Parameters:
chnname - name of channel

bool del()
Deletes all channels from the internal list. Ignores lazy clear and always deletes all channels. (Channel are deleted from the test point manager if they are test points.)
Returns:
true if successful

bool reset(const string& chnname)
Resets a channel from the internal list.
Returns:
true if successful
Parameters:
chnname - name of channel

bool reset()
Resets all channels from the internal list.
Returns:
true if successful

tainsec_t timeStamp() const
Returns the time of the received data blocks. This function returns the minimum of all channel time stamps. The function guarantees that all data samples from earlier time were received.
Returns:
time of received data blocks

tainsec_t maxDelay() const
Returns the maximum time delay introduced by the preprocessing (mainly FIR filter delays).
Returns:
maximum time delay through preprocessing

tainsec_t receivedTime() const
Returns the time when the last data receiving was completed. This function returns the actual time the transfer was completed rather than the time stamp of the transfer.
Returns:
last time data was received

typedef std::vector <rtddChannel> channellist
channel list

mutable recursivemutex mux
mutex to protect object

gdsStorage* storage
Pointer to storage object

testpointMgr* tpMgr
Pointer to test point object

channellist channels
list of RTDD channels

double lazytime
time to keep test points around after clear/delete

double cleartime
time when a lazy clear occured (0 indicates no clear)

bool RTmode
Real-time mode?

bool fastUpdate
fast/slow NDS writer?

tainsec_t lasttimestamp
timestamp of last data transfer

tainsec_t stoptime
stop time of transfer (when reading old data)

tainsec_t lasttime
actual time when last data transfer occured

DAQSocket nds
NDS interface object

channellist::iterator find(const string& name) const
Finds a channel. Returns channels.end() if not found.
Returns:
iterator to channel object
Parameters:
name - channel name

void cleanup()
Cleanup task. Clears channels if lazy delay has expired.


This class has no child classes.
Author:
DS, November 98
See Also:
Real-time data distribution input API

alphabetic index hierarchy of classes


Please send questions and comments to sigg_d@ligo-wa.caltech.edu


generated by doc++