Table of Contents

Class IpUpgrader

Namespace
Huddly.Sdk.Upgraders.Ip
Assembly
Huddly.Sdk.dll
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

int

Properties

DesiredVersion

public FirmwareVersion DesiredVersion { get; }

Property Value

FirmwareVersion

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

cpioFilePath string
deviceAddress IPAddress
loggerFactory ILoggerFactory

Returns

IFirmwareUpgrader

Execute(CancellationToken)

Executes a firmware upgrade. To track upgrade progress, see ProgressUpdated

public Task<Result> Execute(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<Result>

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

address IPAddress
grpcPort int
requestTimeout_ms int
cpioWriteTimeout_ms int
upgradeTimeout_ms int
ownerCt CancellationToken

Returns

Task<Result>

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

client ICameraGrpcClient
expectedVersion FirmwareVersion
requestTimeout int
ct CancellationToken

Returns

Task<bool>

Events

ProgressUpdated

Event that triggers on upgrade progress

public event EventHandler<UpgradeProgressEventArgs>? ProgressUpdated

Event Type

EventHandler<UpgradeProgressEventArgs>