Lely core libraries 2.3.4
nmt_boot.h File Reference

This is the internal header file of the NMT 'boot slave' declarations. More...

#include "co.h"
#include <lely/co/csdo.h>
#include <lely/co/nmt.h>
Include dependency graph for nmt_boot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct __co_nmt_boot co_nmt_boot_t
 An opaque CANopen NMT 'boot slave' service type.
 

Functions

void co_nmt_boot_con (co_nmt_t *nmt, co_unsigned8_t id, co_unsigned8_t st, char es)
 The CANopen NMT 'boot slave' confirmation function, invoked when the 'boot slave' process completes. More...
 
co_nmt_boot_tco_nmt_boot_create (can_net_t *net, co_dev_t *dev, co_nmt_t *nmt)
 Creates a new CANopen NMT 'boot slave' service. More...
 
void co_nmt_boot_destroy (co_nmt_boot_t *boot)
 Destroys a CANopen NMT 'boot slave' service. More...
 
int co_nmt_boot_boot_req (co_nmt_boot_t *boot, co_unsigned8_t id, int timeout, co_csdo_ind_t *dn_ind, co_csdo_ind_t *up_ind, void *data)
 Starts a CANopen NMT 'boot slave' service. More...
 

Detailed Description

This is the internal header file of the NMT 'boot slave' declarations.

See also
lely/co/nmt.h
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 nmt_boot.h.

Function Documentation

◆ co_nmt_boot_con()

void co_nmt_boot_con ( co_nmt_t nmt,
co_unsigned8_t  id,
co_unsigned8_t  st,
char  es 
)

The CANopen NMT 'boot slave' confirmation function, invoked when the 'boot slave' process completes.

Parameters
nmta pointer to an NMT master service.
idthe node-ID of the slave (in the range [1..127]).
stthe state of the node (including the toggle bit).
esthe error status (in the range ['A'..'O'], or 0 on success).

Definition at line 2297 of file nmt.c.

◆ co_nmt_boot_create()

co_nmt_boot_t * co_nmt_boot_create ( can_net_t net,
co_dev_t dev,
co_nmt_t nmt 
)

Creates a new CANopen NMT 'boot slave' service.

Parameters
neta pointer to a CAN network.
deva pointer to a CANopen device.
nmta pointer to an NMT master service.
Returns
a pointer to a new 'boot slave' service, or NULL on error.
See also
co_nmt_boot_destroy()

Definition at line 885 of file nmt_boot.c.

◆ co_nmt_boot_destroy()

void co_nmt_boot_destroy ( co_nmt_boot_t boot)

Destroys a CANopen NMT 'boot slave' service.

See also
co_nmt_boot_create()

Definition at line 910 of file nmt_boot.c.

◆ co_nmt_boot_boot_req()

int co_nmt_boot_boot_req ( co_nmt_boot_t boot,
co_unsigned8_t  id,
int  timeout,
co_csdo_ind_t dn_ind,
co_csdo_ind_t up_ind,
void *  data 
)

Starts a CANopen NMT 'boot slave' service.

Parameters
boota pointer to an NMT 'boot slave' service.
idthe node-ID.
timeoutthe SDO timeout (in milliseconds).
dn_inda pointer to the SDO download progress indication function (can be NULL).
up_inda pointer to the SDO upload progress indication function (can be NULL).
dataa pointer to user-specified data (can be NULL). data is passed as the last parameter to dn_ind and up_ind.
Returns
0 on success, or -1 on error. In the latter case, the error number can be obtained with get_errc().

Definition at line 919 of file nmt_boot.c.