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 DeviceMessagesGuide: Devices and VAPIX
Methods
Section titled “Methods”ForHttpStatus
Section titled “ForHttpStatus”static string? ForHttpStatus(int status)The text of an HTTP error status (400, 401, 403, 404, 5xx), or null for other codes.
NoLongerAvailable
Section titled “NoLongerAvailable”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.
Refusal
Section titled “Refusal”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.
Refusal
Section titled “Refusal”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”).
ServerError
Section titled “ServerError”static string ServerError(int status)“Server error - HTTP 500”.
StatusText
Section titled “StatusText”static string StatusText(DeviceStatus status)The short status name of the device grid: “OK”, “Unreachable”, “Credentials required” …
StatusText
Section titled “StatusText”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”).
Timeout
Section titled “Timeout”static string Timeout(TimeSpan timeout)“Timeout after 15 s”.
Unreachable
Section titled “Unreachable”static string Unreachable(string detail)“Unreachable - Connection refused” (a trailing period of the detail is removed).
Fields
Section titled “Fields”BadRequest
Section titled “BadRequest”const string BadRequest = "Bad Request - HTTP 400"HTTP 400.
BasicLoginOnly
Section titled “BasicLoginOnly”const string BasicLoginOnly = "Basic login only"The device list’s Status text of such a device (status Credentials required, DeviceMessages.BasicOnlyOverHttp).
BasicOnlyOverHttp
Section titled “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.
BruteForceBlocked
Section titled “BruteForceBlocked”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).
CertificateChanged
Section titled “CertificateChanged”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.
CredentialsRequired
Section titled “CredentialsRequired”const string CredentialsRequired = "Credentials required - the device rejects the stored credentials"The device rejects the stored login (status Credentials required).
Forbidden
Section titled “Forbidden”const string Forbidden = "Forbidden - HTTP 403 (administrator rights are required)"HTTP 403.
HostUnreachable
Section titled “HostUnreachable”const string HostUnreachable = "Unreachable - no route to the device"No route to the device (host or network unreachable).
NotAnswering
Section titled “NotAnswering”const string NotAnswering = "Unreachable - the device does not answer"“Unreachable - the device does not answer”: a device the polling marked Unreachable, not contacted.
NotFound
Section titled “NotFound”const string NotFound = "Not Found - HTTP 404 (API not available on this AXIS OS version)"HTTP 404.
PasswordNotSet
Section titled “PasswordNotSet”const string PasswordNotSet = "Password not set - the device is in factory default"The device has no password yet (status Password not set).
Removed
Section titled “Removed”const string Removed = "The device was removed from OADM."A device that is no longer in the device table.
TimedOut
Section titled “TimedOut”const string TimedOut = "Timeout - the device did not answer in time"A timeout whose length is not known to the caller.
Unauthorized
Section titled “Unauthorized”const string Unauthorized = "Unauthorized - HTTP 401 (check the credentials)"The device refused the login of a request (HTTP 401).