You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
827 B
C++

// GarageCommand.h
#ifndef _GARAGECOMMAND_h
#define _GARAGECOMMAND_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
#include "CommandEncoder.h"
class GarageCommand : private CommandEncoder
{
public:
const byte ReturnMainCommand = 0x03;
public:
GarageCommand();
public:
void UsingA();
void UsingB();
public:
byte* CMD_PositionReset();
byte* CMD_SetToFloor2();
byte* CMD_SetToFloor3();
byte* CMD_SetToFloor4();
byte* CMD_SetToFloor(uint8_t floor);
byte* CMD_QueryCurrentPos();
byte* CMD_QueryIRStatus();
public:
//需要使用CommandDecoder进行指令合法性校验
bool IsGarageCommand(byte* data);
bool IsPositionData(byte* data);
bool IsIRData(byte* data);
byte CurrentPos(byte* data);
bool FrontIRTiggered(byte* data);
bool BackIRTiggered(byte* data);
};
#endif