versadac  1
versadac - Scalable Recorder Firmware
am_historybatchstart.h
1 /*****************************************************************************
2 FILE : am_historybatchstart.h
3 VERSION : $Id: am_historybatchstart.h 4938 2006-10-10 14:20:18Z martinto $
4 AUTHOR : Sandra Herring
5 SYSTEM : GNU C++ for Power PC
6 DESCRIPTION : Header file for History Batch Start record.
7 *****************************************************************************/
8 
9 #if !defined(__AM_HISTORYBATCHSTART_H)
10 #define __AM_HISTORYBATCHSTART_H
11 
12 #if !defined(__AM_HISTORYRECORD_H)
13 #include "am_historyrecord.h"
14 #endif
15 
16 // ***************************************************************************
17 // Batch Header Record class
18 // ***************************************************************************
19 
21 {
22  public :
23 
24 /*------------------------------------------------------------------------------
25 FUNCTION : AM_HistoryBatchStart constructor
26 DESCRIPTION :
27 ARGUMENTS : None.
28 RETURN : N/A
29 NOTES :
30 ------------------------------------------------------------------------------*/
32 
33 /*------------------------------------------------------------------------------
34 FUNCTION : AM_HistoryBatchStart destructor
35 DESCRIPTION :
36 ARGUMENTS : None.
37 RETURN : N/A
38 NOTES :
39 ------------------------------------------------------------------------------*/
40  virtual ~AM_HistoryBatchStart();
41 
42 /*------------------------------------------------------------------------------
43 FUNCTION : AM_HistoryBatchStart getBatchName
44 DESCRIPTION : provides the batch name from the record (ie the first field data)
45 ARGUMENTS : None.
46 RETURN : batch name
47 NOTES :
48 ------------------------------------------------------------------------------*/
49  const char * getBatchName();
50 
51 /*------------------------------------------------------------------------------
52 FUNCTION : AM_HistoryBatchStart::getTicksSinceStart
53 DESCRIPTION : returns the batch start time in ticks relative to the start record time
54 ARGUMENTS : none.
55 RETURN : batch start time
56 NOTES :
57 ------------------------------------------------------------------------------*/
58  double getTicksSinceStart();
59 
60  // virtual services inherited from class AM_HistoryRecord, that must be supplied
61  // by derived type
62 
63  virtual sint32 read( AM_HistoryStream & stream );
64  virtual uint16 recordID();
65 
66  // non-virtual services
67 
68  private:
69  // start time in ticks rel to start record
70  double m_TicksSinceStart;
71  char m_BatchName[61];
72 
73 
74 }; // class AM_HistoryBatchStart
75 
76 
77 // ****************************************
78 // inline services for class Batch Header
79 // ****************************************
80 
81 /*------------------------------------------------------------------------------
82 FUNCTION : AM_HistoryBatchStart constructor
83 DESCRIPTION :
84 ARGUMENTS : None.
85 RETURN : N/A
86 NOTES :
87 ------------------------------------------------------------------------------*/
88 inline AM_HistoryBatchStart::AM_HistoryBatchStart()
89  : m_TicksSinceStart(0.0)
90 {
91  *m_BatchName = '\0';
92 }
93 
94 /*------------------------------------------------------------------------------
95 FUNCTION : AM_HistoryBatchStart destructor
96 DESCRIPTION :
97 ARGUMENTS : None.
98 RETURN : N/A
99 NOTES :
100 ------------------------------------------------------------------------------*/
101 inline AM_HistoryBatchStart::~AM_HistoryBatchStart()
102 {}
103 
104 /*------------------------------------------------------------------------------
105 FUNCTION : AM_HistoryBatchStart getBatchName
106 DESCRIPTION : provides the batch name from the record (ie the first field data)
107 ARGUMENTS : None.
108 RETURN : batch name
109 NOTES :
110 ------------------------------------------------------------------------------*/
111 inline const char * AM_HistoryBatchStart::getBatchName()
112 {
113  return m_BatchName;
114 }
115 
116 /*------------------------------------------------------------------------------
117 FUNCTION : AM_HistoryBatchStart::getTicksSinceStart
118 DESCRIPTION : returns the batch start time in ticks relative to the start record time
119 ARGUMENTS : none.
120 RETURN : batch start time
121 NOTES :
122 ------------------------------------------------------------------------------*/
123 inline double AM_HistoryBatchStart::getTicksSinceStart()
124 {
125  return m_TicksSinceStart;
126 }
127 
128 #endif
129 
Definition: am_historystream.h:23
Definition: am_historyrecord.h:29
Definition: am_historybatchstart.h:20