Add getters for number of corrupt and total packets received over serial
This commit is contained in:
parent
d379c46012
commit
8a3209d6a1
2 changed files with 35 additions and 26 deletions
|
@ -100,6 +100,8 @@ namespace create {
|
|||
inline bool connected() const { return port.is_open(); };
|
||||
bool send(const uint8_t* bytes, const uint32_t numBytes);
|
||||
bool sendOpcode(const Opcode& code);
|
||||
uint64_t getNumCorruptPackets();
|
||||
uint64_t getNumTotalPackets();
|
||||
};
|
||||
} // namespace create
|
||||
|
||||
|
|
|
@ -252,4 +252,11 @@ namespace create {
|
|||
return send(&oc, 1);
|
||||
}
|
||||
|
||||
uint64_t Serial::getNumCorruptPackets() {
|
||||
return corruptPackets;
|
||||
}
|
||||
|
||||
uint64_t Serial::getNumTotalPackets() {
|
||||
return totalPackets;
|
||||
}
|
||||
} // namespace create
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue