CARMA C++
arraytemplate.h
1 #ifndef arraytemplate_h
2 #define arraytemplate_h
3 
4 // This file defines the templates required by new_ArrayMap() for
5 // creating array maps. The resulting register map, and accompanying
6 // objects are defined in arraymap.h.
7 
8 #include "carma/szaarrayutils/arraymap.h"
9 #include "carma/szaarrayutils/regtemplate.h"
10 
11 // Uncomment the following for debugging information
12 // #define ARRAYMAP
13 
17 typedef struct {
18  char name[REG_NAME_LEN+1]; // An unambiguous name for the template
19  RegTemplate* regtemplate; // The template of registers
20  char comment_[100];
21 } RegTemp;
22 
27 typedef struct {
28  RegTemp *templates; // The array of register templates
29  unsigned ntemplate; // The number of elements in templates[]
31 
35 ArrayMap *new_ArrayMap(ArrayTemplate *arrayTmp);
36 
37 /*.......................................................................
38  * Retreive an array map template from a network buffer and convert
39  * it to an array map.
40  */
41 ArrayMap *net_get_ArrayMap(sza::array::NetBuf *net, bool old=false);
42 
46 int net_put_ArrayTemplate(ArrayTemplate *arrTmp, sza::array::NetBuf *net);
47 
48 /*.......................................................................
49  * Unpack an array map template from a network buffer.
50  */
51 ArrayTemplate *net_get_ArrayTemplate(sza::array::NetBuf *net);
52 
53 /*.......................................................................
54  * Return the space needed to pack a given array-map template
55  * into a NetBuf network buffer.
56  */
57 long net_ArrayTemplate_size(ArrayTemplate *arrayTmp);
58 
63 ArrayTemplate *del_ArrayTemplate(ArrayTemplate *arrayTmp);
64 
65 #endif
......................................................................
Definition: regtemplate.h:139
......................................................................
Definition: arraytemplate.h:27
......................................................................
Definition: arraytemplate.h:17