CARMA C++
regdata.h
1 #ifndef regdata_h
2 #define regdata_h
3 
4 #include "carma/szaarrayutils/arraymap.h"
7 
8 /*
9  * Archived data on disk are recorded as big-endian 2-s complement 4-byte
10  * integers. In memory the same data is recorded in a container of the
11  * following type. RegRawData containers are allocated based on the size
12  * of the register map that is supplied to their constructor. The size
13  * of the slots[] array is equal to the number of archived registers in
14  * the register map.
15  */
16 typedef struct {
17  unsigned nslot; /* The number of elements in slots[] */
18  long *slots; /* The array of monitored registers */
19  sza::util::ArrayDataFrameManager* fm;
21 } RegRawData;
22 
23 /*
24  * Create a raw data container for a given register map.
25  * This should not be used with any other register map.
26  */
27 RegRawData *new_RegRawData(ArrayMap *arraymap, bool archivedOnly);
28 
29 /*
30  * Delete a redundant raw-data container.
31  */
32 RegRawData *del_RegRawData(RegRawData *raw);
33 
34 /*
35  * The following functions allow one to pass the contents of
36  * a RegRawData structure across a network (or equivalent byte-stream).
37  *
38  * net_RegRawData_size()
39  * returns the number of bytes needed to pack the contents of a
40  * given RegRawData object into a network buffer.
41  *
42  * net_put_RegRawData()
43  * packs the contents of a RegRawData container into a network
44  * buffer.
45  *
46  * net_get_RegRawData()
47  * unpacks the contents of a RegRawData container from a network
48  * buffer.
49  */
50 long net_RegRawData_size(RegRawData *raw);
51 int net_put_RegRawData(sza::array::NetBuf *net, RegRawData *raw);
52 int net_get_RegRawData(sza::array::NetBuf *net, RegRawData *raw);
53 
54 #endif
Tagged: Sat Mar 20 05:20:30 UTC 2004.
Tagged: Thu Oct 26 13:35:18 PDT 2006.
A class for monitoring registers to activate the pager.
Definition: PagerMonitor.h:39