Lely core libraries 2.3.4
type.h
Go to the documentation of this file.
1
22#ifndef LELY_CO_TYPE_H_
23#define LELY_CO_TYPE_H_
24
25#include <lely/co/co.h>
26#include <lely/libc/uchar.h>
27#include <lely/util/float.h>
28
29#include <stdint.h>
30
32#define CO_DEFTYPE_BOOLEAN 0x0001
33
35#define CO_DEFTYPE_INTEGER8 0x0002
36
38#define CO_DEFTYPE_INTEGER16 0x0003
39
41#define CO_DEFTYPE_INTEGER32 0x0004
42
44#define CO_DEFTYPE_UNSIGNED8 0x0005
45
47#define CO_DEFTYPE_UNSIGNED16 0x0006
48
50#define CO_DEFTYPE_UNSIGNED32 0x0007
51
53#define CO_DEFTYPE_REAL32 0x0008
54
56#define CO_DEFTYPE_VISIBLE_STRING 0x0009
57
59#define CO_DEFTYPE_OCTET_STRING 0x000a
60
62#define CO_DEFTYPE_UNICODE_STRING 0x000b
63
68#define CO_DEFTYPE_TIME_OF_DAY 0x000c
69
74#define CO_DEFTYPE_TIME_DIFF 0x000d
75
77#define CO_DEFTYPE_DOMAIN 0x000f
78
80#define CO_DEFTYPE_INTEGER24 0x0010
81
83#define CO_DEFTYPE_REAL64 0x0011
84
86#define CO_DEFTYPE_INTEGER40 0x0012
87
89#define CO_DEFTYPE_INTEGER48 0x0013
90
92#define CO_DEFTYPE_INTEGER56 0x0014
93
95#define CO_DEFTYPE_INTEGER64 0x0015
96
98#define CO_DEFTYPE_UNSIGNED24 0x0016
99
101#define CO_DEFTYPE_UNSIGNED40 0x0018
102
104#define CO_DEFTYPE_UNSIGNED48 0x0019
105
107#define CO_DEFTYPE_UNSIGNED56 0x001a
108
110#define CO_DEFTYPE_UNSIGNED64 0x001b
111
112#define LELY_CO_DEFINE_TYPE(a, b, c, d) typedef d co_##b##_t;
113#include <lely/co/def/type.def>
114#undef LELY_CO_DEFINE_TYPE
115
119 co_unsigned32_t ms;
121 co_unsigned16_t days;
122};
123
127 co_unsigned32_t ms;
129 co_unsigned16_t days;
130};
131
132#ifdef __cplusplus
133extern "C" {
134#endif
135
137int co_type_is_basic(co_unsigned16_t type);
138
140int co_type_is_array(co_unsigned16_t type);
141
149size_t co_type_sizeof(co_unsigned16_t type);
150
158size_t co_type_alignof(co_unsigned16_t type);
159
160#ifdef __cplusplus
161}
162#endif
163
164#endif // !LELY_CO_TYPE_H_
This header file is part of the utilities library; it contains the IEEE 754 floating-point format typ...
This is the public header file of the CANopen library.
This header file is part of the C11 and POSIX compatibility library; it includes <stdint....
A 48-bit struct used to describe absolute and relative times.
Definition type.h:125
co_unsigned32_t ms
Milliseconds after midnight.
Definition type.h:127
co_unsigned16_t days
The number of days since January 1, 1984.
Definition type.h:129
A 48-bit struct used to describe absolute and relative times.
Definition type.h:117
co_unsigned16_t days
The number of days since January 1, 1984.
Definition type.h:121
co_unsigned32_t ms
Milliseconds after midnight.
Definition type.h:119
int co_type_is_array(co_unsigned16_t type)
Returns 1 if the specified (static) data type is an array, and 0 if not.
Definition type.c:40
size_t co_type_alignof(co_unsigned16_t type)
Returns the alignment requirements (in bytes) of a value of the specified data type,...
Definition type.c:65
size_t co_type_sizeof(co_unsigned16_t type)
Returns the native size (in bytes) of a value of the specified data type, or 1 if it is not a static ...
Definition type.c:52
int co_type_is_basic(co_unsigned16_t type)
Returns 1 if the specified (static) data type is a basic type, and 0 if not.
Definition type.c:28
This header file is part of the C11 and POSIX compatibility library; it includes <uchar....