versadac  1
versadac - Scalable Recorder Firmware
am_historyrecord.h
1 /*****************************************************************************
2 FILE : am_historyrecord.h
3 VERSION : $Id: am_historyrecord.h 4938 2006-10-10 14:20:18Z martinto $
4 AUTHOR : Sandra Herring
5 SYSTEM : GNU C++ for Power PC
6 DESCRIPTION : Base class for generating spreadsheet output from a UHH record.
7 *****************************************************************************/
8 
9 #if !defined(__AM_HISTORYRECORD_H)
10 #define __AM_HISTORYRECORD_H
11 
12 extern "C"
13 {
14 #include "stdtypes.h"
15 }
16 
17 #define HISTORY_REC_ID 0x102
18 #define SEGMENT_RECORD_ID 0x103
19 #define INTERVAL_INCREASE_REC_ID 0x110
20 #define INTERVAL_DECREASE_REC_ID 0x111
21 #define REFERENCE_REC_ID 0x112
22 #define BATCH_START_REC_ID 0x11a
23 #define BATCH_STOP_REC_ID 0x11b
24 #define BATCH_HEADER_REC_ID 0x11c
25 #define SAMPLE_REC_ID 0x1fc
26 
27 class AM_HistoryStream;
28 
30 {
31  public :
32 
33 /*------------------------------------------------------------------------------
34 FUNCTION : AM_HistoryRecord::read
35 DESCRIPTION : Pure virtual service to read in member data values
36  from current position in archive file.
37 ARGUMENTS : stream : pointer to open archive file stream.
38 RETURN : TRUE if data read in successfully, otherwise FALSE.
39 NOTES : This is declared here as a pure virtual function which must
40  be supplied by the derived class.
41 ------------------------------------------------------------------------------*/
42  virtual sint32 read( AM_HistoryStream & stream ) = 0;
43 
44 /*------------------------------------------------------------------------------
45 FUNCTION : AM_HistoryRecord::recordID
46 DESCRIPTION : virtual service to return record type code
47 ARGUMENTS : None.
48 RETURN : Type code for this derivation of AM_HistoryRecord.
49 NOTES : If not required this service need not be provided by derived classes
50  this base class service returns 0
51 ------------------------------------------------------------------------------*/
52  virtual uint16 recordID();
53 
54  // non-virtual services
55 
56 /*------------------------------------------------------------------------------
57 FUNCTION : AM_HistoryRecord::verifyChecksum
58 DESCRIPTION : service to check the accumulated checksum
59  on the stream specified, against the next bytes in the
60  stream buffer.
61 ARGUMENTS : stream : pointer to open archive file stream.
62 RETURN : TRUE if checksums match, FALSE if bad or stream error.
63 NOTES :
64 ------------------------------------------------------------------------------*/
65  sint32 verifyChecksum( AM_HistoryStream & stream );
66 
67 }; // class AM_HistoryRecord
68 
69 #endif // end of __AM_HISTORYRECORD_H conditional include
70 
Definition: am_historystream.h:23
Definition: am_historyrecord.h:29