MSVC: Variable shadowing
parent
21bc4eeff2
commit
ad07af160c
|
|
@ -105,11 +105,10 @@ protected:
|
||||||
virtual void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
virtual void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
||||||
|
|
||||||
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
||||||
const auto& data = message->data;
|
if(message->data.size() < sizeof(neovifire2_status_t))
|
||||||
if(data.size() < sizeof(neovifire2_status_t))
|
|
||||||
return;
|
return;
|
||||||
std::lock_guard<std::mutex> lk(ioMutex);
|
std::lock_guard<std::mutex> lk(ioMutex);
|
||||||
const neovifire2_status_t* status = reinterpret_cast<const neovifire2_status_t*>(data.data());
|
const neovifire2_status_t* status = reinterpret_cast<const neovifire2_status_t*>(message->data.data());
|
||||||
backupPowerEnabled = status->backupPowerEnabled;
|
backupPowerEnabled = status->backupPowerEnabled;
|
||||||
backupPowerGood = status->backupPowerGood;
|
backupPowerGood = status->backupPowerGood;
|
||||||
ethActivationStatus = status->ethernetActivationLineEnabled;
|
ethActivationStatus = status->ethernetActivationLineEnabled;
|
||||||
|
|
|
||||||
|
|
@ -81,11 +81,10 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
||||||
const auto& data = message->data;
|
if(message->data.size() < sizeof(fire2vnet_status_t))
|
||||||
if(data.size() < sizeof(fire2vnet_status_t))
|
|
||||||
return;
|
return;
|
||||||
std::lock_guard<std::mutex> lk(ioMutex);
|
std::lock_guard<std::mutex> lk(ioMutex);
|
||||||
const fire2vnet_status_t* status = reinterpret_cast<const fire2vnet_status_t*>(data.data());
|
const fire2vnet_status_t* status = reinterpret_cast<const fire2vnet_status_t*>(message->data.data());
|
||||||
ethActivationStatus = status->ethernetActivationLineEnabled;
|
ethActivationStatus = status->ethernetActivationLineEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,11 +119,10 @@ protected:
|
||||||
void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
||||||
|
|
||||||
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
||||||
const auto& data = message->data;
|
if(message->data.size() < sizeof(radgalaxy_status_t))
|
||||||
if(data.size() < sizeof(radgalaxy_status_t))
|
|
||||||
return;
|
return;
|
||||||
std::lock_guard<std::mutex> lk(ioMutex);
|
std::lock_guard<std::mutex> lk(ioMutex);
|
||||||
const radgalaxy_status_t* status = reinterpret_cast<const radgalaxy_status_t*>(data.data());
|
const radgalaxy_status_t* status = reinterpret_cast<const radgalaxy_status_t*>(message->data.data());
|
||||||
ethActivationStatus = status->ethernetActivationLineEnabled;
|
ethActivationStatus = status->ethernetActivationLineEnabled;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -78,11 +78,10 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
||||||
const auto& data = message->data;
|
if(message->data.size() < sizeof(radgigalog_status_t))
|
||||||
if(data.size() < sizeof(radgigalog_status_t))
|
|
||||||
return;
|
return;
|
||||||
std::lock_guard<std::mutex> lk(ioMutex);
|
std::lock_guard<std::mutex> lk(ioMutex);
|
||||||
const radgigalog_status_t* status = reinterpret_cast<const radgigalog_status_t*>(data.data());
|
const radgigalog_status_t* status = reinterpret_cast<const radgigalog_status_t*>(message->data.data());
|
||||||
ethActivationStatus = status->ethernetActivationLineEnabled;
|
ethActivationStatus = status->ethernetActivationLineEnabled;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,10 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
||||||
const auto& data = message->data;
|
if(message->data.size() < sizeof(radgigastar_status_t))
|
||||||
if(data.size() < sizeof(radgigastar_status_t))
|
|
||||||
return;
|
return;
|
||||||
std::lock_guard<std::mutex> lk(ioMutex);
|
std::lock_guard<std::mutex> lk(ioMutex);
|
||||||
const radgigastar_status_t* status = reinterpret_cast<const radgigastar_status_t*>(data.data());
|
const radgigastar_status_t* status = reinterpret_cast<const radgigastar_status_t*>(message->data.data());
|
||||||
ethActivationStatus = status->ethernetActivationLineEnabled;
|
ethActivationStatus = status->ethernetActivationLineEnabled;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -74,11 +74,10 @@ protected:
|
||||||
size_t getEthernetActivationLineCount() const override { return 1; }
|
size_t getEthernetActivationLineCount() const override { return 1; }
|
||||||
|
|
||||||
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
void handleDeviceStatus(const std::shared_ptr<RawMessage>& message) override {
|
||||||
const auto& data = message->data;
|
if(message->data.size() < sizeof(valuecan4_2el_status_t))
|
||||||
if(data.size() < sizeof(valuecan4_2el_status_t))
|
|
||||||
return;
|
return;
|
||||||
std::lock_guard<std::mutex> lk(ioMutex);
|
std::lock_guard<std::mutex> lk(ioMutex);
|
||||||
const valuecan4_2el_status_t* status = reinterpret_cast<const valuecan4_2el_status_t*>(data.data());
|
const valuecan4_2el_status_t* status = reinterpret_cast<const valuecan4_2el_status_t*>(message->data.data());
|
||||||
ethActivationStatus = status->ethernetActivationLineEnabled;
|
ethActivationStatus = status->ethernetActivationLineEnabled;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue