mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Communication: Add EthernetStatusMessage
This commit is contained in:
+9
-9
@@ -1729,15 +1729,6 @@ void Device::handleInternalMessage(std::shared_ptr<Message> message) {
|
||||
case Message::Type::RawMessage: {
|
||||
auto rawMessage = std::static_pointer_cast<RawMessage>(message);
|
||||
switch(rawMessage->network.getNetID()) {
|
||||
case Network::NetID::Device: {
|
||||
// Device is not guaranteed to be a CANMessage, it might be a RawMessage
|
||||
// if it couldn't be decoded to a CANMessage. We only care about the
|
||||
// CANMessage decoding right now.
|
||||
auto canmsg = std::dynamic_pointer_cast<CANMessage>(message);
|
||||
if(canmsg)
|
||||
handleNeoVIMessage(std::move(canmsg));
|
||||
break;
|
||||
}
|
||||
case Network::NetID::DeviceStatus:
|
||||
// Device Status format is unique per device, so the devices need to decode it themselves
|
||||
handleDeviceStatus(rawMessage);
|
||||
@@ -1747,6 +1738,15 @@ void Device::handleInternalMessage(std::shared_ptr<Message> message) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Message::Type::Frame: {
|
||||
// Device is not guaranteed to be a CANMessage, it might be a RawMessage
|
||||
// if it couldn't be decoded to a CANMessage. We only care about the
|
||||
// CANMessage decoding right now.
|
||||
auto canmsg = std::dynamic_pointer_cast<CANMessage>(message);
|
||||
if(canmsg)
|
||||
handleNeoVIMessage(std::move(canmsg));
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
forEachExtension([&](const std::shared_ptr<DeviceExtension>& ext) {
|
||||
|
||||
Reference in New Issue
Block a user