6 #ifndef IFM3D_SWUPDATER_SWUPDATER_H
7 #define IFM3D_SWUPDATER_SWUPDATER_H
10 #include <ifm3d/device/legacy_device.h>
11 #include <ifm3d/swupdater/module_swupdater.h>
17 extern IFM3D_EXPORT
const std::uint16_t SWUPDATER_RECOVERY_PORT;
23 using Ptr = std::shared_ptr<SWUpdater>;
46 const ifm3d::Device::Ptr& cam,
48 std::uint16_t swupdate_recovery_port = ifm3d::SWUPDATER_RECOVERY_PORT,
49 std::optional<ifm3d::Device::SWUVersion> force_swu_version =
137 class IFM3D_EXPORT Impl;
140 std::unique_ptr<Impl> _impl;
Definition: swupdater.h:21
bool WaitForRecovery(long timeout_millis=0)
Polls on status of the device, waiting for it to present in recovery mode.
bool WaitForProductive(long timeout_millis=0)
Polls on status of the device, waiting for it to present in productive mode.
void RebootToRecovery()
Reboots the device from productive to recovery.
bool FlashFirmware(const std::string &swu_file, long timeout_millis=0)
Uploads a firmware image to the device's recovery system.
void RebootToProductive()
Reboots the device from recovery to productive.
SWUpdater(const ifm3d::Device::Ptr &cam, const ifm3d::SWUpdater::FlashStatusCb &cb={}, std::uint16_t swupdate_recovery_port=ifm3d::SWUPDATER_RECOVERY_PORT, std::optional< ifm3d::Device::SWUVersion > force_swu_version=std::nullopt)
Ctor.
std::function< void(float, const std::string &)> FlashStatusCb
Signature for user callback to receive status information about firmware flashing.
Definition: swupdater.h:34