Comments (6)
Hi
Check out CO_OD_configure()
You can register a callback function for a specific index, which seems to be exactly what you want. There are examples throughout the code for how to use it.
//Jens
from canopennode.
Hi,
thanks for the fast replay. That is exactly what I need :) I was searching for this feature in the OD files, didnt expect that there is an extension of the OD implemented in the SDO files.
from canopennode.
It seems the function CO_OD_configure() is not available in CANopenNode V4, or I am I missing something?
from canopennode.
In V4 there is completely new Object Dictionary interface. See example in https://github.com/CANopenNode/CANopenSocket.
from canopennode.
So if I understand correctly. To create a callback function on an SDO write, using OD_extension_init a custom write function can be created which can call a callback function and OD_writeOriginal can then be used to perform the actual write. Is this the best approach?
from canopennode.
In general you don't need OD_writeOriginal, you also don't need variable to be stored in OD memory, if you have custom write callback.
OD_writeOriginal only writes data to the original location in OD memory. It is useful, if (part of) OD memory is stored to non-volatile memory.
from canopennode.
Related Issues (20)
- On STM32,Multiple TPDOs uses event-driven transmission, How to use the function "OD_requestTPDO(uint8_t *flagsPDO, uint8_t subIndex)" and "uint8_t *OD_getFlagsPDO(OD_entry_t *entry)" sends TPDO? HOT 2
- error handling on comms error HOT 2
- Open and close brackets mismatch in CO_Emergency.c HOT 1
- Send to different Nodes with same objects HOT 10
- How to handle SIGSEGV during the communication process to prevent program crashes HOT 4
- Configuring the micro as MASTER problem, CO_NMT_sendCommand() not defined HOT 1
- Multiple nodes, NMT problem HOT 2
- return CO_ERROR_OUT_OF_MEMORY HOT 1
- Questing about NMT and Heartbeat status queries HOT 1
- MISRA 2004 compliant for a few rules HOT 3
- Issue with include style fo Arduino HOT 4
- Porting SRDO to v4.0 HOT 4
- Trying to receive SDO messages in SDO client over the CO_SDOclient_receive HOT 5
- Unsigned int 24 bits HOT 5
- Enter the pre-oprational state HOT 5
- Please help HOT 3
- RPDO configuration every 2 Syncs HOT 1
- How to make it possible to receive all messages (SDO, PDO, NMT) in raw form? HOT 2
- Compiler warnings HOT 1
- Compiling without "CO_SINGLE_THREAD", using "1 w 0x1010 1 vs save" via ascii gateway causes deadlock (CO_LOCK_OD)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canopennode.