@@ -172,34 +172,37 @@ typedef enum co_otype
172
172
OTYPE_RECORD = 0x09 ,
173
173
} co_otype_t ;
174
174
175
+ #define DTYPE_FLAG_ATOMIC (1 << 31)
176
+ #define DTYPE_MASK 0x7FFFFFFF
177
+
175
178
/** Dictionary datatypes. See CiA 301 7.4.7 */
176
179
typedef enum co_dtype
177
180
{
178
- DTYPE_BOOLEAN = 0x0001 ,
179
- DTYPE_INTEGER8 = 0x0002 ,
180
- DTYPE_INTEGER16 = 0x0003 ,
181
- DTYPE_INTEGER32 = 0x0004 ,
182
- DTYPE_UNSIGNED8 = 0x0005 ,
183
- DTYPE_UNSIGNED16 = 0x0006 ,
184
- DTYPE_UNSIGNED32 = 0x0007 ,
185
- DTYPE_REAL32 = 0x0008 ,
181
+ DTYPE_BOOLEAN = DTYPE_FLAG_ATOMIC | 0x0001 ,
182
+ DTYPE_INTEGER8 = DTYPE_FLAG_ATOMIC | 0x0002 ,
183
+ DTYPE_INTEGER16 = DTYPE_FLAG_ATOMIC | 0x0003 ,
184
+ DTYPE_INTEGER32 = DTYPE_FLAG_ATOMIC | 0x0004 ,
185
+ DTYPE_UNSIGNED8 = DTYPE_FLAG_ATOMIC | 0x0005 ,
186
+ DTYPE_UNSIGNED16 = DTYPE_FLAG_ATOMIC | 0x0006 ,
187
+ DTYPE_UNSIGNED32 = DTYPE_FLAG_ATOMIC | 0x0007 ,
188
+ DTYPE_REAL32 = DTYPE_FLAG_ATOMIC | 0x0008 ,
186
189
DTYPE_VISIBLE_STRING = 0x0009 ,
187
190
DTYPE_OCTET_STRING = 0x000A ,
188
191
DTYPE_UNICODE_STRING = 0x000B ,
189
192
DTYPE_TIME_OF_DAY = 0x000C ,
190
193
DTYPE_TIME_DIFFERENCE = 0x000D ,
191
194
DTYPE_DOMAIN = 0x000F ,
192
195
DTYPE_INTEGER24 = 0x0010 ,
193
- DTYPE_REAL64 = 0x0011 ,
196
+ DTYPE_REAL64 = DTYPE_FLAG_ATOMIC | 0x0011 ,
194
197
DTYPE_INTEGER40 = 0x0012 ,
195
198
DTYPE_INTEGER48 = 0x0013 ,
196
199
DTYPE_INTEGER56 = 0x0014 ,
197
- DTYPE_INTEGER64 = 0x0015 ,
200
+ DTYPE_INTEGER64 = DTYPE_FLAG_ATOMIC | 0x0015 ,
198
201
DTYPE_UNSIGNED24 = 0x0016 ,
199
202
DTYPE_UNSIGNED40 = 0x0018 ,
200
203
DTYPE_UNSIGNED48 = 0x0019 ,
201
204
DTYPE_UNSIGNED56 = 0x001A ,
202
- DTYPE_UNSIGNED64 = 0x001B ,
205
+ DTYPE_UNSIGNED64 = DTYPE_FLAG_ATOMIC | 0x001B ,
203
206
DTYPE_PDO_COMM_PARAM = 0x0020 ,
204
207
DTYPE_PDO_MAPPING = 0x0021 ,
205
208
DTYPE_SDO_PARAM = 0x0022 ,
@@ -223,11 +226,19 @@ typedef enum co_dtype
223
226
/** Access function event */
224
227
typedef enum od_event
225
228
{
226
- OD_EVENT_READ , /**< Read subindex */
227
- OD_EVENT_WRITE , /**< Write subindex */
228
- OD_EVENT_RESTORE , /**< Restore default value */
229
+ OD_EVENT_READ , /**< Read subindex */
230
+ OD_EVENT_WRITE , /**< Write subindex */
231
+ OD_EVENT_RESTORE , /**< Restore default value */
229
232
} od_event_t ;
230
233
234
+ /** Notify event */
235
+ typedef enum od_notify_event
236
+ {
237
+ OD_NOTIFY_ACCESSED ,
238
+ OD_NOTIFY_VALUE_SET ,
239
+ OD_NOTIFY_SDO_RECEIVED ,
240
+ } od_notify_event_t ;
241
+
231
242
struct co_obj ;
232
243
struct co_entry ;
233
244
@@ -317,7 +328,7 @@ typedef struct co_cfg
317
328
uint8_t msef [5 ]);
318
329
319
330
/** Notify callback */
320
- void (* cb_notify ) (co_net_t * net , uint16_t index , uint8_t subindex );
331
+ void (* cb_notify ) (co_net_t * net , uint16_t index , uint8_t subindex , od_notify_event_t event , uint32_t value );
321
332
322
333
/** Function to open dictionary store */
323
334
void * (* open ) (co_store_t store , co_mode_t mode );
0 commit comments