IgH EtherCAT Master  1.5.3
voe_handler.c File Reference

Vendor specific over EtherCAT protocol handler functions. More...

Go to the source code of this file.

Macros

#define EC_VOE_HEADER_SIZE   6
 VoE header size.
 
#define EC_VOE_RESPONSE_TIMEOUT   500
 VoE response timeout in [ms].
 

Functions

void ec_voe_handler_state_write_start (ec_voe_handler_t *voe)
 Start writing VoE data.
 
void ec_voe_handler_state_write_response (ec_voe_handler_t *voe)
 Wait for the mailbox response.
 
void ec_voe_handler_state_read_start (ec_voe_handler_t *voe)
 Start reading VoE data.
 
void ec_voe_handler_state_read_check (ec_voe_handler_t *voe)
 Check for new data in the mailbox.
 
void ec_voe_handler_state_read_response (ec_voe_handler_t *voe)
 Read the pending mailbox data.
 
void ec_voe_handler_state_read_nosync_start (ec_voe_handler_t *voe)
 Start reading VoE data without sending a sync message before.
 
void ec_voe_handler_state_read_nosync_response (ec_voe_handler_t *voe)
 Read the pending mailbox data without sending a sync message before. More...
 
void ec_voe_handler_state_end (ec_voe_handler_t *voe)
 Successful termination state function.
 
void ec_voe_handler_state_error (ec_voe_handler_t *voe)
 Failure termination state function.
 
int ec_voe_handler_init (ec_voe_handler_t *voe, ec_slave_config_t *sc, size_t size)
 VoE handler constructor. More...
 
void ec_voe_handler_clear (ec_voe_handler_t *voe)
 VoE handler destructor. More...
 
size_t ec_voe_handler_mem_size (const ec_voe_handler_t *voe)
 Get usable memory size. More...
 
void ecrt_voe_handler_send_header (ec_voe_handler_t *voe, uint32_t vendor_id, uint16_t vendor_type)
 Sets the VoE header for future send operations. More...
 
void ecrt_voe_handler_received_header (const ec_voe_handler_t *voe, uint32_t *vendor_id, uint16_t *vendor_type)
 Reads the header data of a received VoE message. More...
 
uint8_t * ecrt_voe_handler_data (ec_voe_handler_t *voe)
 Access to the VoE handler's data. More...
 
size_t ecrt_voe_handler_data_size (const ec_voe_handler_t *voe)
 Returns the current data size. More...
 
void ecrt_voe_handler_read (ec_voe_handler_t *voe)
 Start a VoE read operation. More...
 
void ecrt_voe_handler_read_nosync (ec_voe_handler_t *voe)
 Start a VoE read operation without querying the sync manager status. More...
 
void ecrt_voe_handler_write (ec_voe_handler_t *voe, size_t size)
 Start a VoE write operation. More...
 
ec_request_state_t ecrt_voe_handler_execute (ec_voe_handler_t *voe)
 Execute the handler. More...
 

Detailed Description

Vendor specific over EtherCAT protocol handler functions.

Definition in file voe_handler.c.

Function Documentation

◆ ec_voe_handler_state_read_nosync_response()

void ec_voe_handler_state_read_nosync_response ( ec_voe_handler_t voe)

Read the pending mailbox data without sending a sync message before.

This might lead to an empty reponse from the client.

Definition at line 458 of file voe_handler.c.

◆ ec_voe_handler_init()

int ec_voe_handler_init ( ec_voe_handler_t voe,
ec_slave_config_t sc,
size_t  size 
)

VoE handler constructor.

Returns
Return value of ec_datagram_prealloc().
Parameters
voeVoE handler.
scParent slave configuration.
sizeSize of memory to reserve.

Definition at line 72 of file voe_handler.c.

◆ ec_voe_handler_clear()

void ec_voe_handler_clear ( ec_voe_handler_t voe)

VoE handler destructor.

Parameters
voeVoE handler.

Definition at line 95 of file voe_handler.c.

◆ ec_voe_handler_mem_size()

size_t ec_voe_handler_mem_size ( const ec_voe_handler_t voe)

Get usable memory size.

Returns
Memory size.
Parameters
voeVoE handler.

Definition at line 108 of file voe_handler.c.