CARMA C++
PhaseSwitchColumnEntry.h
1 
11 #ifndef CARMA_UTIL_PHASESWITCHCOLUMNENTRY_H
12 #define CARMA_UTIL_PHASESWITCHCOLUMNENTRY_H
13 
14 // System Includes
15 #include <string.h>
16 #include <sstream>
17 #include <errno.h>
18 
19 // CARMA Includes
21 
22 
23 #define PHASESWITCH_COLUMN_SLOT_LENGTH 1024 // Number of slots in phase switch sequence
24 #define PHASESWITCH_COLUMN_BYTE_LENGTH (PHASESWITCH_COLUMN_SLOT_LENGTH*2)/8 // In bytes, slots * 2bits/entry
25 
26 #define NUM_ENG_COLUMNS 7
27 
28 #define ENG_SEQ_1 0
29 #define ENG_SEQ_2 1
30 #define ENG_SEQ_3 2
31 #define ENG_SEQ_4 3
32 #define ENG_SEQ_5 4
33 #define ENG_SEQ_6 5
34 #define ENG_SEQ_7 6
35 
36 namespace carma
37 {
38  namespace util
39  {
40 
50  {
51  public:
52 
53  PhaseSwitchColumnEntry( unsigned char *columnData ) throw ( carma::util::BaseException );
54  PhaseSwitchColumnEntry( void ) throw ( carma::util::BaseException ); // place holder
55 
57 
58  PhaseSwitchColumnEntry *createColumn( short psStepLength, short columnNum )
60 
61  unsigned char *getColumn();
62 
63  void compactEngColumn( short columnId );
64  unsigned char getCRC();
65 
66  private:
67  static unsigned char const crcTable[];
68  static unsigned short const engPhaseSwitchColumns[PHASESWITCH_COLUMN_SLOT_LENGTH][NUM_ENG_COLUMNS];
69 // static unsigned short const engPhaseSwitchColumns[2][1]={{0},{0}};
70  unsigned char *columnData_;
71 
72  }; // class PhaseSwitchColumnEntry
73  }; // util namespace
74 }; // carma namespace
75 
76 
77 #endif // CARMA_UTIL_PHASESWITCHCOLUMNENTRY_H
78 
This is the include file for Carma exception handling utilities.
Base exception class for managing carma errors.
Definition: BaseException.h:48
The purpose of the PhaseSwitchColumnEntry class is to present an abstract representation of phase swi...