As a part of a agent, I am implementing multiple state machines.
I have encoded the states of these state machines as enumerated type.
Needless to say, all of them have IDLE state as a common state.
Example,
enum {IDLE, TX_ON, TX_WAIT …} tx_state;
enum {IDLE, RX_ON, RX_WAIT …} rx_state;
Right during the compilation, the compiler complains that the second enumerated type has IDLE which has already been declared. I don’t know if there is a way to get out of this.