Giter Club home page Giter Club logo

Comments (6)

jensnielsen avatar jensnielsen commented on May 19, 2024

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.

IzidorM avatar IzidorM commented on May 19, 2024

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.

Simon-Thome avatar Simon-Thome commented on May 19, 2024

It seems the function CO_OD_configure() is not available in CANopenNode V4, or I am I missing something?

from canopennode.

CANopenNode avatar CANopenNode commented on May 19, 2024

In V4 there is completely new Object Dictionary interface. See example in https://github.com/CANopenNode/CANopenSocket.

from canopennode.

Simon-Thome avatar Simon-Thome commented on May 19, 2024

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.

CANopenNode avatar CANopenNode commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.