@@ -172,34 +172,37 @@ typedef enum co_otype
172172   OTYPE_RECORD     =  0x09 ,
173173} co_otype_t ;
174174
175+ #define  DTYPE_FLAG_ATOMIC        (1 << 31)
176+ #define  DTYPE_MASK               0x7FFFFFFF
177+ 
175178/** Dictionary datatypes. See CiA 301 7.4.7 */ 
176179typedef  enum  co_dtype 
177180{
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 ,
186189   DTYPE_VISIBLE_STRING   =  0x0009 ,
187190   DTYPE_OCTET_STRING     =  0x000A ,
188191   DTYPE_UNICODE_STRING   =  0x000B ,
189192   DTYPE_TIME_OF_DAY      =  0x000C ,
190193   DTYPE_TIME_DIFFERENCE  =  0x000D ,
191194   DTYPE_DOMAIN           =  0x000F ,
192195   DTYPE_INTEGER24        =  0x0010 ,
193-    DTYPE_REAL64           =  0x0011 ,
196+    DTYPE_REAL64           =  DTYPE_FLAG_ATOMIC  |  0x0011 ,
194197   DTYPE_INTEGER40        =  0x0012 ,
195198   DTYPE_INTEGER48        =  0x0013 ,
196199   DTYPE_INTEGER56        =  0x0014 ,
197-    DTYPE_INTEGER64        =  0x0015 ,
200+    DTYPE_INTEGER64        =  DTYPE_FLAG_ATOMIC  |  0x0015 ,
198201   DTYPE_UNSIGNED24       =  0x0016 ,
199202   DTYPE_UNSIGNED40       =  0x0018 ,
200203   DTYPE_UNSIGNED48       =  0x0019 ,
201204   DTYPE_UNSIGNED56       =  0x001A ,
202-    DTYPE_UNSIGNED64       =  0x001B ,
205+    DTYPE_UNSIGNED64       =  DTYPE_FLAG_ATOMIC  |  0x001B ,
203206   DTYPE_PDO_COMM_PARAM   =  0x0020 ,
204207   DTYPE_PDO_MAPPING      =  0x0021 ,
205208   DTYPE_SDO_PARAM        =  0x0022 ,
@@ -223,11 +226,19 @@ typedef enum co_dtype
223226/** Access function event */ 
224227typedef  enum  od_event 
225228{
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 */ 
229232} od_event_t ;
230233
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+ 
231242struct  co_obj ;
232243struct  co_entry ;
233244
@@ -317,7 +328,7 @@ typedef struct co_cfg
317328      uint8_t  msef [5 ]);
318329
319330   /** 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 );
321332
322333   /** Function to open dictionary store */ 
323334   void  *  (* open ) (co_store_t  store , co_mode_t  mode );
0 commit comments