master/fsm.h
changeset 293 14aeb79aa992
parent 286 f3352378b4d4
child 325 7833cf70c4f2
equal deleted inserted replaced
292:2cf6ae0a2419 293:14aeb79aa992
    40 
    40 
    41 #ifndef __EC_STATES__
    41 #ifndef __EC_STATES__
    42 #define __EC_STATES__
    42 #define __EC_STATES__
    43 
    43 
    44 #include "../include/ecrt.h"
    44 #include "../include/ecrt.h"
    45 #include "command.h"
    45 #include "datagram.h"
    46 #include "slave.h"
    46 #include "slave.h"
    47 
    47 
    48 /*****************************************************************************/
    48 /*****************************************************************************/
    49 
    49 
    50 typedef struct ec_fsm ec_fsm_t; /**< \see ec_fsm */
    50 typedef struct ec_fsm ec_fsm_t; /**< \see ec_fsm */
    55 
    55 
    56 struct ec_fsm
    56 struct ec_fsm
    57 {
    57 {
    58     ec_master_t *master; /**< master the FSM runs on */
    58     ec_master_t *master; /**< master the FSM runs on */
    59     ec_slave_t *slave; /**< slave the FSM runs on */
    59     ec_slave_t *slave; /**< slave the FSM runs on */
    60     ec_command_t command; /**< command used in the state machine */
    60     ec_datagram_t datagram; /**< datagram used in the state machine */
    61 
    61 
    62     void (*master_state)(ec_fsm_t *); /**< master state function */
    62     void (*master_state)(ec_fsm_t *); /**< master state function */
    63     unsigned int master_slaves_responding; /**< number of responding slaves */
    63     unsigned int master_slaves_responding; /**< number of responding slaves */
    64     ec_slave_state_t master_slave_states; /**< states of responding slaves */
    64     ec_slave_state_t master_slave_states; /**< states of responding slaves */
    65     unsigned int master_validation; /**< non-zero, if validation to do */
    65     unsigned int master_validation; /**< non-zero, if validation to do */