Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*---------------------------------------------
- - SDO-Info Header
- -----------------------------------------------*/
- typedef struct MBX_STRUCT_PACKED_START
- {
- UINT16 InfoHead; /**< \brief Opcode, Incomplete flag and 8 reserved bits*/
- #define INFOHEAD_OPCODE_MASK 0x007F /**< \brief Opcode mask*/
- #define INFOHEAD_OPCODE_SHIFT 0 /**< \brief Opcode shift*/
- #define INFOHEADER_INCOMPLETE_MASK 0x0080 /**< \brief Incomplete mask*/
- #define INFOHEADER_INCOMPLETE_SHIFT 0 /**< \brief Incomplete shift, the incomplete value "SDOINFOSERVICE_INCOMPLETE" is defined as a UINT8 => no shift required*/
- UINT16 FragmentsLeft; /**< \brief Number of fragments which will follow*/
- union MBX_STRUCT_PACKED_START
- {
- TSDOINFOLIST List;/**< \brief List data*/
- TSDOINFOOBJ Obj;/**< \brief Object Description data*/
- TSDOINFOENTRY Entry;/**< \brief Entry description data*/
- TSDOINFOERROR Error;/**< \brief Error data*/
- UINT16 Data[1];/**< \brief Unspecified data*/
- }MBX_STRUCT_PACKED_END
- Data;/**< \brief Service data*/
- }MBX_STRUCT_PACKED_END
- TSDOINFOHEADER;
- /*---------------------------------------------
- - SOE Structures
- -----------------------------------------------*/
- /** \brief SoE Header*/
- typedef struct MBX_STRUCT_PACKED_START
- {
- union MBX_STRUCT_PACKED_START
- {
- UINT16 Word; /**< \brief Flags buffer*/
- #define SOEFLAGS_OPCODE 0x0007 /**< \brief SoE Flags*/
- /**<
- * 0 = unused<br>
- * 1 = readReq<br>
- * 2 = readRes<br>
- * 3 = writeReq<br>
- * 4 = writeRes<br>
- * 5 = notification (command changed notification)*/
- #define SOEFLAGS_INCOMPLETE 0x0008 /**< \brief more follows*/
- #define SOEFLAGS_ERROR 0x0010 /**< \brief an error word follows*/
- #define SOEFLAGS_DRIVENO 0x00E0 /**< \brief drive number*/
- #define SOEFLAGS_DATASTATE 0x0100 /**< \brief Data state follows or requested*/
- #define SOEFLAGS_NAME 0x0200 /**< \brief Name follows or requested*/
- #define SOEFLAGS_ATTRIBUTE 0x0400 /**< \brief Attribute follows or requested*/
- #define SOEFLAGS_UNIT 0x0800 /**< \brief Unit follows or requested*/
- #define SOEFLAGS_MIN 0x1000 /**< \brief Min value follows or requested*/
- #define SOEFLAGS_MAX 0x2000 /**< \brief Max value follows or requested*/
- #define SOEFLAGS_VALUE 0x4000 /**< \brief Value follows or requested*/
- #define SOEFLAGS_DEFAULT 0x8000 /**< \brief Default value*/
- }MBX_STRUCT_PACKED_END
- Flags;/**< \brief Flags variable*/
- UINT16 IDN_Frag; /**< \brief IDN fragments
- *
- * if (InComplete==0) SERCOS IDN else FragmentsLeft
- */
- }MBX_STRUCT_PACKED_END
- TSOEHEADER;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement