mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-05-04 07:10:16 +00:00
rename checkAddressRuleApply
This commit is contained in:
parent
22f7cd68ca
commit
f92851c55d
@ -169,7 +169,7 @@ public:
|
||||
uint16_t rTime = 0;
|
||||
};
|
||||
|
||||
static void checkaddressRuleApply(uint16_t address, uint16_t id, bool& flag) {
|
||||
static void checkAddressRuleApply(uint16_t address, uint16_t id, bool& flag) {
|
||||
flag = false;
|
||||
flag |= id == 0;
|
||||
flag |= address == id;
|
||||
|
@ -89,7 +89,7 @@ namespace PacketTypes {
|
||||
private:
|
||||
bool checkAddress() override {
|
||||
bool ret;
|
||||
IR_FOX::checkaddressRuleApply(getAddrTo(), this->id, ret);
|
||||
IR_FOX::checkAddressRuleApply(getAddrTo(), this->id, ret);
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
@ -114,7 +114,7 @@ namespace PacketTypes {
|
||||
bool ret;
|
||||
if (getMsgType() == IR_MSG_BACK_TO) {
|
||||
DataOffset = 5;
|
||||
IR_FOX::checkaddressRuleApply((packInfo->buffer[addressToOffset] << 8) | packInfo->buffer[addressToOffset + 1], this->id, ret);
|
||||
IR_FOX::checkAddressRuleApply((packInfo->buffer[addressToOffset] << 8) | packInfo->buffer[addressToOffset + 1], this->id, ret);
|
||||
} else {
|
||||
DataOffset = 3;
|
||||
ret = true;
|
||||
@ -152,7 +152,7 @@ namespace PacketTypes {
|
||||
private:
|
||||
bool checkAddress() override {
|
||||
bool ret;
|
||||
IR_FOX::checkaddressRuleApply(getAddrTo(), this->id, ret);
|
||||
IR_FOX::checkAddressRuleApply(getAddrTo(), this->id, ret);
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
@ -250,7 +250,7 @@ namespace PacketTypes {
|
||||
// protected:
|
||||
// bool checkAddress() override {
|
||||
// bool ret;
|
||||
// checkaddressRuleApply(getAddrTo(), this->id, ret);
|
||||
// checkAddressRuleApply(getAddrTo(), this->id, ret);
|
||||
// return ret;
|
||||
// }
|
||||
// };
|
||||
@ -271,7 +271,7 @@ namespace PacketTypes {
|
||||
// bool ret;
|
||||
// if (getMsgType() == IR_MSG_BACK_TO) {
|
||||
// DataOffset = 5;
|
||||
// checkaddressRuleApply((packInfo->buffer[addressToOffset] << 8) | packInfo->buffer[addressToOffset + 1], this->id, ret);
|
||||
// checkAddressRuleApply((packInfo->buffer[addressToOffset] << 8) | packInfo->buffer[addressToOffset + 1], this->id, ret);
|
||||
// } else {
|
||||
// DataOffset = 3;
|
||||
// ret = true;
|
||||
@ -294,7 +294,7 @@ namespace PacketTypes {
|
||||
// protected:
|
||||
// bool checkAddress() override {
|
||||
// bool ret;
|
||||
// checkaddressRuleApply(getAddrTo(), this->id, ret);
|
||||
// checkAddressRuleApply(getAddrTo(), this->id, ret);
|
||||
// return ret;
|
||||
// }
|
||||
// };
|
||||
|
Loading…
x
Reference in New Issue
Block a user