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

# fps_rcvbuffer.hpp

    00001
    00012 #ifndef FPS_RCVBUFFER_H
    00013    #define FPS_RCVBUFFER_H
    00014
    00015    #include "commandstring.hpp"
    00016
    00017    enum RECEIVED_TYPE
    00018    {
    00019       NONE,
    00020       CONNECT,
    00021       DISCONNECT,
    00022       READ_EEPROM_REQ,
    00023       READ_EEPROM_CNF,
    00024       READ_PROGRAM_REQ,
    00025       READ_PROGRAM_CNF,
    00026       READ_RAM_REQ,
    00027       READ_RAM_CNF,
    00028       WRITE_EEPROM_REQ,
    00029       WRITE_EEPROM_CNF,
    00030       WRITE_PROGRAM_REQ,
    00031       WRITE_PROGRAM_CNF,
    00032       WRITE_RAM_REQ,
    00033       WRITE_RAM_CNF,
    00034       STATUS_INFORMATION
    00035    };
    00036
    00037    class CRcvBuffer
    00038    {
    00039       public:
    00040          CRcvBuffer();
    00041          CRcvBuffer( const CRcvBuffer& OldObject );
    00042          virtual ~CRcvBuffer();
    00043          CRcvBuffer& operator = (const CRcvBuffer& NewObject );
    00044
    00046          DWORD GetTimeOut( void ) const;
    00047          void  SetTimeOut( const DWORD dwNewTimeOut );
    00048
    00050          RECEIVED_TYPE GetCommand( void ) const;
    00051          void          SetCommand( RECEIVED_TYPE NewCommand );
    00052
    00054          ADDRESS_TYPE               GetAddress( void ) const;
    00055          unsigned int               GetLength( void ) const;
    00056          std::vector<unsigned char> GetData( void ) const;
    00057          void                       SetAddress( const ADDRESS_TYPE nAddress );
    00058          void                       SetLength( const unsigned int uiLength );
    00059          void                       SetData( const std::vector<unsigned char>& aucData );
    00060
    00062          bool BeginDataTransfer( void ) const;
    00063          bool EndDataTransfer(   void ) const;
    00064
    00066          bool StoreData( const RECEIVED_TYPE Command,
    00067                          const ADDRESS_TYPE  nAddress,
    00068                          const unsigned int  uiLength,
    00069                          const std::vector<unsigned char>& aucData= std::vector<unsigned char>::vector() );
    00070          bool FetchData( RECEIVED_TYPE& Command,
    00071                          ADDRESS_TYPE& nAddress,
    00072                          unsigned int& uiLength,
    00073                          std::vector<unsigned char>& aucData );
    00074       protected:
    00075       private:
    00076          HANDLE m_hDataLock;
    00077
    00079          ADDRESS_TYPE               m_nAddress;
    00080          unsigned int               m_uiLength;
    00081          std::vector<unsigned char> m_aucData;
    00082          RECEIVED_TYPE              m_RcvCommand;
    00083
    00085          DWORD m_dwTimeOut;
    00086    };
    00087 #endif