Class IpUpgrader
public class IpUpgrader : IFirmwareUpgrader
- Inheritance
-
IpUpgrader
- Implements
- Inherited Members
Fields
NULL_VERSION
[Obsolete("Use null value instead. Method will be removed in SDK version 3.")]
public static readonly DeviceVersion NULL_VERSION
Field Value
- DeviceVersion
UpgradeTimeoutSeconds
public const int UpgradeTimeoutSeconds = 180
Field Value
Properties
DesiredVersion
public FirmwareVersion DesiredVersion { get; }
Property Value
FirmwareVersion
[Obsolete("Use DesiredVersion instead. Method will be removed in SDK version 3.")]
public SemVersion FirmwareVersion { get; }
Property Value
- SemVersion
Methods
Create(string, IPAddress, ILoggerFactory?)
public static IFirmwareUpgrader Create(string cpioFilePath, IPAddress deviceAddress, ILoggerFactory? loggerFactory = null)
Parameters
cpioFilePathstringdeviceAddressIPAddressloggerFactoryILoggerFactory
Returns
Execute(CancellationToken)
Executes a firmware upgrade. To track upgrade progress, see ProgressUpdated
public Task<Result> Execute(CancellationToken ct = default)
Parameters
Returns
Remarks
When a firmware upgrade is run, the device will typically become non-responsive for other methods. It is recommended to cease all other communication with the device before executing an upgrade.
In the course of an upgrade, a device will disconnect and reconnect again. As such, the original IDevice instance that was used to create the IFirmwareUpgrader will disconnect. To continue communicating with the device when it has reconnected, consumers should use the new IDevice instance emitted in the DeviceConnected event
ExecuteAsync(IPAddress, int, int, int, int, CancellationToken)
Start firmware update of camera with specified address using specified CPIO file
public Task<Result> ExecuteAsync(IPAddress address, int grpcPort, int requestTimeout_ms, int cpioWriteTimeout_ms, int upgradeTimeout_ms, CancellationToken ownerCt)
Parameters
addressIPAddressgrpcPortintrequestTimeout_msintcpioWriteTimeout_msintupgradeTimeout_msintownerCtCancellationToken
Returns
Exceptions
- FileNotFoundException
when CPIO file is not found
- IOException
on input stream IO errors
IsFlashCompleted(ICameraGrpcClient, FirmwareVersion, int, CancellationToken)
public static Task<bool> IsFlashCompleted(ICameraGrpcClient client, FirmwareVersion expectedVersion, int requestTimeout, CancellationToken ct)
Parameters
clientICameraGrpcClientexpectedVersionFirmwareVersionrequestTimeoutintctCancellationToken
Returns
Events
ProgressUpdated
Event that triggers on upgrade progress
public event EventHandler<UpgradeProgressEventArgs>? ProgressUpdated