CARMA C++
DataArray.h
Go to the documentation of this file.
1 #ifndef SZA_UTIL_DATAARRAY_H
2 #define SZA_UTIL_DATAARRAY_H
3 
11 // Required C header files from the array control code
12 
13 #include "carma/szaarrayutils/regmap.h" // RegAddrMode
14 
15 namespace sza {
16  namespace util {
17 
22  class DataArray {
23  public:
24 
30  static void pack(RegAddrMode addrMode, unsigned int flags,
31  unsigned int* destination, unsigned int* source,
32  unsigned short first, unsigned short nreg);
33 
39  static void unpack(RegAddrMode addrMode, unsigned int flags,
40  unsigned int* destination, unsigned int* source,
41  unsigned short first, unsigned short nreg);
42 
46  static unsigned short byteLength(RegAddrMode addrMode,
47  unsigned short nreg);
48 
49  private:
50 
54  DataArray();
55 
59  static DataArray dataArray_;
60 
61  }; // End class DataArray
62 
63  }; // End namespace util
64 }; // End namespace sza
65 
66 #endif // End #ifndef SZA_UTIL_DATAARRAY_H
static unsigned short byteLength(RegAddrMode addrMode, unsigned short nreg)
Return the length, in bytes of a register un/packing operation.
A class to encapsulate data packaging for different address modes.
Definition: DataArray.h:22
static void pack(RegAddrMode addrMode, unsigned int flags, unsigned int *destination, unsigned int *source, unsigned short first, unsigned short nreg)
Pack a source data array of unsigned longs into a destination array of different types, using different addressing modes.
static void unpack(RegAddrMode addrMode, unsigned int flags, unsigned int *destination, unsigned int *source, unsigned short first, unsigned short nreg)
Unpack a source data array of different types into a destination array of unsigned longs...