00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _C_PROTOCOLCONTEXT_
00021 #define _C_PROTOCOLCONTEXT_
00022
00023 #include "Utils.hpp"
00024 #include "ProtocolDataType.hpp"
00025 #include "list_t.hpp"
00026
00027
00028
00029 class C_ProtocolContext {
00030
00031 public:
00032
00033 typedef struct _struct_value {
00034 int m_id_field ;
00035 unsigned char *m_position_ptr ;
00036 } T_PositionValue, *T_pPositionValue ;
00037
00038 typedef struct _struct_ctxt_value {
00039 T_ValueData m_ctxt_value ;
00040 T_PositionValue m_ctxt_position ;
00041 } T_CtxtValue, *T_pCtxtValue ;
00042
00043
00044 C_ProtocolContext(int P_nb_values) ;
00045
00046 ~C_ProtocolContext() ;
00047
00048 void reset_ctxt_values(int P_index = 0) ;
00049 void update_ctxt_values(int P_id, int P_size) ;
00050 void update_ctxt_values(int P_nbCtx, int *P_idTable, int P_size) ;
00051
00052 int update_ctxt_values_decode(int P_nbCtx,
00053 int *P_idTable,
00054 int P_size) ;
00055
00056 void start_ctxt_value(int P_ctxt_id, int P_size) ;
00057
00058 void update_ctxt_position(int P_id, T_pPositionValue P_position_value) ;
00059
00060 unsigned long get_counter_ctxt(int P_ctxt_id) ;
00061
00062 bool end_counter_ctxt() ;
00063
00064
00065 bool m_end_ctxt_counter ;
00066
00067 int m_nb_values ;
00068 T_pCtxtValue m_ctxt_val_table ;
00069
00070
00071 private:
00072
00073
00074 } ;
00075
00076 #endif // _C_PROTOCOLCONTEXT_
00077
00078
00079
00080
00081
00082
00083
00084
00085