Ethernet (DoIP) Activation Line support

This commit is contained in:
Paul Hollinsky
2021-04-06 22:50:25 -04:00
parent 4e245db94e
commit a6c8acd8e9
28 changed files with 613 additions and 15 deletions
@@ -91,6 +91,8 @@ public:
productId = PRODUCT_ID;
}
size_t getEthernetActivationLineCount() const override { return 1; }
protected:
void setupPacketizer(Packetizer& packetizer) override {
Device::setupPacketizer(packetizer);
@@ -115,6 +117,13 @@ protected:
// The supported TX networks are the same as the supported RX networks for this device
void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
void handleDeviceStatus(const std::shared_ptr<Message>& message) override {
if(!message || message->data.size() < sizeof(radgalaxy_status_t))
return;
const radgalaxy_status_t* status = reinterpret_cast<const radgalaxy_status_t*>(message->data.data());
ethActivationStatus = status->ethernetActivationLineEnabled;
}
};
}
@@ -87,6 +87,11 @@ typedef struct {
DISK_SETTINGS disk;
LOGGER_SETTINGS logger;
} radgalaxy_settings_t;
typedef struct {
uint8_t unused[3];
uint8_t ethernetActivationLineEnabled;
} radgalaxy_status_t;
#pragma pack(pop)
#ifdef __cplusplus