Class: |
DimStampedInfo |
Library: |
DIM |
|
Author: |
C. Gaspar |
|
Version: |
v1.0 |
Update : Wed Apr 05 15:52:46 2000 |
Descrition :
To be used by DIM clients - implements DIM service
subscription and reception for
time stamped (and
quality flaged) services
DimStampedInfo requests the server to send together
with the service data a quality flag and a timestamp
DimStampedInfo inherits its behaviour from DimInfo,
please refer to it for detailed description.
Please refer to Usage for
examples.
Constructors (as for DimInfo):
Constructors for Services updated only by the
server
-
public DimStampedInfo ( char * name,
int nolink) ; Integer Service
-
public DimStampedInfo ( char * name,
float nolink) ; Float Service
-
public DimStampedInfo ( char * name,
double nolink) ; Double Service
-
public DimStampedInfo ( char * name, short nolink) ;
Short Service
-
public DimStampedInfo ( char * name, longlong nolink) ;
Longlong (64 bit) Service
-
public DimStampedInfo ( char * name,
char * nolink) ; Character String Service
-
public DimStampedInfo ( char * name,
void * nolink, int nolinksize) ; Structure (mix types) Service
Constructors for Services updated (also) on a time
basis
-
public DimStampedInfo ( char * name,
int time, int nolink) ; Integer Service
-
public DimStampedInfo ( char * name,
int time, float nolink) ; Float Service
-
public DimStampedInfo ( char * name,
int time, double nolink) ; Double Service
-
public DimStampedInfo ( char * name, int time, short nolink) ;
Short Service
-
public DimStampedInfo ( char * name, int time,
longlong nolink) ; Longlong (64 bit) Service
-
public DimStampedInfo ( char * name,
int time, char * nolink) ; Character String Service
-
public DimStampedInfo ( char * name,
int time, void * nolink, int nolinksize) ; Structure (mix types)
Service
Constructors for Services with
a Handler for multiple Services (without time)
-
public DimStampedInfo ( char * name,
int nolink, DimInfoHandler * handler) ; Integer Service
-
public DimStampedInfo ( char * name,
float nolink, DimInfoHandler * handler) ; Float Service
-
public DimStampedInfo ( char * name,
double nolink, DimInfoHandler * handler) ; Double Service
-
public DimStampedInfo ( char * name, short nolink, DimInfoHandler
* handler) ; Short Service
-
public DimStampedInfo ( char * name, longlong nolink, DimInfoHandler
* handler) ; Longlong (64 bit) Service
-
public DimStampedInfo ( char * name,
char * nolink, DimInfoHandler * handler) ; Character String Service
-
public DimStampedInfo ( char * name,
void * nolink, int nolinksize, DimInfoHandler * handler) ; Structure
(mix types) Service
Constructors for Services with
a Handler for multiple Services (with time)
-
public DimStampedInfo ( char * name,
int time, int nolink, DimInfoHandler * handler) ; Integer Service
-
public DimStampedInfo ( char * name,
int time, float nolink, DimInfoHandler * handler) ; Float Service
-
public DimStampedInfo ( char * name,
int time, double nolink, DimInfoHandler * handler) ; Double Service
-
public DimStampedInfo ( char * name, int time, short nolink, DimInfoHandler
* handler) ; Short Service
-
public DimStampedInfo ( char * name, int time,
longlong nolink, DimInfoHandler * handler) ; Longlong (64 bit) Service
-
public DimStampedInfo ( char * name,
int time, char * nolink, DimInfoHandler * handler) ; Character String
Service
-
public DimStampedInfo ( char * name,
int time, void * nolink, int nolinksize, DimInfoHandler * handler) ;
Structure (mix types) Service
Destructors :
-
public ~ DimStampedInfo ( ) ; Dim Service
Destructor
Public Functions :
Inherited from DimInfo:
-
void* getData ( ) ; Get the Service Contents
-
int getInt ( ) ; Get Integer Service Contents
-
float getFloat ( ) ; Get Float Service Contents
-
double getDouble ( ) ; Get Double Service Contents
-
short getShort ( ) ; get Short Service
Contents
-
longlong getLonglong ( ) ; get Longlong (64 bit) Service
Contents
-
char* getString ( ) ; Get String Service Contents
-
int getSize ( ) ; Get the Service Size.
-
virtual void infoHandler
( ) ; To be overloaded if Handler specified
New Functionality (The information
retrieved by the following methods is set by the sever
by using the class DimService):
-
int getQuality ( ) ; Get the Quality flag received
with the service (set by the server)
-
int getTimestamp ( ) ; Get the time stamp (in
seconds since midnight, Jan 1st 1970)
-
int getTimestampMillisecs ( ) ; Get the milliseconds
Usage :
DimStampedInfo can be used like DimInfo:
Example :
class RunNumber: public DimStampedInfo
{
public:
// subscribe to service
with handler
RunNumber(): DimStampedInfo("DELPHI/RUN_NUMBER",
-1) {}
// update handler
void infoHandler( )
{
time_t time;
time = getTimestamp();
cout << " Received: " << getInt() << " Time Stamped:
" << ctime(&time) <<
"Quality: "<< getQuality() << endl;
}
};
Last update : 02/11/99 15:53:02 by MkHelp
1.1.0