IgH EtherCAT Master  1.5.2
fsm_mbox_gateway.h File Reference

EtherCAT Mailbox Gateway state machine. More...

Go to the source code of this file.

Data Structures

struct  ec_fsm_mbg
 Finite state machines for the CANopen over EtherCAT protocol. More...
 

Typedefs

typedef struct ec_fsm_mbg ec_fsm_mbg_t
 

Functions

void ec_fsm_mbg_init (ec_fsm_mbg_t *)
 Constructor.
 
void ec_fsm_mbg_clear (ec_fsm_mbg_t *)
 Destructor.
 
void ec_fsm_mbg_transfer (ec_fsm_mbg_t *, ec_slave_t *, ec_mbg_request_t *)
 Starts to transfer a mailbox gateway request to/from a slave.
 
int ec_fsm_mbg_exec (ec_fsm_mbg_t *, ec_datagram_t *)
 Executes the current state of the state machine. More...
 
int ec_fsm_mbg_success (const ec_fsm_mbg_t *)
 Returns, if the state machine terminated with success. More...
 

Detailed Description

EtherCAT Mailbox Gateway state machine.

Note: message fragmentation (segmentation) not supported

Definition in file fsm_mbox_gateway.h.

Typedef Documentation

◆ ec_fsm_mbg_t

typedef struct ec_fsm_mbg ec_fsm_mbg_t
See also
ec_fsm_mbg

Definition at line 48 of file fsm_mbox_gateway.h.

Function Documentation

◆ ec_fsm_mbg_exec()

int ec_fsm_mbg_exec ( ec_fsm_mbg_t fsm,
ec_datagram_t datagram 
)

Executes the current state of the state machine.

Returns
1 if the state machine is still in progress, else 0.
Parameters
fsmFinite state machine.
datagramDatagram to use.

Definition at line 107 of file fsm_mbox_gateway.c.

◆ ec_fsm_mbg_success()

int ec_fsm_mbg_success ( const ec_fsm_mbg_t fsm)

Returns, if the state machine terminated with success.

Returns
non-zero if successful.
Parameters
fsmFinite state machine

Definition at line 131 of file fsm_mbox_gateway.c.