Lely core libraries 2.3.4
nmt_hb.h
Go to the documentation of this file.
1
23#ifndef LELY_CO_INTERN_NMT_HB_H_
24#define LELY_CO_INTERN_NMT_HB_H_
25
26#include "co.h"
27#include <lely/co/nmt.h>
28
29struct __co_nmt_hb;
30#ifndef __cplusplus
32typedef struct __co_nmt_hb co_nmt_hb_t;
33#endif
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
52void co_nmt_hb_ind(co_nmt_t *nmt, co_unsigned8_t id, int state, int reason,
53 co_unsigned8_t st);
54
55void *__co_nmt_hb_alloc(void);
56void __co_nmt_hb_free(void *ptr);
57struct __co_nmt_hb *__co_nmt_hb_init(
58 struct __co_nmt_hb *hb, can_net_t *net, co_nmt_t *nmt);
59void __co_nmt_hb_fini(struct __co_nmt_hb *hb);
60
73
76
89void co_nmt_hb_set_1016(co_nmt_hb_t *hb, co_unsigned8_t id, co_unsigned16_t ms);
90
100void co_nmt_hb_set_st(co_nmt_hb_t *hb, co_unsigned8_t st);
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif // !LELY_CO_INTERN_NMT_HB_H_
This header file is part of the CANopen library; it contains the network management (NMT) declaration...
void co_nmt_hb_destroy(co_nmt_hb_t *hb)
Destroys a CANopen NMT heartbeat consumer service.
Definition: nmt_hb.c:162
void co_nmt_hb_set_1016(co_nmt_hb_t *hb, co_unsigned8_t id, co_unsigned16_t ms)
Processes the value of CANopen object 1016 (Consumer heartbeat time) for the specified heartbeat cons...
Definition: nmt_hb.c:171
void co_nmt_hb_ind(co_nmt_t *nmt, co_unsigned8_t id, int state, int reason, co_unsigned8_t st)
The CANopen NMT heartbeat indication function, invoked when a heartbeat event occurs.
Definition: nmt.c:2420
co_nmt_hb_t * co_nmt_hb_create(can_net_t *net, co_nmt_t *nmt)
Creates a new CANopen NMT heartbeat consumer service.
Definition: nmt_hb.c:137
void co_nmt_hb_set_st(co_nmt_hb_t *hb, co_unsigned8_t st)
Sets the expected state of a remote NMT node.
Definition: nmt_hb.c:192
This is the internal header file of the CANopen library.
A CAN network interface.
Definition: net.c:37
A CANopen NMT heartbeat consumer.
Definition: nmt_hb.c:33
co_unsigned8_t st
The state of the node (excluding the toggle bit).
Definition: nmt_hb.c:45
can_net_t * net
A pointer to a CAN network interface.
Definition: nmt_hb.c:35
co_unsigned16_t ms
The consumer heartbeat time (in milliseconds).
Definition: nmt_hb.c:47
co_nmt_t * nmt
A pointer to an NMT master/slave service.
Definition: nmt_hb.c:37
int state
Indicates whether a heartbeat error occurred (CO_NMT_EC_OCCURRED or CO_NMT_EC_RESOLVED).
Definition: nmt_hb.c:52
A CANopen NMT master/slave service.
Definition: nmt.c:148