|
static int | co_lss_recv (const struct can_msg *msg, void *data) |
| The CAN receive callback function for an LSS service. More...
|
|
static int | co_lss_timer (const struct timespec *tp, void *data) |
| The CAN timer callback function for an LSS service. More...
|
|
static void | co_lss_enter (co_lss_t *lss, co_lss_state_t *next) |
| Enters the specified state of an LSS service and invokes the exit and entry functions.
|
|
static void | co_lss_emit_recv (co_lss_t *lss, const struct can_msg *msg) |
| Invokes the 'CAN frame received' transition function of the current state of an LSS service. More...
|
|
static void | co_lss_emit_time (co_lss_t *lss, const struct timespec *tp) |
| Invokes the 'timeout' transition function of the current state of an LSS service. More...
|
|
static co_lss_state_t * | co_lss_wait_on_enter (co_lss_t *lss) |
| The entry function of the 'waiting' state an LSS master or slave.
|
|
static co_lss_state_t * | co_lss_wait_slave_on_enter (co_lss_t *lss) |
| The entry function of the 'waiting' state of an LSS slave.
|
|
static co_lss_state_t * | co_lss_wait_slave_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'waiting' state of an LSS slave.
|
|
static co_lss_state_t * | co_lss_cfg_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'configuration' state of an LSS slave.
|
|
static co_lss_state_t * | co_lss_cs_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the command received state.
|
|
static co_lss_state_t * | co_lss_cs_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the command received state.
|
|
static co_lss_state_t * | co_lss_cs_fini_on_enter (co_lss_t *lss) |
| The entry function of the command received finalization state.
|
|
static void | co_lss_cs_fini_on_leave (co_lss_t *lss) |
| The exit function of the command received finalization state.
|
|
static co_lss_state_t * | co_lss_switch_sel_on_enter (co_lss_t *lss) |
| The entry function of the 'switch state selective' state.
|
|
static co_lss_state_t * | co_lss_switch_sel_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the 'switch state selective' state.
|
|
static co_lss_state_t * | co_lss_err_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the error received state.
|
|
static co_lss_state_t * | co_lss_err_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the error received state.
|
|
static void | co_lss_err_on_leave (co_lss_t *lss) |
| The exit function of the error received state.
|
|
static co_lss_state_t * | co_lss_lssid_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the inquire identity state.
|
|
static co_lss_state_t * | co_lss_lssid_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the inquire identity state.
|
|
static void | co_lss_lssid_on_leave (co_lss_t *lss) |
| The exit function of the inquire identity state.
|
|
static co_lss_state_t * | co_lss_nid_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the inquire node-ID state.
|
|
static co_lss_state_t * | co_lss_nid_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the inquire node-ID state.
|
|
static void | co_lss_nid_on_leave (co_lss_t *lss) |
| The exit function of the inquire node-ID state.
|
|
static co_lss_state_t * | co_lss_id_slave_on_enter (co_lss_t *lss) |
| The entry function of the 'identify remote slave' state.
|
|
static co_lss_state_t * | co_lss_id_slave_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the 'identify remote slave' state.
|
|
static co_lss_state_t * | co_lss_slowscan_init_on_enter (co_lss_t *lss) |
| The entry function of the Slowscan initialization state.
|
|
static co_lss_state_t * | co_lss_slowscan_init_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the Slowscan initialization state.
|
|
static co_lss_state_t * | co_lss_slowscan_init_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the Slowscan initialization state.
|
|
static co_lss_state_t * | co_lss_slowscan_scan_on_enter (co_lss_t *lss) |
| The entry function of the Slowscan scanning state.
|
|
static co_lss_state_t * | co_lss_slowscan_scan_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the Slowscan scanning state.
|
|
static co_lss_state_t * | co_lss_slowscan_scan_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the Slowscan scanning state.
|
|
static co_lss_state_t * | co_lss_slowscan_wait_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the Slowscan waiting state.
|
|
static co_lss_state_t * | co_lss_slowscan_wait_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the Slowscan waiting state.
|
|
static co_lss_state_t * | co_lss_slowscan_switch_on_enter (co_lss_t *lss) |
| The entry function of the Slowscan 'switch state selective' state.
|
|
static co_lss_state_t * | co_lss_slowscan_switch_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the Slowscan 'switch state selective' state.
|
|
static co_lss_state_t * | co_lss_slowscan_switch_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the Slowscan 'switch state selective' state.
|
|
static co_lss_state_t * | co_lss_slowscan_fini_on_enter (co_lss_t *lss) |
| The entry function of the Slowscan finalization state.
|
|
static void | co_lss_slowscan_fini_on_leave (co_lss_t *lss) |
| The exit function of the Slowscan finalization state.
|
|
static co_lss_state_t * | co_lss_fastscan_init_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the Fastscan initialization state.
|
|
static co_lss_state_t * | co_lss_fastscan_init_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the Fastscan initialization state.
|
|
static co_lss_state_t * | co_lss_fastscan_scan_on_enter (co_lss_t *lss) |
| The entry function of the Fastscan scanning state.
|
|
static co_lss_state_t * | co_lss_fastscan_scan_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the Fastscan scanning state.
|
|
static co_lss_state_t * | co_lss_fastscan_scan_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the Fastscan scanning state.
|
|
static co_lss_state_t * | co_lss_fastscan_wait_on_recv (co_lss_t *lss, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the Fastscan waiting state.
|
|
static co_lss_state_t * | co_lss_fastscan_wait_on_time (co_lss_t *lss, const struct timespec *tp) |
| The 'timeout' transition function of the Fastscan waiting state.
|
|
static co_lss_state_t * | co_lss_fastscan_fini_on_enter (co_lss_t *lss) |
| The entry function of the Fastscan finalization state.
|
|
static void | co_lss_fastscan_fini_on_leave (co_lss_t *lss) |
| The exit function of the Fastscan finalization state.
|
|
static co_lss_state_t * | co_lss_switch_sel (co_lss_t *lss, co_unsigned8_t cs, co_unsigned32_t id) |
| Implements the switch state selective service for an LSS slave. More...
|
|
static void | co_lss_id_slave (co_lss_t *lss, co_unsigned8_t cs, co_unsigned32_t id) |
| Implements the LSS identify remote slave service for an LSS slave. More...
|
|
static void | co_lss_id_non_cfg_slave (const co_lss_t *lss) |
| Implements the LSS identify non-configured remote slave service for an LSS slave. More...
|
|
static co_lss_state_t * | co_lss_fastscan (co_lss_t *lss, co_unsigned32_t id, co_unsigned8_t bitchk, co_unsigned8_t lsssub, co_unsigned8_t lssnext) |
| Implements the LSS fastscan service for an LSS slave. More...
|
|
static void | co_lss_init_req (const co_lss_t *lss, struct can_msg *msg, co_unsigned8_t cs) |
| Initializes an LSS request CAN frame. More...
|
|
static int | co_lss_send_switch_sel_req (co_lss_t *lss, const struct co_id *id) |
| Sends a single frame of a switch state selective request (see Fig. More...
|
|
static int | co_lss_send_id_slave_req (co_lss_t *lss, const struct co_id *lo, const struct co_id *hi) |
| Sends a single frame of an LSS identify remote slave request (see Fig. More...
|
|
static int | co_lss_send_fastscan_req (const co_lss_t *lss, co_unsigned32_t id, co_unsigned8_t bitchk, co_unsigned8_t lsssub, co_unsigned8_t lssnext) |
| Sends an LSS Fastscan request (see Fig. More...
|
|
static void | co_lss_init_ind (co_lss_t *lss, co_unsigned8_t cs) |
| Prepares an LSS master to receive an indication from a slave. More...
|
|
static co_unsigned32_t * | co_id_sub (struct co_id *id, co_unsigned8_t sub) |
| Returns a pointer to the specified number in an LSS address. More...
|
|
co_lss_t * | co_lss_create (co_nmt_t *nmt) |
| Creates a new CANopen LSS master/slave service. More...
|
|
void | co_lss_destroy (co_lss_t *lss) |
| Destroys a CANopen LSS master/slave service. More...
|
|
int | co_lss_start (co_lss_t *lss) |
| Starts an LSS service. More...
|
|
void | co_lss_stop (co_lss_t *lss) |
| Stops an LSS service. More...
|
|
int | co_lss_is_stopped (const co_lss_t *lss) |
| Retuns 1 if the specified LSS service is stopped, and 0 if not. More...
|
|
co_nmt_t * | co_lss_get_nmt (const co_lss_t *lss) |
| Returns a pointer to the NMT service of an LSS master/slave service.
|
|
void | co_lss_get_rate_ind (const co_lss_t *lss, co_lss_rate_ind_t **pind, void **pdata) |
| Retrieves the indication function invoked when an LSS 'activate bit timing' request is received. More...
|
|
void | co_lss_set_rate_ind (co_lss_t *lss, co_lss_rate_ind_t *ind, void *data) |
| Sets the indication function invoked when an LSS 'activate bit timing' request is received. More...
|
|
void | co_lss_get_store_ind (const co_lss_t *lss, co_lss_store_ind_t **pind, void **pdata) |
| Retrieves the indication function invoked when an LSS 'store configuration' request is received. More...
|
|
void | co_lss_set_store_ind (co_lss_t *lss, co_lss_store_ind_t *ind, void *data) |
| Sets the indication function invoked when an LSS 'store configuration' request is received. More...
|
|
co_unsigned16_t | co_lss_get_inhibit (const co_lss_t *lss) |
| Returns the inhibit time (in multiples of 100 microseconds) of an LSS master service. More...
|
|
void | co_lss_set_inhibit (co_lss_t *lss, co_unsigned16_t inhibit) |
| Sets the inhibit time between successive LSS messages of an LSS master service. More...
|
|
int | co_lss_get_timeout (const co_lss_t *lss) |
| Returns the timeout (in milliseconds) of an LSS master service. More...
|
|
void | co_lss_set_timeout (co_lss_t *lss, int timeout) |
| Sets the timeout of an LSS master service. More...
|
|
int | co_lss_is_master (const co_lss_t *lss) |
| Returns 1 if the specified CANopen LSS service is a master, and 0 if not.
|
|
int | co_lss_is_idle (const co_lss_t *lss) |
| Returns 1 if the specified LSS master is idle, and 0 if a request is ongoing.
|
|
void | co_lss_abort_req (co_lss_t *lss) |
| Aborts the current LSS master request. More...
|
|
int | co_lss_switch_req (co_lss_t *lss, co_unsigned8_t mode) |
| Requests the 'switch state global' service. More...
|
|
int | co_lss_switch_sel_req (co_lss_t *lss, const struct co_id *id, co_lss_cs_ind_t *ind, void *data) |
| Requests the 'switch state selective' service. More...
|
|
int | co_lss_set_id_req (co_lss_t *lss, co_unsigned8_t id, co_lss_err_ind_t *ind, void *data) |
| Requests the 'configure node-ID' service. More...
|
|
int | co_lss_set_rate_req (co_lss_t *lss, co_unsigned16_t rate, co_lss_err_ind_t *ind, void *data) |
| Requests the 'configure bit timing parameters' service. More...
|
|
int | co_lss_switch_rate_req (co_lss_t *lss, int delay) |
| Requests the 'activate bit timing parameters' service. More...
|
|
int | co_lss_store_req (co_lss_t *lss, co_lss_err_ind_t *ind, void *data) |
| Requests the 'store configuration' service. More...
|
|
int | co_lss_get_vendor_id_req (co_lss_t *lss, co_lss_lssid_ind_t *ind, void *data) |
| Requests the 'inquire identity vendor-ID' service. More...
|
|
int | co_lss_get_product_code_req (co_lss_t *lss, co_lss_lssid_ind_t *ind, void *data) |
| Requests the 'inquire identity product-code' service. More...
|
|
int | co_lss_get_revision_req (co_lss_t *lss, co_lss_lssid_ind_t *ind, void *data) |
| Requests the 'inquire identity revision-number' service. More...
|
|
int | co_lss_get_serial_nr_req (co_lss_t *lss, co_lss_lssid_ind_t *ind, void *data) |
| Requests the 'inquire identity serial-number' service. More...
|
|
int | co_lss_get_id_req (co_lss_t *lss, co_lss_nid_ind_t *ind, void *data) |
| Requests the 'inquire node-ID' service. More...
|
|
int | co_lss_id_slave_req (co_lss_t *lss, const struct co_id *lo, const struct co_id *hi, co_lss_cs_ind_t *ind, void *data) |
| Requests the 'LSS identify remote slave' service. More...
|
|
int | co_lss_id_non_cfg_slave_req (co_lss_t *lss, co_lss_cs_ind_t *ind, void *data) |
| Requests the 'LSS identify non-configured remote slave' service. More...
|
|
int | co_lss_slowscan_req (co_lss_t *lss, const struct co_id *lo, const struct co_id *hi, co_lss_scan_ind_t *ind, void *data) |
| Requests the 'LSS Slowscan' service. More...
|
|
int | co_lss_fastscan_req (co_lss_t *lss, const struct co_id *id, const struct co_id *mask, co_lss_scan_ind_t *ind, void *data) |
| Requests the 'LSS Fastscan' service. More...
|
|
|
static co_lss_state_t *const | co_lss_stopped_state = &(co_lss_state_t){ .on_recv = NULL } |
| The 'stopped' state of an LSS master or slave.
|
|
static co_lss_state_t *const | co_lss_wait_state = &(co_lss_state_t){ .on_enter = &co_lss_wait_on_enter } |
| The 'waiting' state of an LSS master or slave.
|
|
static co_lss_state_t *const | co_lss_wait_slave_state = &(co_lss_state_t){ .on_enter = &co_lss_wait_slave_on_enter, .on_recv = &co_lss_wait_slave_on_recv } |
| The 'waiting' state of an LSS slave.
|
|
static co_lss_state_t *const | co_lss_cfg_state = &(co_lss_state_t){ .on_recv = &co_lss_cfg_on_recv } |
| The 'configuration' state of an LSS slave.
|
|
static co_lss_state_t *const | co_lss_cs_state = &(co_lss_state_t){ .on_recv = &co_lss_cs_on_recv, .on_time = &co_lss_cs_on_time } |
| The command received state.
|
|
static co_lss_state_t *const | co_lss_cs_fini_state = &(co_lss_state_t){ .on_enter = &co_lss_cs_fini_on_enter, .on_leave = &co_lss_cs_fini_on_leave } |
| The command received finalization state.
|
|
static co_lss_state_t *const | co_lss_switch_sel_state = &(co_lss_state_t){ .on_enter = &co_lss_switch_sel_on_enter, .on_time = &co_lss_switch_sel_on_time } |
| The 'switch state selective' state.
|
|
static co_lss_state_t *const | co_lss_err_state = &(co_lss_state_t){ .on_recv = &co_lss_err_on_recv, .on_time = &co_lss_err_on_time, .on_leave = &co_lss_err_on_leave } |
| The error received state.
|
|
static co_lss_state_t *const | co_lss_lssid_state = &(co_lss_state_t){ .on_recv = &co_lss_lssid_on_recv, .on_time = &co_lss_lssid_on_time, .on_leave = &co_lss_lssid_on_leave } |
| The inquire identity state.
|
|
static co_lss_state_t *const | co_lss_nid_state = &(co_lss_state_t){ .on_recv = &co_lss_nid_on_recv, .on_time = &co_lss_nid_on_time, .on_leave = &co_lss_nid_on_leave } |
| The inquire node-ID state.
|
|
static co_lss_state_t *const | co_lss_id_slave_state = &(co_lss_state_t){ .on_enter = &co_lss_id_slave_on_enter, .on_time = &co_lss_id_slave_on_time } |
| The 'identify remote slave' state.
|
|
static co_lss_state_t *const | co_lss_slowscan_init_state = &(co_lss_state_t){ .on_enter = &co_lss_slowscan_init_on_enter, .on_recv = &co_lss_slowscan_init_on_recv, .on_time = &co_lss_slowscan_init_on_time } |
| The Slowscan initialization state.
|
|
static co_lss_state_t *const | co_lss_slowscan_scan_state = &(co_lss_state_t){ .on_enter = &co_lss_slowscan_scan_on_enter, .on_recv = &co_lss_slowscan_scan_on_recv, .on_time = &co_lss_slowscan_scan_on_time } |
| The Slowscan scanning state.
|
|
static co_lss_state_t *const | co_lss_slowscan_wait_state = &(co_lss_state_t){ .on_recv = &co_lss_slowscan_wait_on_recv, .on_time = &co_lss_slowscan_wait_on_time } |
| The Slowscan waiting state.
|
|
static co_lss_state_t *const | co_lss_slowscan_switch_state = &(co_lss_state_t){ .on_enter = &co_lss_slowscan_switch_on_enter, .on_recv = &co_lss_slowscan_switch_on_recv, .on_time = &co_lss_slowscan_switch_on_time } |
| The Slowscan 'switch state selective' state.
|
|
static co_lss_state_t *const | co_lss_slowscan_fini_state = &(co_lss_state_t){ .on_enter = &co_lss_slowscan_fini_on_enter, .on_leave = &co_lss_slowscan_fini_on_leave } |
| The Slowscan finalization state.
|
|
static co_lss_state_t *const | co_lss_fastscan_init_state = &(co_lss_state_t){ .on_recv = &co_lss_fastscan_init_on_recv, .on_time = &co_lss_fastscan_init_on_time } |
| The Fastscan initialization state.
|
|
static co_lss_state_t *const | co_lss_fastscan_scan_state = &(co_lss_state_t){ .on_enter = &co_lss_fastscan_scan_on_enter, .on_recv = &co_lss_fastscan_scan_on_recv, .on_time = &co_lss_fastscan_scan_on_time } |
| The Fastscan scanning state.
|
|
static co_lss_state_t *const | co_lss_fastscan_wait_state = &(co_lss_state_t){ .on_recv = &co_lss_fastscan_wait_on_recv, .on_time = &co_lss_fastscan_wait_on_time } |
| The Fastscan waiting state.
|
|
static co_lss_state_t *const | co_lss_fastscan_fini_state = &(co_lss_state_t){ .on_enter = &co_lss_fastscan_fini_on_enter, .on_leave = &co_lss_fastscan_fini_on_leave } |
| The Fastscan finalization state.
|
|
This file is part of the CANopen library; it contains the implementation of the Layer Setting Services (LSS) and protocols functions.
- See also
- lely/co/lss.h
- Copyright
- 2017-2022 Lely Industries N.V.
- Author
- J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file lss.c.