1
0
Fork 0
Commit graph

18 commits

Author SHA1 Message Date
Freddie Chopin
2c9d07f265 Restore CO_CONFIG_HB_CONS_CALLBACK_CHANGE option
The user may decide whether he/she wants one common callback for all
monitored nodes (CO_CONFIG_HB_CONS_CALLBACK_CHANGE) or maybe separate
callbacks configured individually for each monitored mode
(CO_CONFIG_HB_CONS_CALLBACK_MULTI). These options cannot be set
simultaneously.

This change is related to the discussion in #237
2020-10-24 14:42:38 +02:00
Freddie Chopin
a128fd699e
Make "remote NMT changed" callback of HB consumer node-specific (#237)
* Implement a better solution for #229

Instead of playing with incrementing pointers in various places it is
better to just set it once at the start of loop.

* Make "remote NMT changed" callback of HB consumer node-specific

This way "remote NMT changed" callback is much more similar to other
"multi" callbacks of HB consumer, and it was node-specific anyway, as
you have to first configure the monitoring node to have that callback
executed.

This change breaks the API.

* Merge CO_CONFIG_HB_CONS_CALLBACK_CHANGE with ..._HB_CONS_CALLBACK_MULTI

These settings are now very similar, so there's no need to have two
separate config options.

This change breaks the configuration API.
2020-10-09 09:34:55 +02:00
Janez
7a43f98f24 Configuration macros updated 2020-10-07 13:47:07 +02:00
Janez
f142e893ad Can run in single thread in Linux. 2020-09-29 12:46:02 +02:00
Janez
23bc5d38a7 Reorganize socketCAN/CO_Linux_threads
- Rename files to CO_epoll_interface
 - Object oriented, more flexible, separate functions
 - move epoll, timerfd and eventfd system calls from CO_driver.c to CO_epoll_interface.c
2020-09-29 09:00:31 +02:00
Janez
ac4ca2893a Remove duplicated CANopenConfiguredOK from main functions. Use CO->nodeIdUnconfigured instead. 2020-09-23 09:06:57 +02:00
Janez
d4b78771b3 socketCAN: Add CO_CANptrSocketCan_t object for "CANptr" argument for CO_CANmodule_init() function 2020-09-23 08:32:30 +02:00
Janez
dd1677b5bc Integrate LSS slave into CANopenNode more directly.
- CO_LSSslave: move expensive code from CAN receive (interrupt) to mainline
  CO_LSSslave_process() function.
- LSS slave now runs in parallel to other CANopen objects.
- LSS slave and master can run both on same device.
- LSS slave, LSS master and gateway-ascii(CiA309) LSS functions tested.
- LSSusage.md updated.
2020-06-09 14:55:07 +02:00
Janez
cb9b2cce42 Add printout of message log from CANopen gateway-ascii (non-standard). 2020-05-29 07:36:23 +02:00
Janez
c1a30b8a03 Some style corrections
- add CO_fifo_st enumerator for use in CO_fifo_cpyTok2xx functions.
- 309/CO_gateway_ascii: add x8 to x64 nonstandard data types
- example compiles now
- Fix "unused argument" warnings in socketCAN
2020-05-15 15:52:22 +02:00
Janez
b5bfeec42a Added CANopen gateway-ascii command interface according to CiA309-3 as a
microcontroller independent module.
It includes NMT master, LSS master and SDO client interface.
Interface is non-blocking, it is added to mainline.
Example for Linux stdio and socket is included.

Added CO_fifo.h/c for fifo data buffer, used with rewritten SDO client, etc

SDO client is rewritten. Now includes r/w fifo interface to transfer data.

doc/gettingStarted.md is updated.
2020-05-12 18:11:43 +02:00
Janez
c88194e813 Add Stack configuration macros to most of CANopenNode objects.
Add CO_NMT_initCallbackPre()
2020-03-19 18:07:23 +01:00
Janez
d9c44c69d1 Change non-descriptive CO_***_initCallback() into CO_***_initCallbackPre().
Change CO_NMT_initCallback() into CO_NMT_initCallbackChange().
Change type of NMT->operatingState from uint8_t into enum CO_NMT_internalState_t.
2020-03-18 23:19:29 +01:00
Janez
b8e821d0dd Add CO_NMT_UNKNOWN state for Heartbeat consumer. 2020-03-18 21:46:34 +01:00
Janez
9f8e726e7e SocketCAN, CO_driver.c: replace CO_notifyPype with simpler eventfd(). 2020-03-17 17:39:22 +01:00
Janez
41c075a182 SocketCAN main.c: Add NMT changes of current and remote nodes into log. 2020-03-13 16:14:50 +01:00
Janez
e6b4c1f5b1 socketCAN now compiles and runs. 2020-03-12 08:38:58 +01:00
Janez
02a734a832 Move socketCAN/Makefile into base directory
Partially update sockeCAN/main.c and rename to sockeCAN/CO_main_basic.c.
Fix some warnings in socketCAN.
2020-03-02 09:17:52 +01:00
Renamed from socketCAN/main.c (Browse further)