etisserant@137: #ifndef IEC_TYPES_H etisserant@137: #define IEC_TYPES_H etisserant@137: etisserant@59: #include etisserant@59: #include etisserant@59: #include etisserant@59: etisserant@59: /*********************/ etisserant@59: /* IEC Types defs */ etisserant@59: /*********************/ etisserant@59: etisserant@59: typedef uint8_t IEC_BOOL; etisserant@59: etisserant@59: typedef int8_t IEC_SINT; etisserant@59: typedef int16_t IEC_INT; etisserant@59: typedef int32_t IEC_DINT; etisserant@59: typedef int64_t IEC_LINT; etisserant@59: etisserant@59: typedef uint8_t IEC_USINT; etisserant@59: typedef uint16_t IEC_UINT; etisserant@59: typedef uint32_t IEC_UDINT; etisserant@59: typedef uint64_t IEC_ULINT; etisserant@59: etisserant@59: typedef uint8_t IEC_BYTE; etisserant@59: typedef uint16_t IEC_WORD; etisserant@59: typedef uint32_t IEC_DWORD; etisserant@59: typedef uint64_t IEC_LWORD; etisserant@59: etisserant@59: typedef float IEC_REAL; etisserant@59: typedef double IEC_LREAL; etisserant@59: Edouard@254: typedef struct { etisserant@59: long int tv_sec; /* Seconds. */ etisserant@59: long int tv_nsec; /* Nanoseconds. */ Edouard@256: }__attribute__((packed)) IEC_TIMESPEC; etisserant@59: Edouard@254: typedef IEC_TIMESPEC IEC_TIME; Edouard@254: typedef IEC_TIMESPEC IEC_DATE; Edouard@254: typedef IEC_TIMESPEC IEC_DT; Edouard@254: typedef IEC_TIMESPEC IEC_TOD; etisserant@59: etisserant@161: #ifndef STR_MAX_LEN lbessard@170: #define STR_MAX_LEN 126 etisserant@161: #endif etisserant@161: etisserant@161: #ifndef STR_LEN_TYPE etisserant@163: #define STR_LEN_TYPE int8_t etisserant@161: #endif etisserant@161: etisserant@161: typedef STR_LEN_TYPE __strlen_t; etisserant@59: typedef struct { etisserant@59: __strlen_t len; etisserant@59: uint8_t body[STR_MAX_LEN]; Edouard@256: } __attribute__((packed)) IEC_STRING; etisserant@59: etisserant@137: #endif /*IEC_TYPES_H*/