mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
FIRE3: Add reboot support
This commit is contained in:
committed by
Kyle Schwarz
parent
54fb89b675
commit
8af6d5f2a8
@@ -3735,6 +3735,15 @@ bool Device::requestTC10Sleep(Network::NetID network) {
|
||||
return typed->response == ExtendedResponse::OK;
|
||||
}
|
||||
|
||||
bool Device::reboot(bool safe) {
|
||||
if(!supportsReboot()) {
|
||||
report(APIEvent::Type::NotSupported, APIEvent::Severity::Error);
|
||||
return false;
|
||||
}
|
||||
// The device reboots in response to this command, so no reply is expected.
|
||||
return com->sendCommand(ExtendedCommand::Reboot, { uint8_t(safe ? 1 : 0) });
|
||||
}
|
||||
|
||||
std::optional<TC10StatusMessage> Device::getTC10Status(Network::NetID network) {
|
||||
if(!supportsTC10()) {
|
||||
report(APIEvent::Type::NotSupported, APIEvent::Severity::Error);
|
||||
|
||||
Reference in New Issue
Block a user