diff --git a/communication/decoder.cpp b/communication/decoder.cpp index d8c0a96..3e97035 100644 --- a/communication/decoder.cpp +++ b/communication/decoder.cpp @@ -273,7 +273,7 @@ bool Decoder::decode(std::shared_ptr& result, const std::shared_ptrtimestamp *= timestampResolution; + result->timestamp = can->timestamp * timestampResolution; return true; } case Network::NetID::DeviceStatus: { diff --git a/examples/python/ethernet/ethernet_monitor_status.py b/examples/python/ethernet/ethernet_monitor_status.py index 13bc88f..7c35403 100644 --- a/examples/python/ethernet/ethernet_monitor_status.py +++ b/examples/python/ethernet/ethernet_monitor_status.py @@ -17,7 +17,7 @@ def main(): print(f"info: monitoring Ethernet status on {device}") def on_message(message): - print(f"info: network: {message.network}, state: {message.state}, speed: {message.speed}, duplex: {message.duplex}, mode: {message.mode}") + print(f"info: timestamp: {message.timestamp}, network: {message.network}, state: {message.state}, speed: {message.speed}, duplex: {message.duplex}, mode: {message.mode}") filter = icsneopy.MessageFilter(icsneopy.Message.Type.EthernetStatus) callback = icsneopy.MessageCallback(on_message, filter)