IVapixClient
Interface in Oadm.Sdk.Vapix · Oadm.Sdk.dll
Authenticated VAPIX access to one device, with the stored login and the pinned certificate. OADM implements it; the password never reaches the plugin.
public interface IVapixClientGuide: Devices and VAPIX
Properties
Section titled “Properties”BaseAddress
Section titled “BaseAddress”Uri BaseAddress { get; }The device’s address with its scheme (“https://10.0.0.48/”). Requests use paths relative to it.
Methods
Section titled “Methods”ConnectWebSocketAsync
Section titled “ConnectWebSocketAsync”Task<WebSocket> ConnectWebSocketAsync(string pathAndQuery, TimeSpan keepAlive, CancellationToken ct)Default implementation
Opens a WebSocket to the device (pathAndQuery relative to the device, e.g. /vapix/ws-data-stream?sources=events): ws for HTTP devices, wss with the pinned certificate for HTTPS devices. The login is a one-time session token (wssession.cgi) read with the stored credentials, which never reach the plugin. The socket pings the device every keepAlive and aborts when no pong comes back within the same time (devices send nothing on a quiet stream). The caller disposes the socket. Throws like IVapixClient.SendAsync (unreachable, certificate changed, timeout) and UnauthorizedAccessException when the device refuses the login. Hosts without it throw NotSupportedException.
GetApiListAsync
Section titled “GetApiListAsync”Task<IReadOnlyList<DeviceApi>> GetApiListAsync(CancellationToken ct)Fresh API discovery list (apidiscovery.cgi getApiList). Use with Require(...) before writing.
GetBasicDeviceInfoAsync
Section titled “GetBasicDeviceInfoAsync”Task<BasicDeviceInfo> GetBasicDeviceInfoAsync(CancellationToken ct)Reads basicdeviceinfo.cgi getAllProperties: serial number, product, AXIS OS version.
GetVideoSourcesAsync
Section titled “GetVideoSourcesAsync”Task<IReadOnlyList<VideoSource>> GetVideoSourcesAsync(CancellationToken ct)Default implementation
Enabled video sources (view areas, sensors, encoder channels) in camera order, never empty for a video device; the same list the live view offers (param.cgi Properties.Image and Image). Read-only. Hosts without it throw NotSupportedException.
ListParametersAsync
Section titled “ListParametersAsync”Task<IReadOnlyDictionary<string, string>> ListParametersAsync(IEnumerable<string> groups, CancellationToken ct)Reads parameters with param.cgi?action=list, e.g. ["Network.UPnP.FriendlyName", "HTTPS"] (a parameter or a whole group). Keys come back without the “root.” prefix; unknown groups are left out.
RestartAsync
Section titled “RestartAsync”Task RestartAsync(CancellationToken ct)Restarts the device (restart.cgi). Returns once the device accepted it, not when it is back.
SendAsync
Section titled “SendAsync”Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken ct)Raw escape hatch for plugins: sends a request relative to the device base address.