mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2026-09-18 19:13:58 +00:00
reconstruct: restore brave-tape3 packet types stage
This commit is contained in:
@ -4,25 +4,34 @@
|
||||
class IR_Decoder;
|
||||
namespace PacketTypes
|
||||
{
|
||||
/**
|
||||
* Minimum complete frame size (header, addresses/data required by the type,
|
||||
* and CRC). Unknown/reserved message types return 0.
|
||||
*/
|
||||
uint8_t minimumPacketSize(uint8_t msgType);
|
||||
|
||||
/** True only for a known typed packet whose complete frame is long enough. */
|
||||
bool isTypedPacketSizeValid(uint8_t msgType, uint8_t packSize);
|
||||
|
||||
class BasePack
|
||||
{
|
||||
friend IR_Decoder;
|
||||
|
||||
protected:
|
||||
bool isAvailable;
|
||||
bool isRawAvailable;
|
||||
bool isNeedAccept;
|
||||
bool isAvailable = false;
|
||||
bool isRawAvailable = false;
|
||||
bool isNeedAccept = false;
|
||||
|
||||
uint8_t msgOffset;
|
||||
uint8_t addressFromOffset;
|
||||
uint8_t addressToOffset;
|
||||
uint8_t DataOffset;
|
||||
uint8_t msgOffset = 0;
|
||||
uint8_t addressFromOffset = 0;
|
||||
uint8_t addressToOffset = 0;
|
||||
uint8_t DataOffset = 0;
|
||||
|
||||
IR_FOX::PackInfo *packInfo;
|
||||
uint16_t id;
|
||||
IR_FOX::PackInfo *packInfo = nullptr;
|
||||
uint16_t id = 0;
|
||||
|
||||
virtual bool checkAddress();
|
||||
void set(IR_FOX::PackInfo *packInfo, uint16_t id);
|
||||
bool set(IR_FOX::PackInfo *packInfo, uint16_t id, bool requireTypedSize = true);
|
||||
|
||||
static uint16_t _getAddrFrom(BasePack *obj);
|
||||
static uint16_t _getAddrTo(BasePack *obj);
|
||||
|
||||
Reference in New Issue
Block a user