From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Master/Embedded Frameworks/CMOSTConst.h | 215 ++++++++++++++++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 Master/Embedded Frameworks/CMOSTConst.h (limited to 'Master/Embedded Frameworks/CMOSTConst.h') diff --git a/Master/Embedded Frameworks/CMOSTConst.h b/Master/Embedded Frameworks/CMOSTConst.h new file mode 100644 index 0000000..6a60097 --- /dev/null +++ b/Master/Embedded Frameworks/CMOSTConst.h @@ -0,0 +1,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 -- cgit v1.2.3