appkit  1.5.1
RoadNarrows Robotics Application Kit
rnr::StateWinCamera Class Reference

#include <StateWinCamera.h>

Inheritance diagram for rnr::StateWinCamera:
rnr::StateWin rnr::State

Public Member Functions

 StateWinCamera (int nStateId, SessionWin &session, const std::string &strStateName="", const std::string &strRefTag="")
 Initialization constructor. More...
 
 StateWinCamera (int nStateId, SessionWin &session, const std::string &strStateName, const std::string &strRefTag, StateEvent *listStateEvents[])
 List constructor. More...
 
virtual ~StateWinCamera ()
 Destructor.
 
virtual void setButtonStates ()
 Set button states. More...
 
- Public Member Functions inherited from rnr::StateWin
 StateWin (int nStateId, SessionWin &session, const std::string &strStateName="", const std::string &strRefTag="")
 Initialization constructor. More...
 
 StateWin (int nStateId, SessionWin &session, const std::string &strStateName, const std::string &strRefTag, StateEvent *listStateEvents[])
 List constructor. More...
 
virtual ~StateWin ()
 Destructor.
 
virtual int receiveEvent ()
 Receive next window event. More...
 
virtual void actionEnterState (int nPrevStateId, int nEventId)
 Execute "enter state" action. More...
 
virtual void actionExitState (int nNextStateId, int nEventId)
 Execute "exit state" action. More...
 
SessionWinsession ()
 Get the embedding window session. More...
 
void enableMouseEvents (bool bEnable)
 Enable/disable mouse events. More...
 
void enableKbEvents (bool bEnable)
 Enable/disable keyboard events. More...
 
- Public Member Functions inherited from rnr::State
 State (int nStateId, const std::string &strStateName="", const std::string &strRefTag="")
 Initialization constructor. More...
 
 State (int nStateId, const std::string &strStateName, const std::string &strRefTag, StateEvent *listStateEvents[])
 List constructor. More...
 
virtual ~State ()
 Destructor.
 
int addStateEvents (StateEvent *pStateEvent,...)
 Add a list of state events to this state. More...
 
void addStateEvent (StateEvent *pStateEvent)
 Add state to this state. More...
 
bool deleteStateEvent (int nEventId)
 Delete state event from this state. More...
 
uint_t setTimeOut (uint_t usecTimeOut)
 Set recieve event time out. More...
 
uint_t getTimeOut ()
 Get recieve event time out. More...
 
virtual void queueNextEvent (int nEventId)
 Queue the next event to be "recieved". More...
 
virtual int dispatchEvent (int nPrevStateId, int nEventId)
 Dispatch received event by executing associated action and transitioning to the next state. More...
 
virtual int actionDefault (int nPrevStateId, int nEventId)
 Execute 'default' action. More...
 
int getStateId () const
 Get state id. More...
 
std::string getStateName () const
 Get state name. More...
 
std::string getRefTag () const
 Get state reference tag. More...
 
std::string getEventName (int nEventId)
 Get state event name. More...
 
std::string getActionName (int nEventId)
 Get state action name. More...
 
virtual void printState (FILE *fp=stdout, int indent=0)
 Print out state. More...
 
 State (Session &session, int nInitAction=UIActionNone)
 
virtual int getNextAction (Session &session, int nTimeoutMs)
 
virtual int setNextAction (int nAction)
 Set the next input action to process. More...
 
int getCurAction ()
 Get the currently retrieved input action. More...
 
bool hasFatal ()
 Test if state has fatal condition. More...
 
void setFatal ()
 
bool isModified ()
 
void setModifiedState (bool bModified)
 
void maskHardButton (bool bEnDis)
 Enable/disable masking of hard button input. More...
 
virtual bool isHardButtonPushed (Session &session)
 
virtual void prompt (Session &session)
 Prompt user, given the state. More...
 
virtual void setMenuStates (Session &session)
 
virtual void transQuit (Session &session)
 
virtual void transPrev (Session &session)
 

Protected Member Functions

virtual void initOnceButtons ()
 One-time button menu initialization. More...
 
virtual void buildGuiInterface ()
 Build the window gui interface. More...
 
- Protected Member Functions inherited from rnr::StateWin
virtual void initOnceGuiInterface ()
 One-time initialization of the window gui interface. More...
 
virtual void showGuiInterface ()
 Show the window gui interface. More...
 
virtual void destroyGuiInterface ()
 Destroy the window gui interface. More...
 
- Protected Member Functions inherited from rnr::State
void init (int nStateId, const std::string &strStateName="", const std::string &strRefTag="")
 Initialize data. More...
 
virtual std::string getReservedStateName (int nStateId)
 Get the reserved state name. More...
 
virtual void buildInterface (Session &session)
 
virtual void destroyInterface ()
 
virtual void initButtonMenu ()
 

Protected Attributes

CameraGst m_camera
 the camera
 
- Protected Attributes inherited from rnr::StateWin
SessionWinm_session
 state id
 
bool m_bOneTimeInit
 state's one-time initializaion
 
bool m_bMouseEvents
 enable/disable mouse events
 
bool m_bKbEvents
 enable/disable keyboard events
 
WinButtonMenum_pButtons
 button menu
 
WinCvMouse m_mouse
 mouse
 
- Protected Attributes inherited from rnr::State
int m_nStateId
 state id
 
std::string m_strStateName
 state name
 
std::string m_strRefTag
 state tag (short id string)
 
TransTblMap_T m_mapTransTbl
 state transition table
 
int m_nQueuedEventId
 queue state event
 
bool m_bHasQueuedEvent
 [no] queued state event
 
uint_t m_usecTimeOut
 receive event time out (useconds)
 
Window * m_pWin
 bound window
 
Menu * m_pMenu
 button menu
 
int m_nInitAction
 initial state input action
 
int m_nCurAction
 current state input action
 
bool m_bFatal
 fatal error
 
bool m_bModified
 state [not] modified
 
bool m_bHardBttnEnable
 enable/disable hard button input
 

Friends

class StateEvent
 friend
 

Additional Inherited Members

- Public Types inherited from rnr::State
typedef std::map< int, StateEvent * > TransTblMap_T
 transition table type
 
- Static Public Attributes inherited from rnr::State
static const int StateIdUndef = 0
 undefined state
 
static const int StateIdStart = 1
 start state
 
static const int StateIdPrev = 2
 the previous state
 
static const int StateIdThis = 3
 the current (this) state
 
static const int StateIdTerminate = 4
 terminate state
 
static const int StateIdNumOf = 5
 number of reserved state id's
 

Detailed Description

State base class.

Definition at line 90 of file StateWinCamera.h.

Constructor & Destructor Documentation

rnr::StateWinCamera::StateWinCamera ( int  nStateId,
SessionWin session,
const std::string &  strStateName = "",
const std::string &  strRefTag = "" 
)
inline

Initialization constructor.

Parameters
nStateIdState id. Must be state machine unique.
sessionState's embedding in (derived) window session.
strStateNameState name.
strRefTagState reference id.

Definition at line 101 of file StateWinCamera.h.

References rnr::StateWin::m_bKbEvents, rnr::StateWin::m_bMouseEvents, rnr::StateWin::m_bOneTimeInit, and rnr::StateWin::m_pButtons.

104  :
105  StateWin(nStateId, session, strStateName, strRefTag)
106  {
107  m_bOneTimeInit = false;
108  m_bMouseEvents = true;
109  m_bKbEvents = false;
110  m_pButtons = NULL;
111  }
WinButtonMenu * m_pButtons
button menu
Definition: StateWin.h:213
bool m_bMouseEvents
enable/disable mouse events
Definition: StateWin.h:211
bool m_bOneTimeInit
state&#39;s one-time initializaion
Definition: StateWin.h:210
bool m_bKbEvents
enable/disable keyboard events
Definition: StateWin.h:212
StateWin(int nStateId, SessionWin &session, const std::string &strStateName="", const std::string &strRefTag="")
Initialization constructor.
Definition: StateWin.h:95
SessionWin & session()
Get the embedding window session.
Definition: StateWin.h:183
rnr::StateWinCamera::StateWinCamera ( int  nStateId,
SessionWin session,
const std::string &  strStateName,
const std::string &  strRefTag,
StateEvent listStateEvents[] 
)
inline

List constructor.

Parameters
nStateIdState id. Must be state machine unique.
sessionState's embedding in (derived) window session.
strStateNameState name.
strRefTagState reference id.
listStateEventsDeclaration list of allocated state events. NULL terminated.

Definition at line 123 of file StateWinCamera.h.

References rnr::StateWin::m_bKbEvents, rnr::StateWin::m_bMouseEvents, rnr::StateWin::m_bOneTimeInit, and rnr::StateWin::m_pButtons.

127  :
128  StateWin(nStateId, session, strStateName, strRefTag, listStateEvents)
129  {
130  m_bOneTimeInit = false;
131  m_bMouseEvents = true;
132  m_bKbEvents = false;
133  m_pButtons = NULL;
134  }
WinButtonMenu * m_pButtons
button menu
Definition: StateWin.h:213
bool m_bMouseEvents
enable/disable mouse events
Definition: StateWin.h:211
bool m_bOneTimeInit
state&#39;s one-time initializaion
Definition: StateWin.h:210
bool m_bKbEvents
enable/disable keyboard events
Definition: StateWin.h:212
StateWin(int nStateId, SessionWin &session, const std::string &strStateName="", const std::string &strRefTag="")
Initialization constructor.
Definition: StateWin.h:95
SessionWin & session()
Get the embedding window session.
Definition: StateWin.h:183

Member Function Documentation

virtual void rnr::StateWinCamera::buildGuiInterface ( )
protectedvirtual

Build the window gui interface.

This function is called on the "enter state" action.

Reimplemented from rnr::StateWin.

virtual void rnr::StateWinCamera::initOnceButtons ( )
protectedvirtual

One-time button menu initialization.

This function is called on the "enter state" action.

Reimplemented from rnr::StateWin.

virtual void rnr::StateWinCamera::setButtonStates ( )
virtual

Set button states.

State and/or session data determine the state of the buttons.

Reimplemented from rnr::StateWin.

Referenced by ~StateWinCamera().


The documentation for this class was generated from the following file: