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 NoLongerAvailable(int count)

The refusal of a request that names devices the user cannot reach (removed, or outside the user’s device group): “1 device is no longer available.” / “3 devices are no longer available.”. The same text for both, so the answer never tells an unknown device from one outside the group. The whole request is refused, never run in part.

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, no password yet or an offline site (nothing is sent to such a device), and with refuseUnreachable a device the polling marked Unreachable (a read that only waits for its timeout). Prefer DeviceMessages.Refusal, which names the offline site.

static string? Refusal(IDeviceInfo device, bool refuseUnreachable = false)

Why device is not contacted, or null when it may be: DeviceMessages.Refusal with the site’s name for DeviceStatus.SiteOffline (“Site offline: Building B”).

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 StatusText(IDeviceInfo device)

The status name of the device grid for one device: like DeviceMessages.StatusText, with the site’s name for DeviceStatus.SiteOffline (“Site offline: Building B”).

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 BasicLoginOnly = "Basic login only"

The device list’s Status text of such a device (status Credentials required, DeviceMessages.BasicOnlyOverHttp).

const string BasicOnlyOverHttp = "The device accepts only Basic login over HTTP. Turn on HTTPS on the device, or allow Basic login over HTTP in Settings."

The device has no HTTPS and accepts only Basic login, which OADM sends over plain HTTP only when the server setting allows it.

const string BruteForceBlocked = "The device blocks logins for a while after failed tries (brute force protection). Wait a few minutes, then retry."

The device’s brute force protection blocks OADM’s address after failed logins (HTTP 403 with its page).

const string CertificateChanged = "Certificate changed. Use Trust new certificate in the device list if you know why it changed."

The device presents another certificate than the one OADM pinned. The device list’s “Trust new certificate” shows the new one and pins it once the user confirmed it.

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 AXIS OS version)"

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).