6 #ifndef IFM3D_DEVICE_O3R_H
7 #define IFM3D_DEVICE_O3R_H
9 #include <ifm3d/device/device.h>
13 static const int NET_WAIT_O3R_SET =
14 std::getenv(
"IFM3D_NET_WAIT_O3R_SET") ==
nullptr ?
16 std::stoi(std::getenv(
"IFM3D_NET_WAIT_O3R_SET"));
33 using Ptr = std::shared_ptr<O3R>;
34 O3R(
const std::string& ip = ifm3d::DEFAULT_IP,
35 const std::uint16_t xmlrpc_port = ifm3d::DEFAULT_XMLRPC_PORT);
39 O3R& operator=(
O3R&&) =
delete;
41 O3R& operator=(
O3R&) =
delete;
50 virtual void FactoryReset(
bool keepNetworkSettings);
69 const std::vector<std::string>& path = std::vector<std::string>());
79 json ResolveConfig(
const json::json_pointer& ptr);
88 void Set(
const json& j);
99 void Remove(
const std::string& jsonPointer);
110 void Reset(
const std::string& jsonPointer);
128 void SaveInit(
const std::vector<std::string>& pointers = {});
137 std::string GetInitStatus();
148 void Lock(
const std::string& password);
157 void Unlock(
const std::string& password);
165 std::vector<PortInfo> Ports();
174 PortInfo Port(
const std::string& port);
181 json GetDiagnostic();
189 json GetDiagnosticFilterSchema();
198 json GetDiagnosticFiltered(
json filter);
201 const boot_mode& mode = ifm3d::Device::boot_mode::PRODUCTIVE)
override;
206 void RebootToRecovery();
208 device_family WhoAmI()
override;
209 ifm3d::Device::swu_version SwUpdateVersion()
override;
215 json ToJSON()
override;
221 void FromJSON(
const json& j)
override;
223 void DownloadServiceReport();
227 std::unique_ptr<Impl> pImpl;
230 #endif // IFM3D_DEVICE_O3R_H