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

# CRcvBuffer Klassenreferenz

handles the received data Mehr...

`#include <rcvbuffer.hpp>`

Aufstellung aller Elemente

## Öffentliche Methoden
| CRcvBuffer ()
| std::cout
| CRcvBuffer (const CRcvBuffer &OldObject)
CRcvBuffer & | operator= (const CRcvBuffer &NewObject)
| needed to avoid the bitwise copying of handles
DWORD | GetTimeOut (void) const
| get/ set timeouts
void | SetTimeOut (const DWORD dwNewTimeOut)
RECEIVED_TYPE | GetCommand (void) const
| get / set received command
void | SetCommand (RECEIVED_TYPE NewCommand)
ADDRESS_TYPE | GetAddress (void) const
| get/ set buffer
unsigned int | GetLength (void) const
std::vector< unsigned char > | GetData (void) const
void | SetAddress (const ADDRESS_TYPE nAddress)
void | SetLength (const unsigned int uiLength)
void | SetData (const std::vector< unsigned char > &aucData)
bool | BeginDataTransfer (void) const
| (un)locking rcvbuffer
bool | EndDataTransfer (void) const
bool | StoreData (const RECEIVED_TYPE Command, const ADDRESS_TYPE nAddress, const unsigned int uiLength, const std::vector< unsigned char > &aucData=std::vector< unsigned char >::vector())
| store the data into rcvbuffer
bool | FetchData (RECEIVED_TYPE &Command, ADDRESS_TYPE &nAddress, unsigned int &uiLength, std::vector< unsigned char > &aucData)
| CRcvBuffer ()
| constructor creates mutex to protect internal buffer
| CRcvBuffer (const CRcvBuffer &OldObject)
| copyconstructor needed because we create a mutex during the constructor
virtual | ~CRcvBuffer ()
| destructor frees mutex
CRcvBuffer & | operator= (const CRcvBuffer &NewObject)
| overwrite assignment operator needed because we create a mutex during the constructor
DWORD | GetTimeOut (void) const
| delivers current internal timeout value
void | SetTimeOut (const DWORD dwNewTimeOut)
| sets current internal timeout value
RECEIVED_TYPE | GetCommand (void) const
| delivers received command
void | SetCommand (RECEIVED_TYPE NewCommand)
| sets received command
ADDRESS_TYPE | GetAddress (void) const
| delivers received address
unsigned int | GetLength (void) const
| delivers received data length
std::vector< unsigned char > | GetData (void) const
| delivers received data
void | SetAddress (const ADDRESS_TYPE nAddress)
| sets received command
void | SetLength (const unsigned int uiLength)
| sets received data length
void | SetData (const std::vector< unsigned char > &aucData)
| sets received data
bool | BeginDataTransfer (void) const
| locking receive buffer
bool | EndDataTransfer (void) const
| unlock receive buffer
bool | StoreData (const RECEIVED_TYPE Command, const ADDRESS_TYPE nAddress, const unsigned int uiLength, const std::vector< unsigned char > &aucData=std::vector< unsigned char >::vector())
| store the data into rcvbuffer
bool | FetchData (RECEIVED_TYPE &Command, ADDRESS_TYPE &nAddress, unsigned int &uiLength, std::vector< unsigned char > &aucData)
| delivers the received data
## Private Attribute
HANDLE | m_hDataLock
| handle for mutex to protect receive buffer
ADDRESS_TYPE | m_nAddress
| received address
unsigned int | m_uiLength
| received length
std::vector< unsigned char > | m_aucData
RECEIVED_TYPE | m_RcvCommand
| received command ( see enum RECEIVED_TYPE for details )
DWORD | m_dwTimeOut
| internal TimeOut
std::vector< unsigned char > | m_aucData
| received data

## Ausführliche Beschreibung

handles the received data

Version:
  1.0

Autor:
  Ingo Fröhlich

## Beschreibung der Konstruktoren und Destruktoren

CRcvBuffer::CRcvBuffer | ( |  | ) |

| std::cout handles the data received form rcvthread Autor: Ingo Fröhlich data 23.07.2001 Copyright Analytica GmbH

## Dokumentation der Elementfunktionen

bool CRcvBuffer::BeginDataTransfer | ( | void |  | ) | const

  | locking receive buffer Parameter:
  | --- |
Rückgabe: true lock successfull false else

bool CRcvBuffer::BeginDataTransfer | ( | void |  | ) | const

  | (un)locking rcvbuffer Parameter:
  | --- |
Rückgabe: true : ok, false : couldn't get exclusive access to the received data

bool CRcvBuffer::EndDataTransfer | ( | void |  | ) | const

  | unlock receive buffer Parameter:
  | --- |
Rückgabe: true unlock successfull false else

bool CRcvBuffer::EndDataTransfer | ( | void |  | ) | const

  | Parameter:
  | --- |
Rückgabe: true : ok, false : an error occured during the remove of the exclusive access to the received data ( use GetLastError() to get extended error information

bool CRcvBuffer::FetchData | ( | RECEIVED_TYPE & | Command,
|  | ADDRESS_TYPE & | nAddress,
|  | unsigned int & | uiLength,
|  | std::vector< unsigned char > & | aucData
| ) |

  | delivers the received data Parameter:
  | returned | received command
  | returned | received address
  | returned | received data length
  | returned | received data
Rückgabe: true operation successfull false else

bool CRcvBuffer::FetchData | ( | RECEIVED_TYPE & | Command,
|  | ADDRESS_TYPE & | nAddress,
|  | unsigned int & | uiLength,
|  | std::vector< unsigned char > & | aucData
| ) |

  | Parameter:
  | address,length | and data to store the received data in
Rückgabe: true : ok, false an error occured. The data were not overgiven

ADDRESS_TYPE CRcvBuffer::GetAddress | ( | void |  | ) | const

  | delivers received address Parameter:
  | --- |
Rückgabe: received address

ADDRESS_TYPE CRcvBuffer::GetAddress | ( | void |  | ) | const

  | get/ set buffer Parameter:
  | --- |
Rückgabe: the received address

RECEIVED_TYPE CRcvBuffer::GetCommand | ( | void |  | ) | const

  | delivers received command Parameter:
  | --- |
Rückgabe: received command

RECEIVED_TYPE CRcvBuffer::GetCommand | ( | void |  | ) | const

  | get / set received command Parameter:
  | --- |
Rückgabe: the received command

std::vector<unsigned char> CRcvBuffer::GetData | ( | void |  | ) | const

  | delivers received data Parameter:
  | --- |
Rückgabe: vector with received data

std::vector< unsigned char > CRcvBuffer::GetData | ( | void |  | ) | const

  | Parameter:
  | --- |
Rückgabe: the received data

unsigned int CRcvBuffer::GetLength | ( | void |  | ) | const

  | delivers received data length Parameter:
  | --- |
Rückgabe: received length

unsigned int CRcvBuffer::GetLength | ( | void |  | ) | const

  | Parameter:
  | --- |
Rückgabe: the received length

DWORD CRcvBuffer::GetTimeOut | ( | void |  | ) | const

  | delivers current internal timeout value uses during receiving data from the receive thread Parameter:
  | --- |
Rückgabe: current timeout

DWORD CRcvBuffer::GetTimeOut | ( | void |  | ) | const

  | get/ set timeouts Parameter:
  | --- |
Rückgabe: current TimeOut value

CRcvBuffer & CRcvBuffer::operator= | ( | const CRcvBuffer & | NewObject | ) |

| needed to avoid the bitwise copying of handles Received data address. length data TimeOuts getting data from receive thread

void CRcvBuffer::SetAddress | ( | const ADDRESS_TYPE | nAddress | ) |

  | sets received command Parameter:
  | command |
Rückgabe: ---

void CRcvBuffer::SetAddress | ( | const ADDRESS_TYPE | nAddress | ) |

  | Parameter:
  | the | received address
Rückgabe: ---

void CRcvBuffer::SetCommand | ( | RECEIVED_TYPE | NewCommand | ) |

  | sets received command Parameter:
  | received | command
Rückgabe: ---

void CRcvBuffer::SetCommand | ( | RECEIVED_TYPE | NewRcvCommand | ) |

  | Parameter:
  | the | received command
Rückgabe: ---

void CRcvBuffer::SetData | ( | const std::vector< unsigned char > & | aucData | ) |

  | sets received data Parameter:
  | received | data
Rückgabe: ---

void CRcvBuffer::SetData | ( | const std::vector< unsigned char > & | aucData | ) |

  | Parameter:
  | the | received data
Rückgabe: ---

void CRcvBuffer::SetLength | ( | const unsigned int | uiLength | ) |

  | sets received data length Parameter:
  | data | length
Rückgabe: ---

void CRcvBuffer::SetLength | ( | const unsigned int | uiLength | ) |

  | Parameter:
  | the | received length
Rückgabe: ---

void CRcvBuffer::SetTimeOut | ( | const DWORD | dwNewTimeOut | ) |

  | sets current internal timeout value uses during receiving data from the receive thread Parameter:
  | new | internal timeout value
Rückgabe: ---

void CRcvBuffer::SetTimeOut | ( | const DWORD | dwNewTimeOut | ) |

  | Parameter:
  | New | TimeOut value
Rückgabe: ---

bool CRcvBuffer::StoreData | ( | const RECEIVED_TYPE | Command,
|  | const ADDRESS_TYPE | nAddress,
|  | const unsigned int | uiLength,
|  | const std::vector< unsigned char > & | aucData = `std::vector< unsigned char >::vector()`
| ) |

  | store the data into rcvbuffer Parameter:
  | command |
  | address |
  | length | of the data
  | the | data
Rückgabe: true store successfull false else

bool CRcvBuffer::StoreData | ( | const RECEIVED_TYPE | Command,
|  | const ADDRESS_TYPE | nAddress,
|  | const unsigned int | uiLength,
|  | const std::vector< unsigned char > & | aucData = `std::vector<unsigned char>::vector()`
| ) |

  | store the data into rcvbuffer Parameter:
  | address,length | and data ( default : empty ) to set
Rückgabe: true : ok, false an error occured. The data were not set

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien:

- fps_rcvbuffer.hpp
- rcvbuffer.hpp
- fps_rcvbuffer.cpp
- rcvbuffer.cpp