Methods
absoluteMove(profileTokenopt, position, speedopt, callbackopt)
If a PTZ node supports absolute Pan/Tilt or absolute Zoom movements, it shall support the
AbsoluteMove operation. The position argument of this command specifies the absolute position
to which the PTZ unit moves. It splits into an optional Pan/Tilt element and an optional Zoom
element. If the Pan/Tilt position is omitted, the current Pan/Tilt movement shall NOT be affected
by this command. The same holds for the zoom position.
The spaces referenced within the position shall be absolute position spaces supported by the PTZ node. If the space information is omitted, the corresponding default spaces of the PTZ configuration, a part of the specified Media Profile, is used. A device may support absolute Pan/Tilt movements, absolute Zoom movements or no absolute movements by providing only absolute position spaces for the supported cases.
An existing Speed argument overrides the DefaultSpeed of the corresponding PTZ configuration during movement to the requested position. If spaces are referenced within the Speed argument, they shall be Speed Spaces supported by the PTZ Node.
The operation shall fail if the requested absolute position is not reachable.
The spaces referenced within the position shall be absolute position spaces supported by the PTZ node. If the space information is omitted, the corresponding default spaces of the PTZ configuration, a part of the specified Media Profile, is used. A device may support absolute Pan/Tilt movements, absolute Zoom movements or no absolute movements by providing only absolute position spaces for the supported cases.
An existing Speed argument overrides the DefaultSpeed of the corresponding PTZ configuration during movement to the requested position. If spaces are referenced within the Speed argument, they shall be Speed Spaces supported by the PTZ Node.
The operation shall fail if the requested absolute position is not reachable.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. | ||||||||||||||||
position |
object | Vector specifying the absolute target position.
Properties
|
|||||||||||||||||
speed |
object |
<optional> |
Speed vector specifying the velocity of pan, tilt and zoom.
Properties
|
||||||||||||||||
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
continuousMove(profileTokenopt, velocity, timeoutopt, callbackopt)
A PTZ-capable device shall support continuous movements. The velocity argument of this
command specifies a signed speed value for the Pan, Tilt and Zoom. The combined Pan/Tilt
element is optional and the Zoom element itself is optional. If the Pan/Tilt element is omitted,
the current Pan/Tilt movement shall NOT be affected by this command. The same holds for the
Zoom element. The spaces referenced within the velocity element shall be velocity spaces
supported by the PTZ Node. If the space information is omitted for the velocity argument, the
corresponding default spaces of the PTZ configuration belonging to the specified Media Profile
is used. A device MAY support continuous Pan/Tilt movements and/or continuous Zoom
movements by providing only velocity spaces for the supported cases.
An existing timeout argument overrides the DefaultPTZTimeout parameter of the corresponding PTZ configuration for this Move operation. The timeout parameter specifies how long the PTZ node continues to move.
A device shall stop movement in a particular axis (Pan, Tilt, or Zoom) when zero is sent as the ContinuousMove parameter for that axis. Stopping shall have the same effect independent of the velocity space referenced. This command has the same effect on a continuous move as the stop command specified in section 5.3.5.
If the requested velocity leads to absolute positions which cannot be reached, the PTZ node shall move to a reachable position along the border of its range. A typical application of the continuous move operation is controlling PTZ via joystick.
An existing timeout argument overrides the DefaultPTZTimeout parameter of the corresponding PTZ configuration for this Move operation. The timeout parameter specifies how long the PTZ node continues to move.
A device shall stop movement in a particular axis (Pan, Tilt, or Zoom) when zero is sent as the ContinuousMove parameter for that axis. Stopping shall have the same effect independent of the velocity space referenced. This command has the same effect on a continuous move as the stop command specified in section 5.3.5.
If the requested velocity leads to absolute positions which cannot be reached, the PTZ node shall move to a reachable position along the border of its range. A typical application of the continuous move operation is controlling PTZ via joystick.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. | ||||||||||||||||
velocity |
object | One of PanTilt (x,y) or Zoom (z), or both, is required.
Properties
|
|||||||||||||||||
timeout |
integer |
<optional> |
Duration: An optional Timeout parameter. | ||||||||||||||||
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
Example
const OnvifManager = require('onvif-nvt')
OnvifManager.connect('10.10.1.60', 80, 'username', 'password')
.then(results => {
let camera = results
if (camera.ptz) { // PTZ is supported on this device
let velocity = { x: 1, y: 0 }
camera.ptz.continuousMove(null, velocity)
.then(() => {
setTimeout(() => {
camera.ptz.stop()
}, 5000) // stop the camera after 5 seconds
})
}
})
createRequest(body)
Private function for creating a SOAP request.
Parameters:
Name | Type | Description |
---|---|---|
body |
string | The body of the xml. |
- Source:
geoMove(profileTokenopt, geoLocation, speedopt, areaWidthopt, areaHeightopt, callbackopt)
+++ This function is untested as I do not have any cameras that support this feature.
A device signaling GeoMove in one of its PTZ nodes shall support this command. The optional AreaHeight and AreaWidth parameters can be added to the request, so that the PTZ-capable device can internally determine the zoom factor. In case both AreaHeight and AreaWidth are not provided, the unit will not change the zoom. AreaHeight and AreaWidth are expressed in meters.
An existing speed argument overrides the DefaultSpeed of the corresponding PTZ configuration during movement by the requested translation. If spaces are referenced within the speed argument, they shall be speed spaces supported by the PTZ node.
If the PTZ-capable device does not support automatic retrieval of the geolocation, it shall be configured by using SetGeoLocation before it can perform geo-referenced commands. In case the client requests a GeoMove command before the geolocation of the device is configured, the device shall return an error.
Depending on the kinematics of the PTZ-capable device, the requested position may not be reachable. In this situation the device shall return an error, signalling that it cannot perform the requested action due to physical limitations.
A device signaling GeoMove in one of its PTZ nodes shall support this command. The optional AreaHeight and AreaWidth parameters can be added to the request, so that the PTZ-capable device can internally determine the zoom factor. In case both AreaHeight and AreaWidth are not provided, the unit will not change the zoom. AreaHeight and AreaWidth are expressed in meters.
An existing speed argument overrides the DefaultSpeed of the corresponding PTZ configuration during movement by the requested translation. If spaces are referenced within the speed argument, they shall be speed spaces supported by the PTZ node.
If the PTZ-capable device does not support automatic retrieval of the geolocation, it shall be configured by using SetGeoLocation before it can perform geo-referenced commands. In case the client requests a GeoMove command before the geolocation of the device is configured, the device shall return an error.
Depending on the kinematics of the PTZ-capable device, the requested position may not be reachable. In this situation the device shall return an error, signalling that it cannot perform the requested action due to physical limitations.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. | ||||||||||||||||
geoLocation |
object | Target coordinates.
Properties
|
|||||||||||||||||
speed |
object |
<optional> |
Speed vector specifying the velocity of pan, tilt and zoom.
Properties
|
||||||||||||||||
areaWidth |
float |
<optional> |
Optional area to be shown. | ||||||||||||||||
areaHeight |
float |
<optional> |
Optional area to be shown. | ||||||||||||||||
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
getCompatibleConfigurations(profileTokenopt, callbackopt)
A device signalling support for GetCompatibleConfigurations via the capability
GetCompatibleConfigurations shall return all available PTZConfigurations that can be added to
the referenced media profile through the GetComatibleConfigurations operation.
A device providing more than one PTZConfiguration or more than one VideoSourceConfiguration or which has any other resource interdependency between PTZConfiguration entities and other resources listable in a media profile should implement this operation. PTZConfiguration entities returned by this operation shall not fail on adding them to the referenced media profile.
A device providing more than one PTZConfiguration or more than one VideoSourceConfiguration or which has any other resource interdependency between PTZConfiguration entities and other resources listable in a media profile should implement this operation. PTZConfiguration entities returned by this operation shall not fail on adding them to the referenced media profile.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
getConfiguration(configurationToken, callbackopt)
A PTZ-capable device shall implement the GetConfigurationOptions operation. It returns the list
of supported coordinate systems including their range limitations. Therefore, the options MAY
differ depending on whether the PTZ configuration is assigned to a profile(see ONVIF Media
Service Specification) containing a VideoSourceConfiguration. In that case, the options may
additionally contain coordinate systems referring to the image coordinate system described by
the VideoSourceConfiguration. Each listed coordinate system belongs to one of the groups
listed in Section 4. If the PTZ node supports continuous movements, it shall return a timeout
range within which timeouts are accepted by the PTZ node.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
configurationToken |
string | Reference to the requested PTZ configuration. | |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
getConfigurationOptions(configurationToken, callbackopt)
A PTZ-capable device shall implement the GetConfigurationOptions operation. It returns the list
of supported coordinate systems including their range limitations. Therefore, the options MAY
differ depending on whether the PTZ configuration is assigned to a profile(see ONVIF Media
Service Specification) containing a VideoSourceConfiguration. In that case, the options may
additionally contain coordinate systems referring to the image coordinate system described by
the VideoSourceConfiguration. Each listed coordinate system belongs to one of the groups
listed in Section 4. If the PTZ node supports continuous movements, it shall return a timeout
range within which timeouts are accepted by the PTZ node.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
configurationToken |
string | Reference to the requested PTZ configuration. | |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
getConfigurations(callbackopt)
The PTZConfiguration contains a reference to the PTZ node in which it belongs. This reference
cannot be changed by a client.
The following elements are part of the PTZ Configuration:
The allowed pan and tilt range for Pan/Tilt limits is defined by a two-dimensional space range that is mapped to a specific absolute Pan/Tilt position space. At least one Pan/Tilt position space is required by the PTZNode to support Pan/Tilt limits. The limits apply to all supported absolute, relative and continuous Pan/Tilt movements. The limits shall be checked within the coordinate system for which the limits have been specified. That means that even if movements are specified in a different coordinate system, the requested movements shall be transformed to the coordinate system of the limits where the limits can be checked. When a relative or continuous movements is specified, which would leave the specified limits, the PTZ unit has to move along the specified limits. The Zoom Limits have to be interpreted accordingly.
The following elements are part of the PTZ Configuration:
- PTZNodeToken – A mandatory reference to the PTZ node that the PTZ Configuration belongs to.
- DefaultAbsolutePanTiltPositionSpace – If the PTZ node supports absolute Pan/Tilt movements, it shall specify one Absolute Pan/Tilt Position Space as default.
- DefaultRelativePanTiltTranslationSpace – If the PTZ node supports relative Pan/Tilt movements, it shall specify one RelativePan/Tilt Translation Space as default.
- DefaultContinuousPanTiltVelocitySpace – If the PTZ node supports continuous Pan/Tilt movements, it shall specify one continuous Pan/Tilt velocity space as default.
- DefaultPanTiltSpeedSpace – If the PTZ node supports absolute or relative movements, it shall specify one Pan/Tilt speed space as default.
- DefaultAbsoluteZoomPositionSpace – If the PTZ node supports absolute zoom movements, it shall specify one absolute zoom position space as default.
- DefaultRelativeZoomTranslationSpace – If the PTZ node supports relative zoom movements, it shall specify one relative zoom translation space as default.
- DefaultContinuousZoomVelocitySpace – If the PTZ node supports continuous zoom movements, it shall specify one continuous zoom velocity space as default.
- DefaultPTZSpeed – If the PTZ node supports absolute or relative PTZ movements, it shall specify corresponding default Pan/Tilt and Zoom speeds.
- DefaultPTZTimeout – If the PTZ node supports continuous movements, it shall specify a default timeout, after which the movement stops.
- PanTiltLimits – The Pan/Tilt limits element should be present for a PTZ node that supports an absolute Pan/Tilt. If the element is present it signals the support for configurable Pan/Tilt limits. If limits are enabled, the Pan/Tilt movements shall always stay within the specified range. The Pan/Tilt limits are disabled by setting the limits to –INF or +INF.
- ZoomLimits – The zoom limits element should be present for a PTZ node that supports absolute zoom. If the element is present it signals the supports for configurable zoom limits. If limits are enabled the zoom movements shall always stay within the specified range. The Zoom limits are disabled by settings the limits to –INF and +INF.
- MoveRamp – The optional acceleration ramp used by the device when moving.
- PresetRamp – The optional acceleration ramp used by the device when recalling presets.
- PresetTourRamp – The optional acceleration ramp used by the device when executing PresetTours.
The allowed pan and tilt range for Pan/Tilt limits is defined by a two-dimensional space range that is mapped to a specific absolute Pan/Tilt position space. At least one Pan/Tilt position space is required by the PTZNode to support Pan/Tilt limits. The limits apply to all supported absolute, relative and continuous Pan/Tilt movements. The limits shall be checked within the coordinate system for which the limits have been specified. That means that even if movements are specified in a different coordinate system, the requested movements shall be transformed to the coordinate system of the limits where the limits can be checked. When a relative or continuous movements is specified, which would leave the specified limits, the PTZ unit has to move along the specified limits. The Zoom Limits have to be interpreted accordingly.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
getNode(nodeToken, callbackopt)
A PTZ-capable device shall implement the GetNode operation and return the properties of the
requested PTZ node, if it exists. Otherwise, the device shall respond with an appropriate fault
message.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
nodeToken |
* | Reference to the requested PTZNode. | |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
getNodes(callbackopt)
A PTZ-capable device shall implement this operation and return all PTZ nodes available on the device.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
getPresets(profileTokenopt, callbackopt)
The GetPresets operation returns the saved presets consisting of the following elements:
- Token – A unique identifier to reference the preset.
- Name – An optional mnemonic name.
- PTZ Position – An optional absolute position. If the PTZ node supports absolute Pan/Tilt position spaces, the Pan/Tilt position shall be specified. If the PTZ node supports absolute zoom position spaces, the zoom position shall be specified.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
getStatus(profileTokenopt, callbackopt)
A PTZ-capable device shall be able to report its PTZ status through the GetStatus command.
The PTZ status contains the following information:
- Position (optional) – Specifies the absolute position of the PTZ unit together with the space references. The default absolute spaces of the corresponding PTZ configuration shall be referenced within the position element. This information shall be present if the device signals support via the capability StatusPosition.
- MoveStatus (optional) – Indicates if the Pan/Tilt/Zoom device unit is currently moving, idle or in an unknown state. This information shall be present if the device signals support via the capability MoveStatus. The state Unknown shall not be used during normal operation, but is reserved to initialization or error conditions.
- Error (optional) – States a current PTZ error condition. This field shall be present if the MoveStatus signals Unknown.
- UTC Time – Specifies the UTC time when this status was generated.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
gotoHomePosition(profileTokenopt, speedopt, callbackopt)
This operation moves the PTZ unit to its home position. If the speed parameter is omitted, the
default speed of the corresponding PTZ configuration shall be used. The speed parameter can
only be specified when speed spaces are available for the PTZ node.The command is nonblocking
and can be interrupted by other move commands.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. | ||||||||||||||||
speed |
object |
<optional> |
Speed vector specifying the velocity of pan, tilt and zoom.
Properties
|
||||||||||||||||
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
gotoPreset(profileTokenopt, presetToken, speedopt, callbackopt)
The GotoPreset operation recalls a previously set preset. If the speed parameter is omitted, the
default speed of the corresponding PTZ configuration shall be used. The speed parameter can
only be specified when speed spaces are available for the PTZ node. The GotoPreset command
is a non-blocking operation and can be interrupted by other move commands.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. | ||||||||||||||||
presetToken |
string | Reference to an existing preset token. | |||||||||||||||||
speed |
object |
<optional> |
Speed vector specifying the velocity of pan, tilt and zoom.
Properties
|
||||||||||||||||
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
init(timeDiff, serviceAddress, usernameopt, passwordopt)
Call this function directly after instantiating a Ptz object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
timeDiff |
number | The onvif device's time difference. | |
serviceAddress |
object | An url object from url package - require('url'). | |
username |
string |
<optional> |
Optional only if the device does NOT have a user. |
password |
string |
<optional> |
Optional only if the device does NOT have a password. |
- Source:
panTiltZoomOptions(vectors)
Used internally. Creates xml where PanTilt (x|y) and Zoom (z) are needed.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vectors |
object | One of PanTilt (x,y) or Zoom (z), or both, is required.
Properties
|
- Source:
relativeMove(profileTokenopt, translation, speedopt, callbackopt)
If a PTZ node supports relative Pan/Tilt or relative Zoom movements, then it shall support the
RelativeMove operation. The translation argument of this operation specifies the difference from
the current position to the position to which the PTZ device is instructed to move. The operation
is split into an optional Pan/Tilt element and an optional Zoom element. If the Pan/Tilt element is
omitted, the current Pan/Tilt movement shall NOT be affected by this command. The same holds
for the zoom element.
The spaces referenced within the translation element shall be translation spaces supported by the PTZ node. If the space information is omitted for the translation argument, the corresponding default spaces of the PTZ configuration, which is part of the specified Media Profile, is used. A device may support relative Pan/Tilt movements, relative Zoom movements or no relative movements by providing only translation spaces for the supported cases. An existing speed argument overrides the DefaultSpeed of the corresponding PTZ configuration during movement by the requested translation. If spaces are referenced within the speed argument, they shall be speed spaces supported by the PTZ node.
The command can be used to stop the PTZ unit at its current position by sending zero values for Pan/Tilt and Zoom. Stopping shall have the very same effect independent of the relative space referenced.
If the requested translation leads to an absolute position which cannot be reached, the PTZ Node shall move to a reachable position along the border of valid positions.
The spaces referenced within the translation element shall be translation spaces supported by the PTZ node. If the space information is omitted for the translation argument, the corresponding default spaces of the PTZ configuration, which is part of the specified Media Profile, is used. A device may support relative Pan/Tilt movements, relative Zoom movements or no relative movements by providing only translation spaces for the supported cases. An existing speed argument overrides the DefaultSpeed of the corresponding PTZ configuration during movement by the requested translation. If spaces are referenced within the speed argument, they shall be speed spaces supported by the PTZ node.
The command can be used to stop the PTZ unit at its current position by sending zero values for Pan/Tilt and Zoom. Stopping shall have the very same effect independent of the relative space referenced.
If the requested translation leads to an absolute position which cannot be reached, the PTZ Node shall move to a reachable position along the border of valid positions.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. | ||||||||||||||||
translation |
object | Vector specifying the positional Translation relative to the current position.
Properties
|
|||||||||||||||||
speed |
object |
<optional> |
Speed vector specifying the velocity of pan, tilt and zoom.
Properties
|
||||||||||||||||
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
removePreset(profileTokenopt, presetToken, callbackopt)
The RemovePreset operation removes a previously set preset.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. |
presetToken |
string | Existing preset token to be removed. | |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
sendAuxiliaryCommand(profileTokenopt, auxiliaryData, callbackopt)
This operation is used to call an auxiliary operation on the device. The supported commands
can be retrieved via the PTZ node properties. The AuxiliaryCommand should match the
supported command listed in the PTZ node; no other syntax is supported. If the PTZ node lists
the tt:IRLamp command, then the parameter of AuxiliaryCommand command shall conform to
the syntax specified in Section 8.6 Auxiliary operation of ONVIF Core Specification. The
SendAuxiliaryCommand shall be implemented when the PTZ node supports auxiliary commands.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. |
auxiliaryData |
string | Auxiliary command to be applied. | |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
setConfiguration(configurationToken, ptzConfigurationOptions, forcePersistence, callbackopt)
+++ TODO: This function is incomplete and requires a LOT of work for little return.
+++ Alternatively, you can pass XML in for ptzConfigurationOptions in the desired
+++ way required by the spec, in which case the function will work.
A PTZ-capable device shall implement the SetConfiguration operation. The ForcePersistence flag indicates if the changes remain after reboot of the device.
+++ Alternatively, you can pass XML in for ptzConfigurationOptions in the desired
+++ way required by the spec, in which case the function will work.
A PTZ-capable device shall implement the SetConfiguration operation. The ForcePersistence flag indicates if the changes remain after reboot of the device.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
configurationToken |
string | Reference to the PTZ configuration to be modified. | |
ptzConfigurationOptions |
xml | The requested PTZ node configuration options. | |
forcePersistence |
boolean | Deprecated modifier for temporary settings if supported by the device. | |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
setDefaultProfileToken(profileToken)
Sets the default profile token. This comes from media#getProfiles method.
By default, this module will get the first Profile and use it as the default profile. You can change the default profile by setting this function. Note: This functionality is only used where API calls require a ProfileToken and one is not provided.
By default, this module will get the first Profile and use it as the default profile. You can change the default profile by setting this function. Note: This functionality is only used where API calls require a ProfileToken and one is not provided.
Parameters:
Name | Type | Description |
---|---|---|
profileToken |
string | The profileToken to use when one is not passed to a method requiring one. |
- Source:
setHomePosition(profileTokenopt, callbackopt)
The SetHome operation saves the current position parameters as the home position, so that the
GotoHome operation can request that the device move to the home position.
The SetHomePosition command shall return with a failure if the “home” position is fixed and cannot be overwritten. If the SetHomePosition is successful, it shall be possible to recall the home position with the GotoHomePosition command.
The SetHomePosition command shall return with a failure if the “home” position is fixed and cannot be overwritten. If the SetHomePosition is successful, it shall be possible to recall the home position with the GotoHomePosition command.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
setPreset(profileTokenopt, presetTokenopt, presetNameopt, callbackopt)
The SetPreset command saves the current device position parameters so that the device can
move to the saved preset position through the GotoPreset operation.
If the PresetToken parameter is absent, the device shall create a new preset. Otherwise it shall update the stored position and optionally the name of the given preset. If creation is successful, the response contains the PresetToken which uniquely identifies the preset. An existing preset can be overwritten by specifying the PresetToken of the corresponding preset. In both cases (overwriting or creation) an optional PresetName can be specified. The operation fails if the PTZ device is moving during the SetPreset operation.
The device MAY internally save additional states such as imaging properties in the PTZ preset which then should be recalled in the GotoPreset operation. A device shall accept a valid SetPresetRequest that does not include the optional element PresetName. Devices may require unique preset names and reject a request that contains an already existing PresetName by responding with the error message ter:PresetExist.
If the PresetToken parameter is absent, the device shall create a new preset. Otherwise it shall update the stored position and optionally the name of the given preset. If creation is successful, the response contains the PresetToken which uniquely identifies the preset. An existing preset can be overwritten by specifying the PresetToken of the corresponding preset. In both cases (overwriting or creation) an optional PresetName can be specified. The operation fails if the PTZ device is moving during the SetPreset operation.
The device MAY internally save additional states such as imaging properties in the PTZ preset which then should be recalled in the GotoPreset operation. A device shall accept a valid SetPresetRequest that does not include the optional element PresetName. Devices may require unique preset names and reject a request that contains an already existing PresetName by responding with the error message ter:PresetExist.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. |
presetToken |
string |
<optional> |
Optional existing preset token to update a preset position. |
presetName |
string |
<optional> |
Optional name to be assigned to the preset position. |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source:
stop(profileTokenopt, panTiltopt, zoomopt, callbackopt)
A PTZ-capable device shall support the stop operation. If no stop filter arguments are present,
this command stops all ongoing pan, tilt and zoom movements. The stop operation can be
filtered to stop a specific movement by setting the corresponding stop argument.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
profileToken |
string |
<optional> |
If no profileToken is provided, then the defaultProfileToken will be used. |
panTilt |
boolean |
<optional> |
Defaults to true.......... |
zoom |
boolean |
<optional> |
Defaults to true |
callback |
callback |
<optional> |
Optional callback, instead of a Promise. |
- Source: