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

CCommandstring Klassenreferenz

buildung of a single command block send to fps Mehr...

#include <commandstring.hpp>

Aufstellung aller Elemente

Öffentliche Typen

enum  CmdCode {
  READ_EEPROM_DATA_REQ = 0x01, READ_PROGRAM_DATA_REQ = 0x02, READ_RAM_DATA_REQ = 0x03, WRITE_EEPROM_DATA_REQ = 0x04,
  WRITE_PROGRAM_DATA_REQ = 0x05, WRITE_RAM_DATA_REQ = 0x06, READ_EEPROM_DATA_CNF = 0x81, READ_PROGRAM_DATA_CNF = 0x82,
  READ_RAM_DATA_CNF = 0x83, WRITE_EEPROM_DATA_CNF = 0x84, WRITE_PROGRAM_DATA_CNF = 0x85, WRITE_RAM_DATA_CNF = 0x86,
  STATUS_INFO = 0xff
}
 all possible commandtypes the memory refers always to the build in memory of the fps device Mehr...


Öffentliche Methoden

 CCommandstring ()
void SetUseCrcCheck (bool bUseCrc)
 tells the api to use ( or not ) the crc check when receiving data

CmdCode GetCommand (void) const
 delivers the current command

WORD GetAddress (void) const
 delivers the address the current command is pointing to

unsigned int GetLength (void) const
 delivers the length of the data being send or received

std::vector< unsigned char > GetData (void) const
 Delivers the data being send or received.

const std::vector< unsigned
char > & 
GetCommandString (void) const
 Delivers the hole commandstring.

void SetCommand (const CmdCode nCommand)
 set the current command

void SetAddress (const ADDRESS_TYPE nNewAdress)
 sets the address the current command is pointing to

void SetLength (const unsigned int uiLength)
 sets the length of the data being send or received

void SetData (const std::vector< unsigned char > &aucData)
 Set the data to be send.

bool SetCommandString (const std::vector< unsigned char > &aucNewCommandstring)
 Sets the commandstring as a hole.

bool CheckData (void)
 do the check if the data was transfered correctly

void BuildString (void)
 build the string from the information store in the variables


Öffentliche, statische Methoden

void DebugPrintRoutine (const char const *pcName, const ADDRESS_TYPE nAddress, const unsigned int uiLength)
 for debug reasons : prints out typical function parameter

void DebugPrintRoutine (const char const *pcName, const ADDRESS_TYPE nAddress, const unsigned int uiLength, const std::vector< unsigned char > &aucData)
 for debug reasons : prints out typical function parameter

void DebugPrintVector (const std::vector< unsigned char > &aucData)
 prints out the overgiven vector


Private Attribute

unsigned int m_uiLength
CChecksum m_cChecksum
 Length of the data transfered.

CHECKSUM_TYPE m_nChecksum
 Class used for calculating the checksum.

std::vector< unsigned char > m_aucBytes
 checksum store in datablock

CmdCode m_nCommand
 Bytes tranfered to the fps.

ADDRESS_TYPE m_nAddress
 Commandcode ( see upove for deatils ).

bool m_bUseCrcCheck
 Address ( of the fps ) for datatranfer ( targetadress ).

std::vector< unsigned char > m_aucCommandstring
 use crc check


Ausführliche Beschreibung

buildung of a single command block send to fps

Version:
1.0
Autor:
Ingo Fröhlich


Dokumentation der Aufzählungstypen

enum CCommandstring::CmdCode
 

all possible commandtypes the memory refers always to the build in memory of the fps device

Aufzählungswerte:
READ_PROGRAM_DATA_REQ  read data from eeprom request
READ_RAM_DATA_REQ  read data from program memory request
WRITE_EEPROM_DATA_REQ  read data from ram request
WRITE_PROGRAM_DATA_REQ  write data to eeprom request
WRITE_RAM_DATA_REQ  write data to program memory request
READ_EEPROM_DATA_CNF  write data to ram request
READ_PROGRAM_DATA_CNF  read confirmation for reading data from eeprom
READ_RAM_DATA_CNF  read confirmation for reading data from program memory
WRITE_EEPROM_DATA_CNF  read confirmation for reading data from ram
WRITE_PROGRAM_DATA_CNF  write confirmation for writing data to eeprom
WRITE_RAM_DATA_CNF  write confirmation for writing data to program memory
STATUS_INFO  write confirmation for writing data to ram


Beschreibung der Konstruktoren und Destruktoren

CCommandstring::CCommandstring  )  [inline]
 

Parameter:
--- 
Rückgabe:
---


Dokumentation der Elementfunktionen

void CCommandstring::BuildString void   ) 
 

build the string from the information store in the variables

Parameter:
--- 
Rückgabe:
---

bool CCommandstring::CheckData void   ) 
 

do the check if the data was transfered correctly

Parameter:
--- 
Rückgabe:
true data is ok

false data is corrupt

void CCommandstring::DebugPrintRoutine const char const *  pcName,
const ADDRESS_TYPE  nAddress,
const unsigned int  uiLength,
const std::vector< unsigned char > &  aucData
[static]
 

for debug reasons : prints out typical function parameter

Parameter:
Name of the routine ( function )
Address in the fps
Length of the range in the fps
vector ( unsigned char ) ( overgiven data )
Rückgabe:
---

void CCommandstring::DebugPrintRoutine const char const *  pcName,
const ADDRESS_TYPE  nAddress,
const unsigned int  uiLength
[static]
 

for debug reasons : prints out typical function parameter

Parameter:
Name of the routine ( function )
Address in the fps
Length of the range in the fps
Rückgabe:
---

void CCommandstring::DebugPrintVector const std::vector< unsigned char > &  aucData  )  [static]
 

prints out the overgiven vector

Parameter:
vector ( unsigned char )
Rückgabe:
---

ADDRESS_TYPE CCommandstring::GetAddress void   )  const
 

delivers the address the current command is pointing to

Parameter:
--- 
Rückgabe:
address

CCommandstring::CmdCode CCommandstring::GetCommand void   )  const
 

delivers the current command

Parameter:
--- 
Rückgabe:
commandcode

const std::vector< unsigned char > & CCommandstring::GetCommandString void   )  const
 

Delivers the hole commandstring.

Parameter:
--- 
Rückgabe:
vector with the commandstring

std::vector< unsigned char > CCommandstring::GetData void   )  const
 

Delivers the data being send or received.

Parameter:
--- 
Rückgabe:
vector with the current data

unsigned int CCommandstring::GetLength void   )  const
 

delivers the length of the data being send or received

Parameter:
--- 
Rückgabe:
length

void CCommandstring::SetAddress const ADDRESS_TYPE  nNewAdress  ) 
 

sets the address the current command is pointing to

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

void CCommandstring::SetCommand const CmdCode  nCommand  ) 
 

set the current command

Parameter:
commandcode 
Rückgabe:
---

bool CCommandstring::SetCommandString const std::vector< unsigned char > &  aucNewCommandstring  ) 
 

Sets the commandstring as a hole.

Parameter:
vector with the new Commandstring
Rückgabe:
bool true => commandstring seems to be valid

bool false => commandstring is invalid

void CCommandstring::SetData const std::vector< unsigned char > &  aucData  ) 
 

Set the data to be send.

Parameter:
vector with the data to be set
Rückgabe:
---

void CCommandstring::SetLength const unsigned int  uiLength  ) 
 

sets the length of the data being send or received

Parameter:
length 
Rückgabe:
---

void CCommandstring::SetUseCrcCheck bool  bUseCrc  ) 
 

tells the api to use ( or not ) the crc check when receiving data

Parameter:
true : use Check
Rückgabe:
---


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien:
Erzeugt am Tue Mar 11 14:25:04 2008 für SchunkFPS von doxygen 1.3.7