Skip to content

DeviceMessages

Static class in Oadm.Sdk.Devices · Oadm.Sdk.dll

The shared user texts for device problems, so the host and every plugin say the same thing: HTTP errors, timeouts, unreachable devices, a changed certificate and a removed device. Short texts, no trailing period except DeviceMessages.Removed and DeviceMessages.CertificateChanged (full sentences).

public static class DeviceMessages

Guide: Devices and VAPIX

static string? ForHttpStatus(int status)

The text of an HTTP error status (400, 401, 403, 404, 5xx), or null for other codes.

static string? Refusal(DeviceStatus status, bool refuseUnreachable = false)

Why a device is not contacted, or null when it may be: a changed certificate, rejected credentials or no password yet (nothing is sent to such a device), and with refuseUnreachable a device the polling marked Unreachable (a read that only waits for its timeout).

static string ServerError(int status)

“Server error - HTTP 500”.

static string StatusText(DeviceStatus status)

The short status name of the device grid: “OK”, “Unreachable”, “Credentials required” …

static string Timeout(TimeSpan timeout)

“Timeout after 15 s”.

static string Unreachable(string detail)

“Unreachable - Connection refused” (a trailing period of the detail is removed).

const string BadRequest = "Bad Request - HTTP 400"

HTTP 400.

const string CertificateChanged = "Certificate changed. Remove the device and add it again to trust the new certificate."

The device presents another certificate than the one OADM pinned. OADM has no accept action: removing the device and adding it again pins the new certificate.

const string CredentialsRequired = "Credentials required - the device rejects the stored credentials"

The device rejects the stored login (status Credentials required).

const string Forbidden = "Forbidden - HTTP 403 (administrator rights are required)"

HTTP 403.

const string HostUnreachable = "Unreachable - no route to the device"

No route to the device (host or network unreachable).

const string NotAnswering = "Unreachable - the device does not answer"

“Unreachable - the device does not answer”: a device the polling marked Unreachable, not contacted.

const string NotFound = "Not Found - HTTP 404 (API not available on this firmware)"

HTTP 404.

const string PasswordNotSet = "Password not set - the device is in factory default"

The device has no password yet (status Password not set).

const string Removed = "The device was removed from OADM."

A device that is no longer in the device table.

const string TimedOut = "Timeout - the device did not answer in time"

A timeout whose length is not known to the caller.

const string Unauthorized = "Unauthorized - HTTP 401 (check the credentials)"

The device refused the login of a request (HTTP 401).