Communication: Add GPTPStatus

This commit is contained in:
Yasser Yassine
2024-12-20 23:22:25 +00:00
committed by Kyle Schwarz
parent c4ce803d62
commit dc0f16b1d2
26 changed files with 488 additions and 16 deletions
+4
View File
@@ -50,6 +50,7 @@
#include "icsneo/disk/vsa/vsa.h"
#include "icsneo/disk/vsa/vsaparser.h"
#include "icsneo/communication/message/versionmessage.h"
#include "icsneo/communication/message/gptpstatusmessage.h"
#define ICSNEO_FINDABLE_DEVICE_BASE(className, type) \
@@ -727,12 +728,15 @@ public:
virtual bool supportsComponentVersions() const { return false; }
virtual bool supportsTC10() const { return false; }
virtual bool supportsGPTP() const { return false; }
bool requestTC10Wake(Network::NetID network);
bool requestTC10Sleep(Network::NetID network);
std::optional<TC10StatusMessage> getTC10Status(Network::NetID network);
std::optional<GPTPStatus> getGPTPStatus(std::chrono::milliseconds timeout = std::chrono::milliseconds(100));
protected:
bool online = false;
+9 -8
View File
@@ -444,20 +444,21 @@ typedef struct LOGGER_SETTINGS_t
#define RAD_GPTP_NUM_PORTS 1 // 1 because only supported as gPTP endpoint
typedef struct RAD_GPTP_SETTINGS_t
{
uint32_t neighborPropDelayThresh;//ns
uint32_t sys_phc_sync_interval;//ns
int8_t logPDelayReqInterval;// log2ms
int8_t logSyncInterval;// log2ms
int8_t logAnnounceInterval;// log2ms
uint32_t neighborPropDelayThresh; //ns
uint32_t sys_phc_sync_interval; //ns
int8_t logPDelayReqInterval; // log2ms
int8_t logSyncInterval; // log2ms
int8_t logAnnounceInterval; // log2ms
uint8_t profile;
uint8_t priority1;
uint8_t clockclass;
uint8_t clockaccuracy;
uint8_t priority2;
uint16_t offset_scaled_log_variance;
uint8_t gPTPportRole[RAD_GPTP_NUM_PORTS];
uint8_t portEnable[RAD_GPTP_NUM_PORTS];
uint8_t rsvd[16];
uint8_t gptpPortRole;
uint8_t gptpEnabledPort;
uint8_t enableClockSyntonization;
uint8_t rsvd[15];
} RAD_GPTP_SETTINGS;//36 Bytes with RAD_GPTP_NUM_PORTS = 1
#define RAD_GPTP_SETTINGS_SIZE 36
@@ -79,6 +79,8 @@ protected:
bool supportsLiveData() const override { return true; }
bool supportsGPTP() const override { return true; }
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
return 33*1024*1024;
}
@@ -90,6 +92,7 @@ protected:
bool supportsEraseMemory() const override {
return true;
}
};
}
@@ -36,6 +36,7 @@ public:
}
bool supportsComponentVersions() const override { return true; }
bool supportsGPTP() const override { return true; }
protected:
NeoVIRED2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
@@ -40,6 +40,7 @@ public:
}
size_t getEthernetActivationLineCount() const override { return 1; }
bool supportsGPTP() const override { return true; }
protected:
RADA2B(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
@@ -77,6 +78,7 @@ protected:
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
return 0;
}
};
}
@@ -31,6 +31,7 @@ public:
}
bool getEthPhyRegControlSupported() const override { return true; }
bool supportsGPTP() const override { return true; }
protected:
using Device::Device;
@@ -45,6 +45,7 @@ public:
bool getEthPhyRegControlSupported() const override { return true; }
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
protected:
RADComet3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
@@ -61,6 +61,7 @@ public:
}
size_t getEthernetActivationLineCount() const override { return 1; }
bool supportsGPTP() const override { return true; }
protected:
RADGalaxy(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
@@ -65,6 +65,7 @@ public:
size_t getEthernetActivationLineCount() const override { return 1; }
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
protected:
RADGalaxy2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
@@ -22,7 +22,8 @@ public:
bool getEthPhyRegControlSupported() const override { return true; }
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
protected:
RADGigastar(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<RADGigastarSettings>(makeDriver);
@@ -76,7 +76,8 @@ namespace icsneo
bool getEthPhyRegControlSupported() const override { return true; }
bool supportsTC10() const override { return true; }
bool supportsGPTP() const override { return true; }
protected:
RADGigastar2(neodevice_t neodevice, const driver_factory_t &makeDriver) : Device(neodevice)
{
@@ -19,6 +19,7 @@ public:
ICSNEO_FINDABLE_DEVICE(RADMars, DeviceType::RADMars, "GL");
size_t getEthernetActivationLineCount() const override { return 1; }
bool supportsGPTP() const override { return true; }
protected:
RADMars(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {