Table of Contents

Interface IPtzService

Namespace
WINKOnvif.Core.PTZ
Assembly
WINKOnvif.Core.dll

Interface for ONVIF PTZ camera control

public interface IPtzService

Methods

AbsoluteMoveAsync(string, PtzPosition)

Moves the camera to an absolute position

Task AbsoluteMoveAsync(string profileToken, PtzPosition position)

Parameters

profileToken string

The token identifying the profile to use

position PtzPosition

The absolute position to move to

Returns

Task

ContinuousMoveAsync(string, PtzVector, TimeSpan?)

Starts continuous movement in the specified direction

Task ContinuousMoveAsync(string profileToken, PtzVector velocity, TimeSpan? timeout = null)

Parameters

profileToken string

The token identifying the profile to use

velocity PtzVector

The velocity vector for the movement

timeout TimeSpan?

Optional timeout after which movement will stop

Returns

Task

CreateTourAsync(string, PtzTour)

Creates a new PTZ tour

Task<string> CreateTourAsync(string profileToken, PtzTour tour)

Parameters

profileToken string

The token identifying the profile to use

tour PtzTour

The tour configuration to create

Returns

Task<string>

The token of the created tour

DeleteTourAsync(string, string)

Deletes a PTZ tour

Task DeleteTourAsync(string profileToken, string tourToken)

Parameters

profileToken string

The token identifying the profile to use

tourToken string

The token identifying the tour to delete

Returns

Task

GetPositionAsync(string)

Gets the current PTZ position of the camera

Task<PtzPosition> GetPositionAsync(string profileToken)

Parameters

profileToken string

The token identifying the profile to use

Returns

Task<PtzPosition>

The current PTZ position

GetPresetsAsync(string)

Gets all presets configured for the camera

Task<List<PtzPreset>> GetPresetsAsync(string profileToken)

Parameters

profileToken string

The token identifying the profile to use

Returns

Task<List<PtzPreset>>

A list of PTZ presets

GetStatusAsync(string)

Gets the status of the PTZ device including position and movement

Task<PtzStatus> GetStatusAsync(string profileToken)

Parameters

profileToken string

The token identifying the profile to use

Returns

Task<PtzStatus>

The current PTZ status

GetSupportedAuxiliaryCommandsAsync(string)

Gets the list of supported auxiliary commands

Task<List<string>> GetSupportedAuxiliaryCommandsAsync(string profileToken)

Parameters

profileToken string

The token identifying the profile to use

Returns

Task<List<string>>

List of supported auxiliary commands

GetTourAsync(string, string)

Gets a specific PTZ tour by token

Task<PtzTour> GetTourAsync(string profileToken, string tourToken)

Parameters

profileToken string

The token identifying the profile to use

tourToken string

The token identifying the tour

Returns

Task<PtzTour>

The requested PTZ tour

GetTourOptionsAsync(string)

Gets configuration options for PTZ tours

Task<TourOptions> GetTourOptionsAsync(string profileToken)

Parameters

profileToken string

The token identifying the profile to use

Returns

Task<TourOptions>

The tour configuration options

GetToursAsync(string)

Gets all available PTZ tours for a profile

Task<List<PtzTour>> GetToursAsync(string profileToken)

Parameters

profileToken string

The token identifying the profile to use

Returns

Task<List<PtzTour>>

List of available PTZ tours

GotoPresetAsync(string, string)

Moves the camera to a specific preset position

Task GotoPresetAsync(string profileToken, string presetToken)

Parameters

profileToken string

The token identifying the profile to use

presetToken string

The token identifying the preset to go to

Returns

Task

PauseTourAsync(string, string)

Temporarily pauses a running tour

Task PauseTourAsync(string profileToken, string tourToken)

Parameters

profileToken string

The token identifying the profile to use

tourToken string

The token identifying the tour to pause

Returns

Task

RelativeMoveAsync(string, PtzVector)

Moves the camera relative to its current position

Task RelativeMoveAsync(string profileToken, PtzVector translation)

Parameters

profileToken string

The token identifying the profile to use

translation PtzVector

The relative movement vector

Returns

Task

SendAuxiliaryCommandAsync(string, string)

Sends an auxiliary command to the PTZ device

Task<string> SendAuxiliaryCommandAsync(string profileToken, string auxiliaryCommand)

Parameters

profileToken string

The token identifying the profile to use

auxiliaryCommand string

The auxiliary command to send

Returns

Task<string>

The response from the auxiliary command

SetPresetAsync(string, string?, string?)

Sets a new preset at the current camera position

Task<string> SetPresetAsync(string profileToken, string? presetName = null, string? presetToken = null)

Parameters

profileToken string

The token identifying the profile to use

presetName string

Optional name for the preset

presetToken string

Optional token for the preset (if updating existing)

Returns

Task<string>

The token of the created/updated preset

StartTourAsync(string, string)

Starts a PTZ tour

Task StartTourAsync(string profileToken, string tourToken)

Parameters

profileToken string

The token identifying the profile to use

tourToken string

The token identifying the tour to start

Returns

Task

StopAsync(string)

Stops all PTZ movement

Task StopAsync(string profileToken)

Parameters

profileToken string

The token identifying the profile to use

Returns

Task

StopTourAsync(string, string)

Stops a running PTZ tour

Task StopTourAsync(string profileToken, string tourToken)

Parameters

profileToken string

The token identifying the profile to use

tourToken string

The token identifying the tour to stop

Returns

Task

UpdateTourAsync(string, PtzTour)

Modifies an existing PTZ tour

Task UpdateTourAsync(string profileToken, PtzTour tour)

Parameters

profileToken string

The token identifying the profile to use

tour PtzTour

The tour with updated configuration

Returns

Task