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
@@ -14,6 +14,8 @@ public:
static constexpr DeviceType::Enum DEVICE_TYPE = DeviceType::RADGigalog;
static constexpr const char* SERIAL_START = "GL";
size_t getEthernetActivationLineCount() const override { return 1; }
protected:
RADGigalog(neodevice_t neodevice) : Device(neodevice) {
getWritableNeoDevice().type = DEVICE_TYPE;
@@ -74,6 +76,13 @@ protected:
};
txNetworks.insert(txNetworks.end(), supportedTxNetworks.begin(), supportedTxNetworks.end());
}
void handleDeviceStatus(const std::shared_ptr<Message>& message) override {
if(!message || message->data.size() < sizeof(radgigalog_status_t))
return;
const radgigalog_status_t* status = reinterpret_cast<const radgigalog_status_t*>(message->data.data());
ethActivationStatus = status->ethernetActivationLineEnabled;
}
};
}
@@ -86,6 +86,11 @@ typedef struct {
uint16_t network_enables_4;
RAD_REPORTING_SETTINGS reporting;
} radgigalog_settings_t;
typedef struct {
uint8_t unused[3];
uint8_t ethernetActivationLineEnabled;
} radgigalog_status_t;
#pragma pack(pop)
#ifdef __cplusplus