Reputation: 512
I would like to know how to create and setup a PresetTour using the ONVIF standard.
Using the the ONVIF ptz wsdl that has been added to my c# project's Connected Services
, I can see that I can create a PresetTour
for my PTZClient
.
_ptzClient.CreatePresetTour(_profile.token);
After using this command, I can get the infos of this newly created preset tour using:
PresetTour[] tours = _ptzClient.GetPresetTours(_profile.token);
I would like to know how to create a new TourSpot
or use an already existing Preset
as a TourSpot
to make my camera go to this spot when launching/starting the preset tour/patrol on my camera.
How do I set the position of a newly created tour spot?
How am I supposed to configure an entire PresetTour
?
If there is no solution to my problem, I think I'll keep a list of preset on the side of my application and do everything manually.
Upvotes: 1
Views: 1021
Reputation: 4168
You need to invoke ModifyPresetTour
. It requires a tt:PresetTour
struct, which has, among other fields, a TourSpot
element of type tt:PTZPresetTourSpot
. Beware that TourSpot
is defined in the XML schema as minOccurs="0" maxOccurs="unbounded"
, thus you can specify any number of tour spots.
The PTZPresetTourSpot
struct has a PresetDetail
filed of type tt: PTZPresetTourPresetDetail
.
Finally PTZPresetTourPresetDetail
has a PresetToken
field, where you can specify the preset.
I agree it is not very programmer-friendly.
Upvotes: 1