mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Ethernet (DoIP) Activation Line support
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "icsneo/device/device.h"
|
||||
#include "icsneo/device/devicetype.h"
|
||||
#include "icsneo/platform/ftdi.h"
|
||||
#include "icsneo/device/tree/neovifire2/neovifire2settings.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
@@ -46,6 +47,10 @@ public:
|
||||
return supportedNetworks;
|
||||
}
|
||||
|
||||
size_t getEthernetActivationLineCount() const override { return 1; }
|
||||
size_t getUSBHostPowerCount() const override { return 1; }
|
||||
bool getBackupPowerSupported() const override { return true; }
|
||||
|
||||
protected:
|
||||
NeoVIFIRE2(neodevice_t neodevice) : Device(neodevice) {
|
||||
getWritableNeoDevice().type = DEVICE_TYPE;
|
||||
@@ -63,6 +68,16 @@ protected:
|
||||
|
||||
// The supported TX networks are the same as the supported RX networks for this device
|
||||
virtual void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
||||
|
||||
void handleDeviceStatus(const std::shared_ptr<Message>& message) override {
|
||||
if(!message || message->data.size() < sizeof(neovifire2_status_t))
|
||||
return;
|
||||
const neovifire2_status_t* status = reinterpret_cast<const neovifire2_status_t*>(message->data.data());
|
||||
backupPowerEnabled = status->backupPowerEnabled;
|
||||
backupPowerGood = status->backupPowerGood;
|
||||
ethActivationStatus = status->ethernetActivationLineEnabled;
|
||||
usbHostPowerStatus = status->usbHostPowerEnabled;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "icsneo/device/tree/neovifire2/neovifire2.h"
|
||||
#include "icsneo/platform/pcap.h"
|
||||
#include "icsneo/device/tree/neovifire2/neovifire2settings.h"
|
||||
#include <memory>
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
@@ -106,6 +106,14 @@ typedef struct {
|
||||
TIMESYNC_ICSHARDWARE_SETTINGS timeSync;
|
||||
DISK_SETTINGS disk;
|
||||
} neovifire2_settings_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t backupPowerGood;
|
||||
uint8_t backupPowerEnabled;
|
||||
uint8_t usbHostPowerEnabled;
|
||||
uint8_t ethernetActivationLineEnabled;
|
||||
EthernetNetworkStatus ethernetStatus;
|
||||
} neovifire2_status_t;
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "icsneo/device/tree/neovifire2/neovifire2.h"
|
||||
#include "icsneo/platform/ftdi.h"
|
||||
#include "icsneo/device/tree/neovifire2/neovifire2settings.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user