Lely core libraries  2.2.5
nmt_srv.h File Reference

This is the internal header file of the NMT service manager declarations. More...

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

Go to the source code of this file.

Data Structures

struct  co_nmt_srv
 A CANopen NMT service manager. More...
 

Macros

#define CO_NMT_SRV_PDO   0x01
 The Receive/Transmit-PDO services.
 
#define CO_NMT_SRV_SDO   0x02
 The Server/Client-SDO services.
 
#define CO_NMT_SRV_SYNC   0x04
 The SYNC producer/consumer service.
 
#define CO_NMT_SRV_TIME   0x08
 The TIME producer/consumer service.
 
#define CO_NMT_SRV_EMCY   0x10
 The EMCY producer/consumer service.
 
#define CO_NMT_SRV_LSS   0x20
 The LSS master/slave service.
 

Functions

void co_nmt_srv_init (struct co_nmt_srv *srv, co_nmt_t *nmt)
 Initializes a CANopen NMT service manager. More...
 
void co_nmt_srv_fini (struct co_nmt_srv *srv)
 Finalizes a CANopen NMT service manager. More...
 
void co_nmt_srv_set (struct co_nmt_srv *srv, co_nmt_t *nmt, int set)
 Enables/disables the specified CANopen services. More...
 

Detailed Description

This is the internal header file of the NMT service manager 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_srv.h.

Function Documentation

◆ co_nmt_srv_init()

void co_nmt_srv_init ( struct co_nmt_srv srv,
co_nmt_t nmt 
)

Initializes a CANopen NMT service manager.

See also
co_nmt_srv_fini()

Definition at line 117 of file nmt_srv.c.

◆ co_nmt_srv_fini()

void co_nmt_srv_fini ( struct co_nmt_srv srv)

Finalizes a CANopen NMT service manager.

See also
co_nmt_srv_init()

Definition at line 144 of file nmt_srv.c.

◆ co_nmt_srv_set()

void co_nmt_srv_set ( struct co_nmt_srv srv,
co_nmt_t nmt,
int  set 
)

Enables/disables the specified CANopen services.

Parameters
srva pointer to a CANopen NMT service manager.
nmta pointer to an NMT master/slave service.
setthe services to be enabled (any combination of CO_NMT_SRV_PDO, CO_NMT_SRV_SDO, CO_NMT_SRV_SYNC, CO_NMT_SRV_TIME and CO_NMT_SRV_EMCY). Services not part of set will be disabled.

Definition at line 152 of file nmt_srv.c.