This file is part of the CANopen library; it contains the implementation of the Client-SDO functions.
More...
|
static int | co_csdo_update (co_csdo_t *sdo) |
| Updates and (de)activates a Client-SDO service. More...
|
|
static co_unsigned32_t | co_1280_dn_ind (co_sub_t *sub, struct co_sdo_req *req, void *data) |
| The download indication function for (all sub-objects of) CANopen objects 1280..12FF (SDO client parameter). More...
|
|
static int | co_csdo_recv (const struct can_msg *msg, void *data) |
| The CAN receive callback function for a Client-SDO service. More...
|
|
static int | co_csdo_timer (const struct timespec *tp, void *data) |
| The CAN timer callback function for a Client-SDO service. More...
|
|
static void | co_csdo_enter (co_csdo_t *sdo, co_csdo_state_t *next) |
| Enters the specified state of a Client-SDO service and invokes the exit and entry functions.
|
|
static void | co_csdo_emit_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| Invokes the 'abort' transition function of the current state of a Client-SDO service. More...
|
|
static void | co_csdo_emit_time (co_csdo_t *sdo, const struct timespec *tp) |
| Invokes the 'timeout' transition function of the current state of a Client-SDO service. More...
|
|
static void | co_csdo_emit_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| Invokes the 'CAN frame received' transition function of the current state of a Client-SDO service. More...
|
|
static co_csdo_state_t * | co_csdo_wait_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'waiting' state.
|
|
static co_csdo_state_t * | co_csdo_wait_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'waiting' state.
|
|
static co_csdo_state_t * | co_csdo_abort_on_enter (co_csdo_t *sdo) |
| The entry function of the 'abort transfer' state.
|
|
static void | co_csdo_abort_on_leave (co_csdo_t *sdo) |
| The exit function of the 'abort transfer' state.
|
|
static co_csdo_state_t * | co_csdo_dn_ini_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'download initiate' state.
|
|
static co_csdo_state_t * | co_csdo_dn_ini_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'download initiate' state.
|
|
static co_csdo_state_t * | co_csdo_dn_ini_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'download initiate' state.
|
|
static co_csdo_state_t * | co_csdo_dn_seg_on_enter (co_csdo_t *sdo) |
| The entry function of the 'download segment' state.
|
|
static co_csdo_state_t * | co_csdo_dn_seg_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'download segment' state.
|
|
static co_csdo_state_t * | co_csdo_dn_seg_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'download segment' state.
|
|
static co_csdo_state_t * | co_csdo_dn_seg_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'download segment' state.
|
|
static co_csdo_state_t * | co_csdo_up_ini_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'upload initiate' state.
|
|
static co_csdo_state_t * | co_csdo_up_ini_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'upload initiate' state.
|
|
static co_csdo_state_t * | co_csdo_up_ini_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'upload initiate' state.
|
|
static co_csdo_state_t * | co_csdo_up_seg_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'upload segment' state.
|
|
static co_csdo_state_t * | co_csdo_up_seg_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'upload segment' state.
|
|
static co_csdo_state_t * | co_csdo_up_seg_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'upload segment' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_ini_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'block download initiate' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_ini_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'block download initiate' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_ini_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'block download initiate' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_sub_on_enter (co_csdo_t *sdo) |
| The entry function of the 'block download sub-block' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_sub_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'block download sub-block' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_sub_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'block download sub-block' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_sub_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'block download sub-block' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_end_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'block download end' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_end_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'block download end' state.
|
|
static co_csdo_state_t * | co_csdo_blk_dn_end_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'block download end' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_ini_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'block upload initiate' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_ini_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'block upload initiate' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_ini_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'block upload initiate' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_sub_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'block upload sub-block' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_sub_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'block upload sub-block' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_sub_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'block upload sub-block' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_end_on_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| The 'abort' transition function of the 'block upload end' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_end_on_time (co_csdo_t *sdo, const struct timespec *tp) |
| The 'timeout' transition function of the 'block upload end' state.
|
|
static co_csdo_state_t * | co_csdo_blk_up_end_on_recv (co_csdo_t *sdo, const struct can_msg *msg) |
| The 'CAN frame received' transition function of the 'block upload end' state.
|
|
static co_csdo_state_t * | co_csdo_abort_ind (co_csdo_t *sdo, co_unsigned32_t ac) |
| Processes an abort transfer indication by aborting any ongoing transfer of a Client-SDO and returning it to the waiting state after notifying the user. More...
|
|
static co_csdo_state_t * | co_csdo_abort_res (co_csdo_t *sdo, co_unsigned32_t ac) |
| Sends an abort transfer request and aborts any ongoing transfer by invoking co_csdo_abort_ind(). More...
|
|
static int | co_csdo_dn_ind (co_csdo_t *sdo, co_unsigned16_t idx, co_unsigned8_t subidx, const void *ptr, size_t n, co_csdo_dn_con_t *con, void *data) |
| Processes a download request from a Client-SDO by checking and updating the state and copying the value to the internal buffer. More...
|
|
static int | co_csdo_up_ind (co_csdo_t *sdo, co_unsigned16_t idx, co_unsigned8_t subidx, co_csdo_up_con_t *con, void *data) |
| Processes an upload request from a Client-SDO by checking and updating the state. More...
|
|
static void | co_csdo_send_abort (co_csdo_t *sdo, co_unsigned32_t ac) |
| Sends an abort transfer request. More...
|
|
static void | co_csdo_send_dn_exp_req (co_csdo_t *sdo) |
| Sends a Client-SDO 'download initiate' (expedited) request.
|
|
static void | co_csdo_send_dn_ini_req (co_csdo_t *sdo) |
| Sends a Client-SDO 'download initiate' request.
|
|
static void | co_csdo_send_dn_seg_req (co_csdo_t *sdo, co_unsigned32_t n, int last) |
| Sends a Client-SDO 'download segment' request. More...
|
|
static void | co_csdo_send_up_ini_req (co_csdo_t *sdo) |
| Sends a Client-SDO 'upload initiate' request.
|
|
static void | co_csdo_send_up_seg_req (co_csdo_t *sdo) |
| Sends a Client-SDO 'upload segment' request.
|
|
static void | co_csdo_send_blk_dn_ini_req (co_csdo_t *sdo) |
| Sends a Client-SDO 'block download initiate' request.
|
|
static void | co_csdo_send_blk_dn_sub_req (co_csdo_t *sdo, co_unsigned8_t seqno) |
| Sends a Client-SDO 'block download sub-block' request. More...
|
|
static void | co_csdo_send_blk_dn_end_req (co_csdo_t *sdo) |
| Sends a Client-SDO 'block download end' request.
|
|
static void | co_csdo_send_blk_up_ini_req (co_csdo_t *sdo, co_unsigned8_t pst) |
| Sends a Client-SDO 'block upload initiate' request. More...
|
|
static void | co_csdo_send_start_up_req (co_csdo_t *sdo) |
| Sends a Client-SDO 'start upload' request.
|
|
static void | co_csdo_send_blk_up_sub_res (co_csdo_t *sdo) |
| Sends a Client-SDO 'block upload sub-block' response.
|
|
static void | co_csdo_send_blk_up_end_res (co_csdo_t *sdo) |
| Sends a Client-SDO 'block upload end' response.
|
|
static void | co_csdo_init_ini_req (co_csdo_t *sdo, struct can_msg *msg, co_unsigned8_t cs) |
| Initializes a Client-SDO download/upload initiate request CAN frame. More...
|
|
static void | co_csdo_init_seg_req (co_csdo_t *sdo, struct can_msg *msg, co_unsigned8_t cs) |
| Initializes a Client-SDO download/upload segment request CAN frame. More...
|
|
int | co_dev_dn_req (co_dev_t *dev, co_unsigned16_t idx, co_unsigned8_t subidx, const void *ptr, size_t n, co_csdo_dn_con_t *con, void *data) |
| Submits a download request to a local device. More...
|
|
int | co_dev_dn_val_req (co_dev_t *dev, co_unsigned16_t idx, co_unsigned8_t subidx, co_unsigned16_t type, const void *val, co_csdo_dn_con_t *con, void *data) |
| Submits a download request to a local device. More...
|
|
int | co_dev_up_req (const co_dev_t *dev, co_unsigned16_t idx, co_unsigned8_t subidx, co_csdo_up_con_t *con, void *data) |
| Submits an upload request to a local device. More...
|
|
co_csdo_t * | co_csdo_create (can_net_t *net, co_dev_t *dev, co_unsigned8_t num) |
| Creates a new CANopen Client-SDO service. More...
|
|
void | co_csdo_destroy (co_csdo_t *csdo) |
| Destroys a CANopen Client-SDO service. More...
|
|
can_net_t * | co_csdo_get_net (const co_csdo_t *sdo) |
| Returns a pointer to the CAN network of a Client-SDO.
|
|
co_dev_t * | co_csdo_get_dev (const co_csdo_t *sdo) |
| Returns a pointer to the CANopen device of a Client-SDO.
|
|
co_unsigned8_t | co_csdo_get_num (const co_csdo_t *sdo) |
| Returns the SDO number of a Client-SDO.
|
|
const struct co_sdo_par * | co_csdo_get_par (const co_csdo_t *sdo) |
| Returns a pointer to the SDO parameter record of a Client-SDO.
|
|
int | co_csdo_get_timeout (const co_csdo_t *sdo) |
| Returns the timeout (in milliseconds) of a Client-SDO. More...
|
|
void | co_csdo_set_timeout (co_csdo_t *sdo, int timeout) |
| Sets the timeout of a Client-SDO. More...
|
|
void | co_csdo_get_dn_ind (const co_csdo_t *sdo, co_csdo_ind_t **pind, void **pdata) |
| Retrieves the indication function used to notify the user of the progress of the current SDO download request. More...
|
|
void | co_csdo_set_dn_ind (co_csdo_t *sdo, co_csdo_ind_t *ind, void *data) |
| Sets the indication function used to notify the user of the progress of the current SDO download request. More...
|
|
void | co_csdo_get_up_ind (const co_csdo_t *sdo, co_csdo_ind_t **pind, void **pdata) |
| Retrieves the indication function used to notify the user of the progress of the current SDO upload request. More...
|
|
void | co_csdo_set_up_ind (co_csdo_t *sdo, co_csdo_ind_t *ind, void *data) |
| Sets the indication function used to notify the user of the progress of the current SDO upload request. More...
|
|
int | co_csdo_is_idle (const co_csdo_t *sdo) |
| Returns 1 if the specified Client-SDO service is idle, and 0 if a transfer is ongoing.
|
|
void | co_csdo_abort_req (co_csdo_t *sdo, co_unsigned32_t ac) |
| Submits an abort transfer request to a remote Server-SDO. More...
|
|
int | co_csdo_dn_req (co_csdo_t *sdo, co_unsigned16_t idx, co_unsigned8_t subidx, const void *ptr, size_t n, co_csdo_dn_con_t *con, void *data) |
| Submits a download request to a remote Server-SDO. More...
|
|
int | co_csdo_dn_val_req (co_csdo_t *sdo, co_unsigned16_t idx, co_unsigned8_t subidx, co_unsigned16_t type, const void *val, co_csdo_dn_con_t *con, void *data) |
| Submits a download request to a remote Server-SDO. More...
|
|
int | co_csdo_up_req (co_csdo_t *sdo, co_unsigned16_t idx, co_unsigned8_t subidx, co_csdo_up_con_t *con, void *data) |
| Submits an upload request to a remote Server-SDO. More...
|
|
int | co_csdo_blk_dn_req (co_csdo_t *sdo, co_unsigned16_t idx, co_unsigned8_t subidx, const void *ptr, size_t n, co_csdo_dn_con_t *con, void *data) |
| Submits a block download request to a remote Server-SDO. More...
|
|
int | co_csdo_blk_up_req (co_csdo_t *sdo, co_unsigned16_t idx, co_unsigned8_t subidx, co_unsigned8_t pst, co_csdo_up_con_t *con, void *data) |
| Submits a block upload request to a remote Server-SDO. More...
|
|
This file is part of the CANopen library; it contains the implementation of the Client-SDO functions.
- See also
- lely/co/csdo.h, src/sdo.h
- Copyright
- 2019 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 csdo.c.