mswINS_CONFIG_DATA
Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:09
Index
Return to man pages list
NAME
mswINS_CONFIG_DATA - Access class to instrument configuration data
PARENT CLASS
public eccsERROR_CLASS
DESCRIPTION
This class is part of the TCS-public msw library and provides
access for TCS applications to instrument configuration data.
It access the msw instrument database consiguration table
and returns configuration information regarding the current
instrument or any other instrument in the table.
PUBLIC METHODS
mswINS_CONFIG_DATA(const dbSYMADDRESS dbPoint = dbEMPTY);
The constructor provides a default value for the dbPoint
parameter to behave like two distinct constructors: one with
no parameters and one with a dbPoint parameter.
The first one defines the online database support point calling
the standard tcsDbRoot(4) function and appending the
default relative path from the TCS database root point,
assuming a complete default TCS database structure.
This is what will be generally used.
The second one receives as parameter the symbolic address of
online database support point for the object, i.e. the point
where the object can find configuration and run time values.
This will be typically used for testing purposes.
virtual ~mswINS_CONFIG_DATA();
mswINSID &InsId();
Returns the id for the currently selected instrument.
The returned value can change at the next call of a class
method, so the user must copy the value locally upon return.
mswINS_DATA_RECORD &InsData(const mswINSID &ins = mswSELECTED_INS);
Returns the configuration data for the specified instrument
or for the currently selected instrument.
The returned value can change at the next call of a class
method, so the user must copy the value locally upon return.
See mswINS_DATA_RECORD(4) for detailes on the returned data
vltLOGICAL IsInsData(const mswINSID &ins);
Returns TRUE if the given instrument is configured in the
table and data can be retireved.
vltLOGICAL IsSelIns(const mswINSID &ins);
Returns TRUE if the given instrument is the currently selected
instrument.
virtual ccsCOMPL_STAT DbPoint(const dbSYMADDRESS point);
Sets the database support point for the class, where the table
is stored.
virtual const char *DbPoint() const;
Returns the database support point for the class, where the table
is stored.
PROTECTED METHODS
virtual ccsCOMPL_STAT LoadTable();
Loads into memory from the database the instrument configuration
table. This is currently done every time data from the table is
required. Since it is not foreseen an heavy usage of the class,
no caching or optimization is performed.
PROTECTED DATA MEMBERS
These data members whould be private and encapsulated via
access methods!
dbSYMADDRESS modPoint;
Symbolic address of the database support point for the class.
mswINS_DATA_RECORD insTable[mswNO_OF_INSTRUMENTS];
Full table of instruments.
Loaded from the database every time LoadTable() is called
PRIVATE DATA MEMBERS
mswINSID currentIns; // The current selected instrument
mswINS_DATA_RECORD lastRecord; // The last queried record
ON LINE DATABASE
These members are used to store the values retrieved by
InsId() and InsData() methods.
They can change at the next call of the methods, so the user
must copy them upon return.
The class assumes that the database support point is a subclass
of mswINS_CONFIG_DATA, with the following structure:
CLASS BASE_CLASS mswINS_CONFIG_DATA \\
BEGIN \\
ATTRIBUTE BYTES32 selectedIns "NONE" \\
ATTRIBUTE Table data( mswNO_OF_INSTRUMENTS, \\
BYTES32 insId, \\
..... \\
) \\
END \\
The detailed definition of the table record format is important only
for the class mswINS_DATA_RECORD(4); look there for details.
SEE ALSO
eccsERROR_CLASS(4), mswINS_DATA_RECORD(4)
Index
- NAME
-
- PARENT CLASS
-
- DESCRIPTION
-
- PUBLIC METHODS
-
- PROTECTED METHODS
-
- PROTECTED DATA MEMBERS
-
- PRIVATE DATA MEMBERS
-
- ON LINE DATABASE
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 10:09:27 GMT, April 23, 2012