12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef CPLPARAMETERS_HEADER
- #define CPLPARAMETERS_HEADER
- #include <stdint.h>
- #include <cstddef>
- #include "../classes/stdafx.hpp"
- #include "../classes/CPLChannel.hpp"
- #include "../classes/CPLMessage.hpp"
- class __declspec (dllexport) CPLParameters:public CPLMessage
- {
- public:
- CPLParameters ();
- explicit CPLParameters (char const * filename);
- explicit CPLParameters (CPLChannel * channel);
- virtual ~ CPLParameters ();
- void * Data () const;
- size_t Size () const;
- bool IsValid () const;
- signed Flash (CPLChannel * channel);
- signed Write (CPLChannel * channel);
- signed Write (char const * filename);
- signed Read (CPLChannel *);
- signed Read (char const * filename);
- CPLParameters & SetCAPPriority (int CAPpriority);
- int Write_QoS_block (int selectPIB);
- CPLParameters & Lock ();
- private:
- CPLParameters & Init ();
- uint16_t mextent;
- #ifndef __GNUC__
- #pragma pack (push, 1)
- #endif
- typedef struct __packed
- {
- uint8_t FWVERSION;
- uint8_t PIBVERSION;
- uint16_t RESERVED1;
- uint16_t PIBLENGTH;
- uint16_t RESERVED2;
- uint32_t CHECKSUM;
- }
- Header;
- CPLParameters::Header * mheader;
- protected:
- uint8_t * mbuffer;
- #ifndef __GNUC__
- #pragma pack (pop)
- #endif
- };
- #endif
|