counting per-channel traffic
This commit is contained in:
parent
3e14876e9e
commit
8ef2af44f3
|
@ -120,6 +120,10 @@ static void printTsStats(void) {
|
|||
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
#if EFI_USB_SERIAL
|
||||
printUsbConnectorStats();
|
||||
#endif // EFI_USB_SERIAL
|
||||
|
||||
printErrorCounters();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,5 +9,8 @@
|
|||
#pragma once
|
||||
|
||||
void initializeConsole();
|
||||
|
||||
void startUsbConsole();
|
||||
void printUsbConnectorStats();
|
||||
|
||||
void startEthernetConsole();
|
||||
|
|
|
@ -24,11 +24,14 @@ public:
|
|||
}
|
||||
|
||||
void write(const uint8_t* buffer, size_t size, bool /*isEndOfPacket*/) override {
|
||||
chnWriteTimeout(m_channel, buffer, size, BINARY_IO_TIMEOUT);
|
||||
size_t transferred = chnWriteTimeout(m_channel, buffer, size, BINARY_IO_TIMEOUT);
|
||||
bytesOut += transferred;
|
||||
}
|
||||
|
||||
size_t readTimeout(uint8_t* buffer, size_t size, int timeout) override {
|
||||
return chnReadTimeout(m_channel, buffer, size, timeout);
|
||||
size_t transferred = chnReadTimeout(m_channel, buffer, size, timeout);
|
||||
bytesIn += transferred;
|
||||
return transferred;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -54,4 +57,7 @@ void startUsbConsole() {
|
|||
usbConsole.start();
|
||||
}
|
||||
|
||||
void printUsbConnectorStats() {
|
||||
}
|
||||
|
||||
#endif // EFI_USB_SERIAL
|
||||
|
|
Loading…
Reference in New Issue