Compare commits
No commits in common. "a68b64c641f40d769eab5d4ddc3a2b52189f62b9" and "d682627b402bd945b54279c9ef9018e4dbf5cc56" have entirely different histories.
a68b64c641
...
d682627b40
|
|
@ -560,7 +560,7 @@ bool Device::goOnline() {
|
|||
return false;
|
||||
}
|
||||
|
||||
if(supportsNetworkMutex) {
|
||||
if(supportsNetworkMutex()) {
|
||||
assignedClientId = com->getClientIDSync();
|
||||
if(assignedClientId) {
|
||||
std::set<Network::NetID> nets;
|
||||
|
|
@ -3927,7 +3927,7 @@ std::shared_ptr<DiskDetails> Device::getDiskDetails(std::chrono::milliseconds ti
|
|||
|
||||
[[nodiscard]] std::optional<int> Device::lockNetworks(const std::set<Network::NetID>& networks, uint32_t priority, uint32_t ttlMs, NetworkMutexType type, std::function<void(std::shared_ptr<Message>)>&& on_event)
|
||||
{
|
||||
if(!supportsNetworkMutex) {
|
||||
if(!supportsNetworkMutex()) {
|
||||
report(APIEvent::Type::NotSupported, APIEvent::Severity::Error);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
|
@ -3977,7 +3977,7 @@ std::shared_ptr<DiskDetails> Device::getDiskDetails(std::chrono::milliseconds ti
|
|||
|
||||
bool Device::unlockNetworks(const std::set<Network::NetID>& networks)
|
||||
{
|
||||
if(!supportsNetworkMutex) {
|
||||
if(!supportsNetworkMutex()) {
|
||||
report(APIEvent::Type::NotSupported, APIEvent::Severity::Error);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -4017,7 +4017,7 @@ bool Device::unlockNetworks(const std::set<Network::NetID>& networks)
|
|||
|
||||
std::shared_ptr<NetworkMutexMessage> Device::getNetworkMutexStatus(Network::NetID network)
|
||||
{
|
||||
if(!supportsNetworkMutex) {
|
||||
if(!supportsNetworkMutex()) {
|
||||
report(APIEvent::Type::NotSupported, APIEvent::Severity::Error);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -4039,7 +4039,7 @@ std::shared_ptr<NetworkMutexMessage> Device::getNetworkMutexStatus(Network::NetI
|
|||
|
||||
[[nodiscard]] std::optional<int> Device::lockAllNetworks(uint32_t priority, uint32_t ttlMs, NetworkMutexType type, std::function<void(std::shared_ptr<Message>)>&& on_event)
|
||||
{
|
||||
if(!supportsNetworkMutex) {
|
||||
if(!supportsNetworkMutex()) {
|
||||
report(APIEvent::Type::NotSupported, APIEvent::Severity::Error);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
|
@ -4086,7 +4086,7 @@ std::shared_ptr<NetworkMutexMessage> Device::getNetworkMutexStatus(Network::NetI
|
|||
|
||||
bool Device::unlockAllNetworks()
|
||||
{
|
||||
if(!supportsNetworkMutex) {
|
||||
if(!supportsNetworkMutex()) {
|
||||
report(APIEvent::Type::NotSupported, APIEvent::Severity::Error);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,18 +14,3 @@ communication library. The source code for libicsneo can be found on GitHub:
|
|||
icsneopy/index
|
||||
icsneoc/index
|
||||
icsneoc2/index
|
||||
|
||||
Linux Installation
|
||||
==================
|
||||
|
||||
Applications that use raw Ethernet device discovery, such as PCAP-backed
|
||||
discovery, need permission to open raw network sockets. Instead of running your
|
||||
application with ``sudo``, grant the installed executable the required Linux
|
||||
capabilities:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/your-app
|
||||
|
||||
Replace ``/usr/bin/your-app`` with the full path to the application executable.
|
||||
|
||||
|
|
|
|||
|
|
@ -879,6 +879,8 @@ public:
|
|||
bool unlockAllNetworks();
|
||||
std::shared_ptr<NetworkMutexMessage> getNetworkMutexStatus(Network::NetID network);
|
||||
|
||||
virtual bool supportsNetworkMutex() const { return false; }
|
||||
|
||||
protected:
|
||||
bool online = false;
|
||||
int messagePollingCallbackID = 0;
|
||||
|
|
@ -996,8 +998,6 @@ protected:
|
|||
|
||||
std::optional<HardwareInfo::Version> bootloaderVersion = std::nullopt;
|
||||
|
||||
bool supportsNetworkMutex = false;
|
||||
|
||||
private:
|
||||
neodevice_t data;
|
||||
std::shared_ptr<ResetStatusMessage> latestResetStatus;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ public:
|
|||
}
|
||||
protected:
|
||||
NeoVIFIRE3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
supportsNetworkMutex = true;
|
||||
initialize<NeoVIFIRE3Settings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
|
||||
}
|
||||
|
||||
|
|
@ -124,6 +123,8 @@ protected:
|
|||
size_t getDiskCount() const override {
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool supportsNetworkMutex() const override { return true; }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ public:
|
|||
}
|
||||
protected:
|
||||
NeoVIFIRE3FlexRay(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
supportsNetworkMutex = true;
|
||||
initialize<NeoVIFIRE3FlexRaySettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
|
||||
}
|
||||
|
||||
|
|
@ -151,6 +150,8 @@ protected:
|
|||
size_t getDiskCount() const override {
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool supportsNetworkMutex() const override { return true; }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ public:
|
|||
}
|
||||
protected:
|
||||
NeoVIFIRE3T1SLIN(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
supportsNetworkMutex = true;
|
||||
initialize<NeoVIFIRE3T1SLINSettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
|
||||
}
|
||||
|
||||
|
|
@ -133,6 +132,10 @@ protected:
|
|||
return 2;
|
||||
}
|
||||
|
||||
bool supportsNetworkMutex() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ public:
|
|||
}
|
||||
protected:
|
||||
NeoVIRED2(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
supportsNetworkMutex = true;
|
||||
initialize<NeoVIRED2Settings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
|
||||
}
|
||||
|
||||
|
|
@ -105,6 +104,8 @@ protected:
|
|||
size_t getDiskCount() const override {
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool supportsNetworkMutex() const override { return true; }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue