Interface IPtzService
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
stringThe token identifying the profile to use
position
PtzPositionThe absolute position to move to
Returns
ContinuousMoveAsync(string, PtzVector, TimeSpan?)
Starts continuous movement in the specified direction
Task ContinuousMoveAsync(string profileToken, PtzVector velocity, TimeSpan? timeout = null)
Parameters
profileToken
stringThe token identifying the profile to use
velocity
PtzVectorThe velocity vector for the movement
timeout
TimeSpan?Optional timeout after which movement will stop
Returns
CreateTourAsync(string, PtzTour)
Creates a new PTZ tour
Task<string> CreateTourAsync(string profileToken, PtzTour tour)
Parameters
profileToken
stringThe token identifying the profile to use
tour
PtzTourThe tour configuration to create
Returns
DeleteTourAsync(string, string)
Deletes a PTZ tour
Task DeleteTourAsync(string profileToken, string tourToken)
Parameters
profileToken
stringThe token identifying the profile to use
tourToken
stringThe token identifying the tour to delete
Returns
GetPositionAsync(string)
Gets the current PTZ position of the camera
Task<PtzPosition> GetPositionAsync(string profileToken)
Parameters
profileToken
stringThe 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
stringThe token identifying the profile to use
Returns
GetStatusAsync(string)
Gets the status of the PTZ device including position and movement
Task<PtzStatus> GetStatusAsync(string profileToken)
Parameters
profileToken
stringThe token identifying the profile to use
Returns
GetSupportedAuxiliaryCommandsAsync(string)
Gets the list of supported auxiliary commands
Task<List<string>> GetSupportedAuxiliaryCommandsAsync(string profileToken)
Parameters
profileToken
stringThe token identifying the profile to use
Returns
GetTourAsync(string, string)
Gets a specific PTZ tour by token
Task<PtzTour> GetTourAsync(string profileToken, string tourToken)
Parameters
profileToken
stringThe token identifying the profile to use
tourToken
stringThe token identifying the tour
Returns
GetTourOptionsAsync(string)
Gets configuration options for PTZ tours
Task<TourOptions> GetTourOptionsAsync(string profileToken)
Parameters
profileToken
stringThe 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
stringThe token identifying the profile to use
Returns
GotoPresetAsync(string, string)
Moves the camera to a specific preset position
Task GotoPresetAsync(string profileToken, string presetToken)
Parameters
profileToken
stringThe token identifying the profile to use
presetToken
stringThe token identifying the preset to go to
Returns
PauseTourAsync(string, string)
Temporarily pauses a running tour
Task PauseTourAsync(string profileToken, string tourToken)
Parameters
profileToken
stringThe token identifying the profile to use
tourToken
stringThe token identifying the tour to pause
Returns
RelativeMoveAsync(string, PtzVector)
Moves the camera relative to its current position
Task RelativeMoveAsync(string profileToken, PtzVector translation)
Parameters
profileToken
stringThe token identifying the profile to use
translation
PtzVectorThe relative movement vector
Returns
SendAuxiliaryCommandAsync(string, string)
Sends an auxiliary command to the PTZ device
Task<string> SendAuxiliaryCommandAsync(string profileToken, string auxiliaryCommand)
Parameters
profileToken
stringThe token identifying the profile to use
auxiliaryCommand
stringThe auxiliary command to send
Returns
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
stringThe token identifying the profile to use
presetName
stringOptional name for the preset
presetToken
stringOptional token for the preset (if updating existing)
Returns
StartTourAsync(string, string)
Starts a PTZ tour
Task StartTourAsync(string profileToken, string tourToken)
Parameters
profileToken
stringThe token identifying the profile to use
tourToken
stringThe token identifying the tour to start
Returns
StopAsync(string)
Stops all PTZ movement
Task StopAsync(string profileToken)
Parameters
profileToken
stringThe token identifying the profile to use
Returns
StopTourAsync(string, string)
Stops a running PTZ tour
Task StopTourAsync(string profileToken, string tourToken)
Parameters
profileToken
stringThe token identifying the profile to use
tourToken
stringThe token identifying the tour to stop
Returns
UpdateTourAsync(string, PtzTour)
Modifies an existing PTZ tour
Task UpdateTourAsync(string profileToken, PtzTour tour)
Parameters
profileToken
stringThe token identifying the profile to use
tour
PtzTourThe tour with updated configuration