summaryrefslogtreecommitdiffstats
path: root/Master/Embedded Frameworks/CMOSTConst.h
blob: 6a60097c424a52e77e280515eafb7c69cfb7a564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
#ifndef CMOSTCONST_H
#define CMOSTCONST_H
//*****************************************************************************
//
// Project       :  FON
//

//
// File          :  CMOSTConst.h
//
// Description   :  Defines constants depending on MOST which are used in
//                  the projects
//
// Author        :  JW
//*****************************************************************************

#ifndef CGLOBAL_H
#include "CGlobal.h"
#endif

namespace CMOST
{
   enum MOSTUnit
   {
      NONE,
      MILLISEC,
      YEAR,
      MONTH,
      HOUR,
      MINUTE,
      SECOND
   };
   // elementar types used in the MOST communication
   enum ElementarTypeEnum
   {
      BOOLEAN,
      ENUM,
      INT8,
      INT16,
      INT32,
      UINT8,
      UINT16,
      UINT32,
      STRING,
      STREAM
   };

   enum StringType
   {
      UNICODE,
      ASCII,
      UTF8
   };

   enum ModelTypeEnum
   {
      SINGLE_PROP,
      RECORD_PROP,
      ARRAY_PROP,
      ARRAY_RECORD_PROP
   };

   // max properties in a MOST message
   enum {MAX_PROPERTIES_IN_A_FUNC = 5};

   // Different MOST-Operation types defined in the spec
   enum OpTypeEnum
   {
      OP_SET                      = 0x00,
      OP_START                    = 0x00,
      OP_GET                      = 0x01,
      OP_ABORT                    = 0x01,
      OP_SETGET                   = 0x02,
      OP_STARTRES                 = 0x02,
      OP_INC                      = 0x03,
      OP_DEC                      = 0x04,
      OP_GETIF                    = 0x05,
      OP_STARTRESACK              = 0x06,
      OP_ABORTACK                 = 0x07,
      OP_STARTACK                 = 0x08,
	  OP_ERRACK                   = 0x09,
	  OP_PROCACK                  = 0x0A,
      OP_PROC                     = 0x0B,
      OP_STAT                     = 0x0C,
      OP_RES                      = 0x0C,
      OP_RESACK                   = 0x0D,
      OP_IF                       = 0x0E,
      OP_ERR                      = 0x0F,

      //start of MMI internal OpTypes
      OP_INTERN_DATA              = 0x10, //used with LongArray
      OP_INTERN_ERROR             = 0x11, //used with LongArray

      OP_UNDEFINED                = 0xFF
   };

   enum OpInTypeMask
   {
      OP_STATUS_MASK = 0x1000,
      OP_ERROR_MASK  = 0x8000,
   };

   enum OpOutTypeMask
   {
      OP_SET_MASK = 0x0001,
      OP_GET_MASK = 0x0002,
      OP_SETGET_MASK = 0x0004,
      OP_INCREMENT_MASK = 0x0008,
      OP_DECREMENT_MASk = 0x0010,
      OP_GETINTERFACE_MASK = 0x0020
   };

   enum ERROR_ENUM
   {
      PROC_OK                          = 0x00,
      ERR_FBLKID_NOT_AVAILABLE         = 0x01,
      ERR_INSTID_NOT_AVAILABLE         = 0x02,
      ERR_FUNCID_NOT_AVAILABLE         = 0x03,
      ERR_OPTYPE_NOT_AVAILABLE         = 0x04,
      ERR_INVALID_LENGTH               = 0x05,
      ERR_PARAMETER_WRONG              = 0x06,
      ERR_PARAMETER_NOT_AVAILABLE      = 0x07,
      ERR_PARAMETER_MISSING            = 0x08,
      ERR_TOO_MANY_PARAMETERS          = 0x09,
      ERR_SECONDARY_NODE               = 0x0A,
      ERR_FUNCTION_SPECIFIC            = 0x20,
      ERR_BUSY                         = 0x40,
      ERR_NOT_AVAILABLE                = 0x41,
      ERR_PROCESSING                   = 0x42,

      ERR_MOST_MESSAGE_NAK             = 0xBB, //a MOST Message was not acknowledged from receiver
                                            //this should be defined > 0xFF to get out of the
                                            //specified range of MOST but before this we have
                                            //change ICAANotify* generation.
      ERR_INTERNAL_ERROR               = 0x101,
      ERR_UNRECOVERED_INTERNAL_ERROR   = 0x102, //!!! - will trigger a reset - !!!
      ERR_UNDEFINED                    = 0xFFFF
   };

   // Function Block ID's
   // The range from 0x00 to 0xBF is reserved for FBlockID's defined by the MOST Consortium
   // All ID's in this range must be uniquely defined and must match definitions in the
   // MOST Function Catalog.
   enum FBLOCK_ID_ENUM
   {
      NET_BLOCK                  = 0x01,
      NETWORK_MASTER             = 0x02,
      CONNECTION_MASTER          = 0x03,
      POWER_MASTER               = 0x04,
      VEHICLE                    = 0x05,
      DIAGNOSIS                  = 0x06,
      ROUTER                     = 0x08,
      CAR_DEVICE                 = 0x08,  // ILLEGAL: proprietary

      MMI                        = 0x10,  // ILLEGAL: but used by some projects
      SPEECH_RECOGNITION         = 0x11,
      PROMPT_PLAYER              = 0x12,
      LIST_MATCHING              = 0x13,

      AUDIO_AMPLIFIER            = 0x22,
      HEAD_PHONE_AMPLIFIER       = 0x23,
      AUXILIARY_INPUT            = 0x24,
      MICROPHONE_INPUT           = 0x26,
      HANDS_FREE                 = 0x28,

      AUDIO_TAPE_PLAYER          = 0x30,
      AUDIO_DISC_PLAYER          = 0x31,
      VERSATILE_DISC_PLAYER      = 0x34, // still prelim

      AM_FM_TUNER                = 0x40,
      TMC_TUNER                  = 0x41,
      TV_TUNER                   = 0x42,

      TELEPHONE                  = 0x50,
      PHONE_BOOK                 = 0x51,
      NAVIGATION_SYSTEM          = 0x52,
      TMC_DECODER                = 0x53,
      BLUETOOTH                  = 0x54,
      CLIMATE			         = 0xC0,
      BC_STATISTIC			     = 0xC1,
      BC_TRAVEL_INFO			 = 0xC2,
      MCNET_MMI                  = 0xC3,
      MCNET_GATEWAY              = 0xC4,
      SIMCARD_READER             = 0xC5,

      AUDIO_MASTER               = 0xD3,

      // Function Block ID's
      // The range from 0xC0 to 0xEF is reserved for FBlockID's within a project
      // These declarations may overlap with declarations from other projects
      // project specific declarations
      RESOURCE_MASTER            = 0xC0,
      COMMUNICATION_MANAGER      = 0xC7,
      CPAPPSERVICE               = 0xC9,

      // Function Block ID's
      // The range from 0xC0 to 0xEF is reserved for FBlockID's within a project
      // These declarations may overlap with declarations from other projects
      // project specific declarations
      TMC_SERVICE                = 0xC5,

      // Function Block ID for
      // CAN-T/MOST Gateway for Rear-Seat entertainment in
      // a project
      RSE                        = 0xF4,


      // The FBlockID 0xFF is a wildcard value.
      ALL                        = 0xFF};

};



#endif //CMOSTCONST_H