public void setPreset(string name,int PanSpeed,int TiltSpeed,int ZoomSpeed)
{
if (ptzClient == null)
setPTZClient();
PTZVector pv = new PTZVector();
pv.panTilt = new Vector2D();
pv.zoom = new Vector1D();
pv.panTilt.x = (float)10;
pv.panTilt.y = (float)10;
pv.zoom.x = (float)10;
PTZPreset ps = new PTZPreset();
ps.token = "20";
ps.name = name;
ps.ptzPosition = pv;
PTZSpeed pzs = new PTZSpeed();
pzs.panTilt = new Vector2D();
pzs.zoom = new Vector1D();
pzs.panTilt.x = (float)TiltSpeed;
pzs.panTilt.y = (float)PanSpeed;
pzs.zoom.x = (float)ZoomSpeed;
var setpresetres = new SetPresetResponse();
setpresetres = ptzClient.SetPreset(new SetPresetRequest("Profile_1", name,null));
var presetres = new GetPresetsResponse();
presetres = ptzClient.GetPresets(new GetPresetsRequest("Profile_1"));
}
I write this method for set preset ....but i dont know where i set the object of PTZSpeed ,PTZVector
Please help me....
I think you mixing thing here. Use SoapUi or equivalent to take a look at the soap message to be sent.
Note that you only need to submit a Profile token, your name of the preset, and a token for the preset. If I remember correctly, the preset token will be returned in the response. The profile token are one of the items returned from the Mediaservice.GetProfiles method.
The speed settings for pan, tilt, zoom are only used when you use the Move, GoToHome or GoToPreset command.