Lely core libraries
2.2.5
|
Go to the documentation of this file.
22 #ifndef LELY_CO_EMCY_H_
23 #define LELY_CO_EMCY_H_
29 #define CO_EMCY_COBID_VALID UINT32_C(0x80000000)
35 #define CO_EMCY_COBID_FRAME UINT32_C(0x20000000)
53 co_unsigned16_t eec, co_unsigned8_t er, co_unsigned8_t msef[5],
56 void *__co_emcy_alloc(
void);
57 void __co_emcy_free(
void *ptr);
60 void __co_emcy_fini(
struct __co_emcy *emcy);
101 const co_unsigned8_t msef[5]);
131 co_unsigned8_t *per);
174 #endif // !LELY_CO_EMCY_H_
can_net_t * net
A pointer to a CAN network interface.
void co_emcy_get_ind(const co_emcy_t *emcy, co_emcy_ind_t **pind, void **pdata)
Retrieves the indication function invoked when a CANopen EMCY message is received.
co_dev_t * co_emcy_get_dev(const co_emcy_t *emcy)
Returns a pointer to the CANopen device of an EMCY producer/consumer service.
co_dev_t * dev
A pointer to a CANopen device.
void co_emcy_peek(const co_emcy_t *emcy, co_unsigned16_t *peec, co_unsigned8_t *per)
Retrieves, but does not pop, the most recent CANopen EMCY message from the stack.
void * data
A pointer to user-specified data for ind.
can_net_t * co_emcy_get_net(const co_emcy_t *emcy)
Returns a pointer to the CAN network of an EMCY producer/consumer service.
void co_emcy_ind_t(co_emcy_t *emcy, co_unsigned8_t id, co_unsigned16_t eec, co_unsigned8_t er, co_unsigned8_t msef[5], void *data)
The type of a CANopen EMCY indication function, invoked when an EMCY message is received.
A CANopen EMCY producer/consumer service.
int co_emcy_pop(co_emcy_t *emcy, co_unsigned16_t *peec, co_unsigned8_t *per)
Pops the most recent CANopen EMCY message from the stack and broadcasts an 'error reset' message if t...
void co_emcy_destroy(co_emcy_t *emcy)
Destroys a CANopen EMCY producer/consumer service.
int co_emcy_push(co_emcy_t *emcy, co_unsigned16_t eec, co_unsigned8_t er, const co_unsigned8_t msef[5])
Pushes a CANopen EMCY message to the stack and broadcasts it if the EMCY producer service is active.
void co_emcy_set_ind(co_emcy_t *emcy, co_emcy_ind_t *ind, void *data)
Sets the indication function invoked when a CANopen EMCY message is received.
int co_emcy_clear(co_emcy_t *emcy)
Clears the CANopen EMCY message stack and broadcasts the 'error reset/no error' message if the EMCY p...
co_emcy_t * co_emcy_create(can_net_t *net, co_dev_t *dev)
Creates a new CANopen EMCY producer/consumer service.
co_emcy_ind_t * ind
A pointer to the indication function.