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>
18 extern IFM3D_EXPORT
const std::uint16_t SWUPDATER_RECOVERY_PORT;
24 using Ptr = std::shared_ptr<SWUpdater>;
47 const ifm3d::Device::Ptr& cam,
49 std::uint16_t swupdate_recovery_port = ifm3d::SWUPDATER_RECOVERY_PORT,
50 std::optional<ifm3d::Device::SWUVersion> force_swu_version =
71 const std::optional<std::string>& password = std::nullopt);
141 class IFM3D_EXPORT Impl;
144 std::unique_ptr<Impl> _impl;
Definition: swupdater.h:22
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.
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.
void RebootToRecovery(const std::optional< std::string > &password=std::nullopt)
Reboots the device from productive to recovery.
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:35