gusimplewhiteboard
wb_fsm_control_status.h File Reference
#include <gu_util.h>
#include <gusimplewhiteboard/gusimplewhiteboard.h>
Include dependency graph for wb_fsm_control_status.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wb_fsm_control_status
 Finite State Machine Control and Status information. More...
 

Namespaces

namespace  guWhiteboard
 /file APM_Interface.h
 

Macros

#define CONTROLSTATUS_BYTE_SIZE   (sizeof(gu_simple_message))
 
#define CONTROLSTATUS_BIT_SIZE   (CONTROLSTATUS_BYTE_SIZE*8)
 
#define CONTROLSTATUS_BITS_RESERVED   2
 
#define CONTROLSTATUS_NUM_FSMS   (CONTROLSTATUS_BIT_SIZE - CONTROLSTATUS_BITS_RESERVED)
 
#define CONTROLSTATUS_CMD   (CONTROLSTATUS_BYTE_SIZE-1)
 
#define CONTROLSTATUS_CMD_LO   (1<<6)
 
#define CONTROLSTATUS_CMD_HI   (1<<7)
 
#define CONTROLSTATUS_CMD_MASK   (CONTROLSTATUS_CMD_LO|CONTROLSTATUS_CMD_HI)
 
#define CONTROLSTATUS_CLR_FSM(s, fsm)   ((s)->_fsms[(fsm)/8] &=~(1<<((fsm)%8)))
 
#define CONTROLSTATUS_SET_FSM(s, fsm)   ((s)->_fsms[(fsm)/8] |= (1<<((fsm)%8)))
 
#define CONTROLSTATUS_GET_FSM(s, fsm)   ((((s)->_fsms[(fsm)/8]) & (1<<((fsm)%8))) != 0)
 
#define CONTROLSTATUS_SET_CMD(s, cmd)   ((s)->_fsms[CONTROLSTATUS_CMD] = static_cast<uint8_t>(((s)->_fsms[CONTROLSTATUS_CMD] & ~CONTROLSTATUS_CMD_MASK) | (((cmd) & 3) << 6)))
 
#define CONTROLSTATUS_GET_CMD(s)   ((((s)->_fsms[CONTROLSTATUS_CMD]) >> 6) & 3)
 

Enumerations

enum  guWhiteboard::FSMControlType { guWhiteboard::FSMStatus , guWhiteboard::FSMSuspend , guWhiteboard::FSMResume , guWhiteboard::FSMRestart }
 command for ControlStatus More...
 

Macro Definition Documentation

◆ CONTROLSTATUS_BIT_SIZE

#define CONTROLSTATUS_BIT_SIZE   (CONTROLSTATUS_BYTE_SIZE*8)

Definition at line 65 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_BITS_RESERVED

#define CONTROLSTATUS_BITS_RESERVED   2

Definition at line 66 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_BYTE_SIZE

#define CONTROLSTATUS_BYTE_SIZE   (sizeof(gu_simple_message))

Definition at line 64 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_CLR_FSM

#define CONTROLSTATUS_CLR_FSM (   s,
  fsm 
)    ((s)->_fsms[(fsm)/8] &=~(1<<((fsm)%8)))

Definition at line 73 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_CMD

#define CONTROLSTATUS_CMD   (CONTROLSTATUS_BYTE_SIZE-1)

Definition at line 68 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_CMD_HI

#define CONTROLSTATUS_CMD_HI   (1<<7)

Definition at line 70 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_CMD_LO

#define CONTROLSTATUS_CMD_LO   (1<<6)

Definition at line 69 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_CMD_MASK

#define CONTROLSTATUS_CMD_MASK   (CONTROLSTATUS_CMD_LO|CONTROLSTATUS_CMD_HI)

Definition at line 71 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_GET_CMD

#define CONTROLSTATUS_GET_CMD (   s)    ((((s)->_fsms[CONTROLSTATUS_CMD]) >> 6) & 3)

Definition at line 81 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_GET_FSM

#define CONTROLSTATUS_GET_FSM (   s,
  fsm 
)    ((((s)->_fsms[(fsm)/8]) & (1<<((fsm)%8))) != 0)

Definition at line 75 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_NUM_FSMS

#define CONTROLSTATUS_NUM_FSMS   (CONTROLSTATUS_BIT_SIZE - CONTROLSTATUS_BITS_RESERVED)

Definition at line 67 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_SET_CMD

#define CONTROLSTATUS_SET_CMD (   s,
  cmd 
)    ((s)->_fsms[CONTROLSTATUS_CMD] = static_cast<uint8_t>(((s)->_fsms[CONTROLSTATUS_CMD] & ~CONTROLSTATUS_CMD_MASK) | (((cmd) & 3) << 6)))

Definition at line 80 of file wb_fsm_control_status.h.

◆ CONTROLSTATUS_SET_FSM

#define CONTROLSTATUS_SET_FSM (   s,
  fsm 
)    ((s)->_fsms[(fsm)/8] |= (1<<((fsm)%8)))

Definition at line 74 of file wb_fsm_control_status.h.