|
|
@ -31,9 +31,23 @@ class ICmdParserACK { |
|
|
|
} |
|
|
|
return (int32_t *)rawdata + index; |
|
|
|
} |
|
|
|
|
|
|
|
int32_t getAckInt32Val(int index) { |
|
|
|
if (index < 0 || index >= rawlen / sizeof(int32_t)) { |
|
|
|
return 0; |
|
|
|
} |
|
|
|
return *((int32_t *)rawdata + index); |
|
|
|
} |
|
|
|
|
|
|
|
int32_t getAckInt32Num() { |
|
|
|
if (rawlen != sizeof(int32_t)) { |
|
|
|
return 0; |
|
|
|
} |
|
|
|
return *((int32_t *)rawdata); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
typedef function<void(int32_t paramN, const char *paraV[], ICmdParserACK *ack)> ICmdFunction_t; |
|
|
|
typedef function<void(int32_t paramN, const char **paraV, ICmdParserACK *ack)> ICmdFunction_t; |
|
|
|
|
|
|
|
class ICmdParser { |
|
|
|
public: |
|
|
|