Through the RecorderCommandService it is possible to send various commands related to PTZ, output handling, recordings, live, and other device related commands. More...
Classes | |
class | ClientCapabilities |
ClientCapabilities specifies what the client supports and are exchanged once per multicast session at the MulticastStart() method call. More... | |
class | ImageMask |
Represents a image mask. More... | |
class | JPEGData |
Represents a single JPEG image retrieved from the media database. More... | |
class | LiveStreamDevice |
class | LiveStreamSetting |
class | ManualRecordingInfo |
Encapsulates information about manual recording for a device. More... | |
class | ManualRecordingResult |
Represents result of starting and stopping manual recording. More... | |
class | MotionAreaInfo |
Class contains position and size of area with motion. More... | |
class | MotionAreaInfos |
class | MulticastInfo |
class | PTZArgs |
class | PTZPairBoolean |
Represents a named PTZ parameter of boolean type. More... | |
class | PTZPairDouble |
Represents a named PTZ parameter of double type. More... | |
class | PtzSessionInfo |
class | SequenceEntry |
Represents an entry in a list of sequences. More... | |
class | SequenceType |
Represents a sequence type. More... | |
class | SmartSearchResult |
Represents the smart search result. More... | |
class | SmartSearchStatus |
Represents the smart search status. More... | |
class | TimeDuration |
Represents a timespan (.NET TimeSpan does apparently not work automatically with soap serialization) More... | |
class | TimeLineInformationData |
Class containing time line information data. More... | |
class | UserInfo |
Public Types | |
enum | IOState { Unknown , Activated , Deactivated } |
Represents the actual or requested state of an input- or outputdevice. More... | |
enum | SmartSearchStatusType { UnspecifiedError , SearchInProgress , SearchResultReady , SearchEndTimeReached , SearchCancelled } |
Represents the smart search status. More... | |
Public Member Functions | |
void | ControlLiveStream (string token, Guid clientID, Guid controlID, LiveStreamDevice[] devices) |
int | GetVersion () |
Returns the protocol version. | |
IOState | InputGetState (string token, Guid deviceId) |
Get current I/O state of given input device. | |
ManualRecordingInfo[] | IsManualRecording (string token, Guid[] deviceIds) |
This method returns whether manual recording on a device is active or not. Please note that if manual recording on a device is not active (false), it does not necessary mean that the device stopped recording. The device might still record because of other recording rules, just not because of manual recording. If given device is not recognized value sent back for this device is false. | |
JPEGData | JPEGGetAt (string token, Guid deviceId, DateTime time) |
Get image from a given device as JPEG, at a given time or the nearest one (either before or after). If no image is available the response is a JPEGData structure with time set to minimum dateTime, and data set to nothing. | |
JPEGData | JPEGGetAtOrAfter (string token, Guid deviceId, DateTime time) |
Get image from a given device as JPEG, at a given time or nearest image after. If no image is available the response is a JPEGData structure with time set to minimum dateTime, and data set to nothing. | |
JPEGData | JPEGGetAtOrBefore (string token, Guid deviceId, DateTime time) |
Get image from a given device as JPEG, at a given time or nearest image before. If no image is available the response is a JPEGData structure with time set to minimum dateTime, and data set to nothing. | |
JPEGData | JPEGGetLive (string token, Guid deviceId, int maxWidth, int maxHeight) |
Get live image from a given device as JPEG (i.e. encoded from last keyframe). If no image is available the response is a JPEGData structure with time set to minimum dateTime, and data set to nothing. | |
void | MulticastContinue (string token, Guid[] multicastSessionIds) |
Keeps the multicast of live stream alive. Must be called periodically to keep the multicast alive with no larger intervals than specified by MulticastInfo. | |
MulticastInfo[] | MulticastStart (string token, Guid[] deviceIds, ClientCapabilities clientCapabilities) |
Start multicast of live stream. | |
void | MulticastStop (string token, Guid[] multicastSessionIds) |
Stop multicast of live stream. | |
void | OutputActivate (string token, Guid deviceId) |
Activate a given output device. | |
void | OutputDeactivate (string token, Guid deviceId) |
Deactivate a given output device. | |
IOState | OutputGetState (string token, Guid deviceId) |
Get current I/O state of given output device. | |
void | OutputTrigger (string token, Guid deviceId, TimeDuration duration) |
Trigger output to activate for a given time period and then automatically deactivate. | |
string[] | PresetGetList (string token, Guid deviceId) |
Get list of presets for a given device. | |
void | PresetMoveTo (string token, Guid deviceId, string presetName) |
Request device to move to a given named preset. | |
void | PresetSet (string token, Guid deviceId, string presetName) |
Reserved for future use (Not implemented yet). | |
void | PTZActivatePatrollingSchema (string token, Guid deviceId, Guid patrollingSchemaId) |
void | PTZCenter (string token, Guid deviceId, double refWidth, double refHeight, double centerX, double centerY, double zoom) |
Request PTZ device to center around a given point. | |
PTZArgs | PTZGetAbsolutePosition (string token, Guid deviceId) |
Get absolute PTZ position of device. | |
PtzSessionInfo | PTZGetSessionInfo (string token, Guid deviceId) |
void | PTZMoveAbsolute (string token, Guid deviceId, PTZArgs ptzArgs) |
Request device to move to specified absolute PTZ position. PTZArgs details: | |
void | PTZMoveHome (string token, Guid deviceId) |
Request device to move to home position (as defined by the device itself) | |
void | PTZMoveRelative (string token, Guid deviceId, PTZArgs ptzArgs) |
The 'PTZMoveRelative' command move the specific camera in the given direction - one time. PTZArgs details: | |
void | PTZMoveStart (string token, Guid deviceId, PTZArgs ptzArgs) |
Start move with given speed parameters. Movement will continue until a PTZMoveStop or some other command is received. PTZArgs details: | |
void | PTZMoveStop (string token, Guid deviceId) |
Request device to stop a current move operation (started with PTZMoveStart) | |
void | PTZRectangle (string token, Guid deviceId, double refWidth, double refHeight, double left, double top, double bottom, double right) |
Request PTZ device to show a specified rectangle. | |
void | PTZReleaseSession (string token, Guid deviceId) |
void | PTZReserveSession (string token, Guid deviceId) |
RecorderCommandService () | |
RecorderCommandService is used to control XProtect recorder, and to retrieve information about device recordings. | |
void | SendDriverCommand (string token, Guid deviceId, string command) |
SequenceEntry[] | SequencesGet (string token, Guid deviceId, Guid sequenceType, DateTime minTime, DateTime maxTime, int maxCount) |
Get chronological list of sequences for a given sequence type with specified minimum time, maximum time and maximum count. Sequences are processed onwards from minTime and are sorted by TimeBegin. | |
SequenceEntry[] | SequencesGetAround (string token, Guid deviceId, Guid sequenceType, DateTime centerTime, int maxCountBefore, int maxCountAfter) |
Get chronological list of sequences for a given sequence type with specified center time, maximum count before center time and maximum count after center time. A sequence with TimeBegin equal to centertime will increase "after" count. | |
SequenceEntry[] | SequencesGetAroundWithSpan (string token, Guid deviceId, Guid sequenceType, DateTime centerTime, TimeDuration maxTimeBefore, int maxCountBefore, TimeDuration maxTimeAfter, int maxCountAfter) |
Get chronological list of sequences for a given sequence type with specified center time, maximum count before center time and maximum count after center time. Furthermore, search is limited before and after centertime by maximum timespans. | |
SequenceType[] | SequencesGetTypes (string token, Guid deviceId) |
Get list of available sequence types for a given device. | |
void | SmartSearchCancel (string token, Guid smartSearchId) |
Cancels a specified smart search operation. | |
SmartSearchResult | SmartSearchGetResult (string token, Guid smartSearchId, bool continueSearch) |
Return the result a specified smart search operation. | |
SmartSearchStatus | SmartSearchGetStatus (string token, Guid smartSearchId) |
Return the status of a specified smart search operation. | |
Guid | SmartSearchStart (string token, Guid deviceId, DateTime searchBeginTime, DateTime searchEndTime, int sensitivity, TimeDuration searchInterval, ImageMask searchMask, bool ignoreInitialMotion, System.Drawing.Size resultMotionMaskSize) |
Starts a smart serch operation on the server. | |
ManualRecordingResult[] | StartManualRecording (string token, Guid[] deviceIds) |
This method requests a start of manual recording on a device. The start manual recording request will start recording on the device if recording has not already been started because of other rules: A service channel event is sent when the evaluation of start manual recording has been made. If manual recording is already active, the command is simply ignore but the request is still successful. | |
bool | StartRecording (string token, Guid deviceId, long recordingTimeMicroSeconds) |
This method is only supported by E-Code family. For manual recording use StartManualRecording. | |
ManualRecordingResult[] | StopManualRecording (string token, Guid[] deviceIds) |
This method requests a stop of manual recording on a device. Please note that stopping manual recording does not necessary mean that the device stops recording. The device might still record because of other recording rules, just not because of manual recording. A service channel event is sent when the evaluation of stop manual recording has been made. If manual recording is already stopped, the command is simply ignore but the request is still successful. | |
TimeLineInformationData[] | TimeLineInformationGet (string token, Guid deviceId, Guid[] timeLineInformationTypes, DateTime timeLineInformationBeginTime, TimeDuration timeLineInformationInterval, int timeLineInformationCount) |
Gets specified timeline information. | |
Through the RecorderCommandService it is possible to send various commands related to PTZ, output handling, recordings, live, and other device related commands.
All commands may return an ErrorNumber and possibly a SubErrorNumber in the SOAP response in case the request fails.
The ErrorNumber and SubErrorNumber are returned in the SOAP fault details as two XML elements.
The following error numbers are possible:
Error number | Description |
---|---|
10000 | General communication error. |
10001 | SOAP version is not supported. |
10002 | SOAP message is invalid. |
10003 | SOAP version could not be recognized. |
20001 | There is a problem with the specified security token. |
40000 | An error occurred while executing this method. |
40295 | A PTZ error occurred. For possible sub error numbers, see example for PTZMoveAbsolute |
Error number 20001 indicates a problem with the security token and will be followed by one of these sub error numbers:
Sub error number | Description |
---|---|
1 | Occurs when no token was specified by the client. |
2 | Occurs when the validation of the supplied token failed. |
3 | Occurs when the supplied token had expired. |
4 | Occurs when the supplied token could not be validated at the moment of the request; the client should retry later. |
As an example on the SOAP communication see the following SOAP request and response for the InputGetState command:
SOAP request (notice the missing token):
SOAP response:
|
inline |
RecorderCommandService is used to control XProtect recorder, and to retrieve information about device recordings.
Construction can be done like:
All methods require a token as a parameter. The token is returned on the Login method on the ServerCommandService.
|
inline |
|
inline |
Returns the protocol version.
|
inline |
Get current I/O state of given input device.
token | Security token |
deviceId | Device ID |
|
inline |
This method returns whether manual recording on a device is active or not. Please note that if manual recording on a device is not active (false), it does not necessary mean that the device stopped recording. The device might still record because of other recording rules, just not because of manual recording. If given device is not recognized value sent back for this device is false.
token | Security token |
deviceIds | list of device Ids for which to check manual recording. |
|
inline |
Get image from a given device as JPEG, at a given time or the nearest one (either before or after). If no image is available the response is a JPEGData structure with time set to minimum dateTime, and data set to nothing.
token | Security token |
deviceId | Device ID |
time | Requested image time as UTC |
|
inline |
|
inline |
|
inline |
Get live image from a given device as JPEG (i.e. encoded from last keyframe). If no image is available the response is a JPEGData structure with time set to minimum dateTime, and data set to nothing.
token | Security token |
deviceId | Device ID |
maxWidth | The maximum width, considering aspect ratio |
maxHeight | The maximum height, considering aspect ratio |
|
inline |
Keeps the multicast of live stream alive. Must be called periodically to keep the multicast alive with no larger intervals than specified by MulticastInfo.
token | Security token |
multicastSessionIds | Array of multicast session IDs for which multicast live stream should be continued |
|
inline |
Start multicast of live stream.
token | Security token |
deviceIds | Array of device IDs for which multicast live stream should be started |
clientCapabilities | Specifies what the client supports. See ClientCapabilities class. This parameter is optional on SOAP level. |
|
inline |
Stop multicast of live stream.
token | Security token |
multicastSessionIds | Array of multicast session IDs for which multicast live stream should be stopped |
|
inline |
Activate a given output device.
token | Security token |
deviceId | Device ID |
|
inline |
Deactivate a given output device.
token | Security token |
deviceId | Device ID |
|
inline |
Get current I/O state of given output device.
token | Security token |
deviceId | Device ID |
|
inline |
Trigger output to activate for a given time period and then automatically deactivate.
token | Security token |
deviceId | Device ID |
duration | Duration in which the output should be activated |
|
inline |
Get list of presets for a given device.
token | Security token |
deviceId | Device ID |
For error handling see example for PTZMoveAbsolute.
|
inline |
Request device to move to a given named preset.
token | Security token |
deviceId | Device ID |
presetName |
For error handling see example for PTZMoveAbsolute.
|
inline |
Reserved for future use (Not implemented yet).
token | Security token |
deviceId | Device ID |
presetName |
For error handling see example for PTZMoveAbsolute.
|
inline |
|
inline |
Request PTZ device to center around a given point.
token | Security token |
deviceId | Device ID |
refWidth | Width of the image to center camera in |
refHeight | Height of the image to center camera in |
centerX | Horizontal center position relative to refWidth |
centerY | Vertical center position reletive to refHeight |
zoom | Zoom level are in interval [0-1] and 0=full zoom out; 1=full zoom in; <0=no change. |
For error handling see example for PTZMoveAbsolute.
|
inline |
Get absolute PTZ position of device.
token | Security token |
deviceId | Device ID |
For error handling see example for PTZMoveAbsolute.
|
inline |
|
inline |
Request device to move to specified absolute PTZ position.
PTZArgs details:
token | Security token |
deviceId | The Guid for the camera |
ptzArgs | Absolute PTZ position |
The various PTZ commands may return an ErrorNumber and possibly a SubErrorNumber in the SOAP response in case the request fails.
The ErrorNumber and SubErrorNumber are returned in the SOAP fault details as two XML elements.
Error number 40295 indicates a PTZ-related error. For this error number the following sub error numbers are possible:
Sub error number | Description |
---|---|
1 | Occurs when device is not configured/loaded on the recording server. |
2 | Occurs when the device is not started or connection broken. |
10 | Occurs when the device does not support PTZ. |
11 | Occurs when the device does not support presets. |
20 | Occurs when the PTZ request is rejected because the PTZ request has lower priority than the current active ptz session priority. |
21 | Occurs when the request is rejected because too many requests for the device. |
30 | Occurs if trying to execute a PTZ request without having an active session. |
31 | Occurs if the session executing the request is not the currently active session. |
32 | Occurs when trying to start a PTZ session that is already started. |
33 | Occurs when trying to pause a PTZ session that is not running (paused or stopped). |
40 | Occurs when trying to pause a patrolling when there is no active patrolling session. |
41 | Occurs when trying to resume patrolling for session that is not paused. |
50 | Occurs when trying to start patrolling with a patrolling profile that doesn't exist. |
As a example on the SOAP communication see the following SOAP request and response for the PTZMoveRelative command:
SOAP request:
SOAP response:
|
inline |
Request device to move to home position (as defined by the device itself)
token | Security token |
deviceId | Device ID |
For error handling see example for PTZMoveAbsolute.
|
inline |
The 'PTZMoveRelative' command move the specific camera in the given direction - one time.
PTZArgs details:
movement values:
'pan' : -1=left ; 1=right;
'tilt' : -1=up ; 1=down
'zoom' : -1=out ; 1=in
'iris' : -1=down ; 1=up; 0=reset
'gain' : -1=down ; 1=up; 0=reset
'shutter' : -1=down ; 1=up; 0=reset
'brightness' : -1=down ; 1=up; 0=reset
token | Security token |
deviceId | Device ID |
ptzArgs | Relative PTZ coordinates |
For error handling see example for PTZMoveAbsolute.
|
inline |
Start move with given speed parameters. Movement will continue until a PTZMoveStop or some other command is received. PTZArgs details:
movement; value; speed:
'pan'; 1, 0.5 : move right; half speed
'pan'; -1, 1 : move left; full speed
'pan'; 0, 0 : stop pan
'tilt'; 1, 0.5 : move down; half speed
'tilt'; -1, 1 : move up; full speed
'tilt'; 0, 0 : stop tilt
pan and tilt direction+speed is calculated together by driver if both are defined.
'zoom'; 1, 0.5 : zoom out; half speed
'zoom'; -1, 1 : zoom in; full speed
'zoom'; 0, 0 : stop zoom
token | Security token |
deviceId | Device ID |
ptzArgs | PTZ parameters, speed is read from "speed" collection and direction is read from sign on parameters in "movement" collection. |
For error handling see example for PTZMoveAbsolute.
|
inline |
Request device to stop a current move operation (started with PTZMoveStart)
token | Security token |
deviceId | Device ID |
For error handling see example for PTZMoveAbsolute.
|
inline |
Request PTZ device to show a specified rectangle.
token | Security token |
deviceId | Device ID |
refWidth | Reference width |
refHeight | Reference height |
left | Horizontal position of left edge of rectangle relative to refWidth |
top | Vertical position of top edge of rectangle relative to refHeight |
bottom | Vertical position of bottom edge of rectangle relative to refHeight |
right | Horizontal position of right edge of rectangle relative to refWidth |
For error handling see example for PTZMoveAbsolute.
|
inline |
|
inline |
|
inline |
|
inline |
Get chronological list of sequences for a given sequence type with specified minimum time, maximum time and maximum count. Sequences are processed onwards from minTime and are sorted by TimeBegin.
token | Security token |
deviceId | Device ID |
sequenceType | The requested sequence type. The following types are currently supported: RecordingSequence : {F9C62604-D0C5-4050-AE25-72DE51639B14} MotionSequence : {53CB5E33-2183-44bd-9491-8364D2457480} RecordingWithTriggerSequence : {0601D294-B7E5-4d93-9614-9658561AD5E4} |
minTime | Minimum time as UTC |
maxTime | Maximum time as UTC |
maxCount |
|
inline |
Get chronological list of sequences for a given sequence type with specified center time, maximum count before center time and maximum count after center time. A sequence with TimeBegin equal to centertime will increase "after" count.
token | Security token |
deviceId | Device ID |
sequenceType | The requested sequence type. The following types are currently supported: RecordingSequence : {F9C62604-D0C5-4050-AE25-72DE51639B14} MotionSequence : {53CB5E33-2183-44bd-9491-8364D2457480} RecordingWithTriggerSequence : {0601D294-B7E5-4d93-9614-9658561AD5E4} |
centerTime | Centertime as UTC |
maxCountBefore | |
maxCountAfter |
|
inline |
Get chronological list of sequences for a given sequence type with specified center time, maximum count before center time and maximum count after center time. Furthermore, search is limited before and after centertime by maximum timespans.
token | Security token |
deviceId | Device ID |
sequenceType | The requested sequence type. The following types are currently supported: RecordingSequence : {F9C62604-D0C5-4050-AE25-72DE51639B14} MotionSequence : {53CB5E33-2183-44bd-9491-8364D2457480} RecordingWithTriggerSequence : {0601D294-B7E5-4d93-9614-9658561AD5E4} |
centerTime | Centertime as UTC |
maxTimeBefore | |
maxCountBefore | |
maxTimeAfter | |
maxCountAfter |
|
inline |
Get list of available sequence types for a given device.
token | Security token |
deviceId | Device ID |
|
inline |
Cancels a specified smart search operation.
token | Security token |
smartSearchId | Smart search operation ID |
|
inline |
Return the result a specified smart search operation.
token | Security token |
smartSearchId | Smart search operation ID |
continueSearch | Indicates whether the search shall continue or not. |
|
inline |
Return the status of a specified smart search operation.
token | Security token |
smartSearchId | Smart search operation ID |
|
inline |
Starts a smart serch operation on the server.
token | Security token |
deviceId | Device ID |
searchBeginTime | The begin time of the smart search. |
searchEndTime | The end time of the smart search. |
sensitivity | Search sensitivity value between 0 and 100 where 100 is the highest sensitivity. |
searchInterval | Search interval specifying the interval of the images that are searched. |
searchMask | Mask specifying witch parts of the image to perform the smart search on. |
ignoreInitialMotion | If true initial motion is ignored |
resultMotionMaskSize | The requested size of the motion mask returned by the SmartSearchGetResult method. |
A guid identifying the smart search operation. Used when polling the recorder for status and results.
|
inline |
This method requests a start of manual recording on a device. The start manual recording request will start recording on the device if recording has not already been started because of other rules: A service channel event is sent when the evaluation of start manual recording has been made. If manual recording is already active, the command is simply ignore but the request is still successful.
token | Security token |
deviceIds | Device ID |
|
inline |
This method is only supported by E-Code family. For manual recording use StartManualRecording.
token | Security token |
deviceId | Device ID |
recordingTimeMicroSeconds |
|
inline |
This method requests a stop of manual recording on a device. Please note that stopping manual recording does not necessary mean that the device stops recording. The device might still record because of other recording rules, just not because of manual recording. A service channel event is sent when the evaluation of stop manual recording has been made. If manual recording is already stopped, the command is simply ignore but the request is still successful.
token | Security token |
deviceIds | Device ID |
|
inline |
Gets specified timeline information.
token | Security token |
deviceId | Device ID |
timeLineInformationTypes | Array of guids specifying the requested time line information types. The following types are currently supported: RecordedDataAvailable : {78289503-CBF4-43be-9DC3-9F34A8B60E6D} ActivitiesDetected (motion) : {F445CE14-0038-4302-994E-39D99E4C0733} |
timeLineInformationBeginTime | The requested begin time of the time line information |
timeLineInformationInterval | The requested interval between each discrete time line information value |
timeLineInformationCount | The requested number of time line information values |