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: #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: etisserant@59: etisserant@59: #if !defined __timespec_defined etisserant@59: # define __timespec_defined 1 etisserant@59: etisserant@59: struct timespec etisserant@59: { etisserant@59: long int tv_sec; /* Seconds. */ etisserant@59: long int tv_nsec; /* Nanoseconds. */ etisserant@59: }; etisserant@59: etisserant@59: #endif etisserant@59: etisserant@59: typedef struct timespec IEC_TIME; etisserant@59: typedef struct timespec IEC_DATE; etisserant@59: typedef struct timespec IEC_DT; etisserant@59: typedef struct 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]; etisserant@59: } IEC_STRING; etisserant@59: etisserant@137: #endif /*IEC_TYPES_H*/