28 typedef uint64_t IEC_LWORD; |
27 typedef uint64_t IEC_LWORD; |
29 |
28 |
30 typedef float IEC_REAL; |
29 typedef float IEC_REAL; |
31 typedef double IEC_LREAL; |
30 typedef double IEC_LREAL; |
32 |
31 |
33 |
32 #pragma pack(push,1) |
34 #if !defined __timespec_defined && !defined __time_t_defined |
33 typedef struct { |
35 # define __timespec_defined 1 |
|
36 |
|
37 struct timespec |
|
38 { |
|
39 long int tv_sec; /* Seconds. */ |
34 long int tv_sec; /* Seconds. */ |
40 long int tv_nsec; /* Nanoseconds. */ |
35 long int tv_nsec; /* Nanoseconds. */ |
41 }; |
36 }IEC_TIMESPEC; |
|
37 #pragma pack(pop) |
42 |
38 |
43 #endif |
39 typedef IEC_TIMESPEC IEC_TIME; |
44 |
40 typedef IEC_TIMESPEC IEC_DATE; |
45 typedef struct timespec IEC_TIME; |
41 typedef IEC_TIMESPEC IEC_DT; |
46 typedef struct timespec IEC_DATE; |
42 typedef IEC_TIMESPEC IEC_TOD; |
47 typedef struct timespec IEC_DT; |
|
48 typedef struct timespec IEC_TOD; |
|
49 |
43 |
50 #ifndef STR_MAX_LEN |
44 #ifndef STR_MAX_LEN |
51 #define STR_MAX_LEN 126 |
45 #define STR_MAX_LEN 126 |
52 #endif |
46 #endif |
53 |
47 |
54 #ifndef STR_LEN_TYPE |
48 #ifndef STR_LEN_TYPE |
55 #define STR_LEN_TYPE int8_t |
49 #define STR_LEN_TYPE int8_t |
56 #endif |
50 #endif |
57 |
51 |
58 typedef STR_LEN_TYPE __strlen_t; |
52 typedef STR_LEN_TYPE __strlen_t; |
|
53 #pragma pack(push,1) |
59 typedef struct { |
54 typedef struct { |
60 __strlen_t len; |
55 __strlen_t len; |
61 uint8_t body[STR_MAX_LEN]; |
56 uint8_t body[STR_MAX_LEN]; |
62 } IEC_STRING; |
57 } IEC_STRING; |
|
58 #pragma pack(pop) |
63 |
59 |
64 #endif /*IEC_TYPES_H*/ |
60 #endif /*IEC_TYPES_H*/ |