Hauptseite | Klassenhierarchie | Alphabetische Liste | Auflistung der Klassen | Auflistung der Dateien | Klassen-Elemente | Datei-Elemente

CStatemaschine Klassenreferenz

implements a statemaschine ( used the handle incoming command blocks ) Mehr...

Aufstellung aller Elemente

Öffentliche Typen

enum  STATE {
  IDLE, WAIT_COMMAND, WAIT_ADDRESS, WAIT_LENGTH,
  WAIT_DATA, WAIT_ETX, WAIT_CRC
}
 all possible states Mehr...


Öffentliche Methoden

 CStatemaschine ()
 constructor

virtual ~CStatemaschine ()
 destructor

bool Input (const unsigned char ucInput)
 the implementation of the statemaschine overgive the next byte for run throught the statemaschine

STATE GetCurrentState (void) const
 delivers the current state of the statemaschine

void SetCurrentState (const STATE)
 Sets the current state of the statemaschine.

bool IsCompleted (void) const
 returns true in case of a complete run through the statemaschine


Ausführliche Beschreibung

Version:
1.0
Autor:
Ingo Fröhlich


Dokumentation der Aufzählungstypen

enum CStatemaschine::STATE
 

Aufzählungswerte:
IDLE 
WAIT_COMMAND  just entered the statemaschine
WAIT_ADDRESS  we expect a command ( 1 byte )
WAIT_LENGTH  waiting for the addresse ( 2 bytes )
WAIT_DATA  waiting for data block length ( 1 byte )
WAIT_ETX  waiting for data ( n byte )
WAIT_CRC  wait for checksum ( 2 bytes )


Beschreibung der Konstruktoren und Destruktoren

CStatemaschine::CStatemaschine  ) 
 

virtual CStatemaschine::~CStatemaschine  )  [inline, virtual]
 


Dokumentation der Elementfunktionen

STATE CStatemaschine::GetCurrentState void   )  const
 

Parameter:
--- 
Rückgabe:
current state

bool CStatemaschine::Input const unsigned char  ucInput  ) 
 

Parameter:
the next read byte
Rückgabe:
true ok

false an error occured

bool CStatemaschine::IsCompleted void   )  const
 

Parameter:
--- 
Rückgabe:
true run completed

void CStatemaschine::SetCurrentState const  STATE  ) 
 

Parameter:
the new state
Rückgabe:
---


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
Erzeugt am Tue Mar 11 14:25:20 2008 für SchunkFPSAPI von doxygen 1.3.7