AlarmCommandClient Class Reference

The alarm command token is a WCF client class used against XProtect Corporate to handle alarms. VideoOS.Platform.Proxy.AlarmClient.IAlarmClient for a description of the available methods. Use VideoOS.Platform.Proxy.AlarmClient.AlarmClientManager whenever possible instead. More...

Inheritance diagram for AlarmCommandClient:
IAlarmCommand

Public Member Functions

void Acknowledge (System.Guid id)
 Acknowledges a specific alarm. Acknowledge alarms wil get the state set to In Progress (state = 4) and the owner will be set to the user calling.
 
void AcknowledgeMultipleAlarms (System.Guid objectId)
 Acknowledges multiple alarms. The method will acknowledge all alarms which is created by a specific object. The object is defined by the Alarm.EventHeader.Source.FQID.ObjectId. The acknowledge alarms wil get the state set to In Progress (state = 4) and the owner will be set to the user calling.
 
void Add (VideoOS.Platform.Data.Alarm alarm)
 Add an alarm to the Event Server. No filtering and manipulation is done on the way to the database and the alarm structure is preserved in the database. This means that adding the alarm and getting it afterwards using the Alarm.Eventheader.ID will result in an alarm containing the same data fields.
 
void AddAsEvent (VideoOS.Platform.Data.Alarm alarm)
 Add alarm as event (deprecated)
 
void AddEvent (VideoOS.Platform.Data.BaseEvent baseEvent)
 Add an event to the Event Server. The event is checked and filtered in the Event Server against the user defined alarm definitions. Alarms are created based on the baseEvent data on every matching alarm definition. The match criteria is the BaseEvent.EventHeader.Message which match the alarm definition event message and the BaseEvent.EventHeader.Source.FQID.ObjectId which matches the source. The alarms created gets the alarm definition details added as data and the alarm is given a unique id.
 
 AlarmCommandClient ()
 
 AlarmCommandClient (string endpointConfigurationName)
 
 AlarmCommandClient (string endpointConfigurationName, string remoteAddress)
 
 AlarmCommandClient (string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress)
 
 AlarmCommandClient (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress)
 
void AttachSnapshot (System.Guid id, VideoOS.Platform.Data.Snapshot snapshot)
 Attach a snapshot to a specific alarm.
 
VideoOS.Platform.Data.Alarm Get (System.Guid id)
 Gets a specific alarm based on the input id.
 
VideoOS.Platform.Proxy.Alarm.AlarmHistory[] GetAlarmHistory (System.Guid id)
 Gets the alarm history. This methods returns a collection alarm history objects which contains information on the changes made to the alarm. The alarm history reflects the alarm updates made VideoOS.Platform.Proxy.Alarm.AlarmHistory for details.
 
VideoOS.Platform.Proxy.Alarm.AlarmLine[] GetAlarmLines (int from, int maxCount, VideoOS.Platform.Proxy.Alarm.AlarmFilter filter)
 Gets alarm lines based on alarm filter. The lines received is a subset of the full set of alarm lines that satisfies the filter conditions. The subset is received based on the "from" and "maxCount" input parameters. An example: Get the newest 100 alarm lines where the alarm state is In Progress (state = 4). The alarm lines should be returned in descending time order. Help on constructing the alarm filter matching this, see the Alarm filter documentation. The "from" parameter should be set to 0 meaning the start of the resulting matching set and the "maxCount" parameter is set to 100.
 
string[] GetAlarmMessages ()
 Gets all the different alarm messages received up to this point in time. The alarm message is the Alarm.EventHeader.Message field in the alarm.
 
VideoOS.Platform.Proxy.Alarm.AlarmUpdate[] GetAlarmUpdateHistory (System.Guid id)
 
VideoOS.Platform.Data.BaseEvent GetEvent (System.Guid id)
 Gets a specific event based on the input id.
 
VideoOS.Platform.Proxy.Alarm.EventLine[] GetEventLines (int from, int maxCount, VideoOS.Platform.Proxy.Alarm.EventFilter filter)
 Gets event lines based on event filter. The lines received is a subset of the full set of event lines that satisfies the filter conditions. The subset is received based on the "from" and "maxCount" input parameters. An example: Get the newest 100 event lines where the event name contains "My event". The event lines should be returned in descending time order. Help on constructing the event filter matching this, see the event filter documentation. The "from" parameter should be set to 0 meaning the start of the resulting matching set and the "maxCount" parameter is set to 100.
 
VideoOS.Platform.Data.EventHeader GetHeader (System.Guid id)
 Gets the event header from a specific alarm.
 
AlarmUpdateData GetSessionAlarmLines (int maxCount, Guid sessionId)
 
EventUpdateData GetSessionEventLines (int maxCount, Guid sessionId)
 
VideoOS.Platform.Data.SnapshotList GetSnapshots (System.Guid id)
 Get the snapshot list from a specific alarm.
 
VideoOS.Platform.Proxy.Alarm.Statistic[] GetStatistics ()
 Gets the alarm statistics. The statistics contains overall informations on alarm count based on different alarm properties like state and priority VideoOS.Platform.Proxy.Alarm.Statistic for more information about the content.
 
Guid StartAlarmLineSession (VideoOS.Platform.Proxy.Alarm.AlarmFilter filter)
 
Guid StartEventLineSession (VideoOS.Platform.Proxy.Alarm.EventFilter filter)
 
void StopAlarmLineSession (Guid sessionId)
 
void StopEventLineSession (Guid sessionId)
 
void UpdateAlarm (System.Guid id, string text, int state, int priority, System.DateTime time, string assignedTo)
 Updates a specific alarm with the input parameters. Only valid input parameters is updated.
 
void UpdateAlarmValues (System.Guid id, KeyValuePair< string, string >[] updates)
 Updates a set of fields on a given alarm. The alarm to update is identified by the id.
 
void UpdateMultipleAlarms (System.Guid objectId, int oldState, int newState, System.DateTime time, string assignedTo)
 Updates multiple alarms. The method updates all alarms which is created by a specific object. The object is defined by the Alarm.EventHeader.Source.FQID.ObjectId. Both state and the assigned to will be updated.
 
- Public Member Functions inherited from IAlarmCommand

Detailed Description

The alarm command token is a WCF client class used against XProtect Corporate to handle alarms. VideoOS.Platform.Proxy.AlarmClient.IAlarmClient for a description of the available methods. Use VideoOS.Platform.Proxy.AlarmClient.AlarmClientManager whenever possible instead.

Constructor & Destructor Documentation

◆ AlarmCommandClient() [1/5]

AlarmCommandClient.AlarmCommandClient ( )
inline

◆ AlarmCommandClient() [2/5]

AlarmCommandClient.AlarmCommandClient ( string endpointConfigurationName)
inline

◆ AlarmCommandClient() [3/5]

AlarmCommandClient.AlarmCommandClient ( string endpointConfigurationName,
string remoteAddress )
inline

◆ AlarmCommandClient() [4/5]

AlarmCommandClient.AlarmCommandClient ( string endpointConfigurationName,
System.ServiceModel.EndpointAddress remoteAddress )
inline

◆ AlarmCommandClient() [5/5]

AlarmCommandClient.AlarmCommandClient ( System.ServiceModel.Channels.Binding binding,
System.ServiceModel.EndpointAddress remoteAddress )
inline

Member Function Documentation

◆ Acknowledge()

void AlarmCommandClient.Acknowledge ( System.Guid id)
inline

Acknowledges a specific alarm. Acknowledge alarms wil get the state set to In Progress (state = 4) and the owner will be set to the user calling.

Parameters
idId of the alarm to be updated
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.


Implements IAlarmCommand.

◆ AcknowledgeMultipleAlarms()

void AlarmCommandClient.AcknowledgeMultipleAlarms ( System.Guid objectId)
inline

Acknowledges multiple alarms. The method will acknowledge all alarms which is created by a specific object. The object is defined by the Alarm.EventHeader.Source.FQID.ObjectId. The acknowledge alarms wil get the state set to In Progress (state = 4) and the owner will be set to the user calling.

Parameters
objectIdObject id of the alarms to update. The id is matched to Alarm.EventHeader.Source.FQID.ObjectId in the alarm.
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.


Implements IAlarmCommand.

◆ Add()

void AlarmCommandClient.Add ( VideoOS.Platform.Data.Alarm alarm)
inline

Add an alarm to the Event Server. No filtering and manipulation is done on the way to the database and the alarm structure is preserved in the database. This means that adding the alarm and getting it afterwards using the Alarm.Eventheader.ID will result in an alarm containing the same data fields.

Parameters
alarmAlarm
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.


Implements IAlarmCommand.

◆ AddAsEvent()

void AlarmCommandClient.AddAsEvent ( VideoOS.Platform.Data.Alarm alarm)
inline

Add alarm as event (deprecated)

Parameters
alarmAlarm
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.

Implements IAlarmCommand.

◆ AddEvent()

void AlarmCommandClient.AddEvent ( VideoOS.Platform.Data.BaseEvent baseEvent)
inline

Add an event to the Event Server. The event is checked and filtered in the Event Server against the user defined alarm definitions. Alarms are created based on the baseEvent data on every matching alarm definition. The match criteria is the BaseEvent.EventHeader.Message which match the alarm definition event message and the BaseEvent.EventHeader.Source.FQID.ObjectId which matches the source. The alarms created gets the alarm definition details added as data and the alarm is given a unique id.

Parameters
baseEventEvent
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.


Implements IAlarmCommand.

◆ AttachSnapshot()

void AlarmCommandClient.AttachSnapshot ( System.Guid id,
VideoOS.Platform.Data.Snapshot snapshot )
inline

Attach a snapshot to a specific alarm.

Parameters
idAlarm id
snapshotSnapshot to attach
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.


Implements IAlarmCommand.

◆ Get()

VideoOS.Platform.Data.Alarm AlarmCommandClient.Get ( System.Guid id)
inline

Gets a specific alarm based on the input id.

Parameters
idAlarm id
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
Alarm

Implements IAlarmCommand.

◆ GetAlarmHistory()

VideoOS.Platform.Proxy.Alarm.AlarmHistory[] AlarmCommandClient.GetAlarmHistory ( System.Guid id)
inline

Gets the alarm history. This methods returns a collection alarm history objects which contains information on the changes made to the alarm. The alarm history reflects the alarm updates made VideoOS.Platform.Proxy.Alarm.AlarmHistory for details.

Parameters
idId of the alarm to get the history about
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
Alarm history

Implements IAlarmCommand.

◆ GetAlarmLines()

VideoOS.Platform.Proxy.Alarm.AlarmLine[] AlarmCommandClient.GetAlarmLines ( int from,
int maxCount,
VideoOS.Platform.Proxy.Alarm.AlarmFilter filter )
inline

Gets alarm lines based on alarm filter. The lines received is a subset of the full set of alarm lines that satisfies the filter conditions. The subset is received based on the "from" and "maxCount" input parameters. An example: Get the newest 100 alarm lines where the alarm state is In Progress (state = 4). The alarm lines should be returned in descending time order. Help on constructing the alarm filter matching this, see the Alarm filter documentation. The "from" parameter should be set to 0 meaning the start of the resulting matching set and the "maxCount" parameter is set to 100.

Parameters
fromStart of alarm lines.
maxCountMax count of received alarm lines
filterThe alarm filter
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
List of alarm lines

Implements IAlarmCommand.

◆ GetAlarmMessages()

string[] AlarmCommandClient.GetAlarmMessages ( )
inline

Gets all the different alarm messages received up to this point in time. The alarm message is the Alarm.EventHeader.Message field in the alarm.

Exceptions
VideoOS.Platform.Proxy.Alarm.AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
Messages

Implements IAlarmCommand.

◆ GetAlarmUpdateHistory()

VideoOS.Platform.Proxy.Alarm.AlarmUpdate[] AlarmCommandClient.GetAlarmUpdateHistory ( System.Guid id)
inline

Implements IAlarmCommand.

◆ GetEvent()

VideoOS.Platform.Data.BaseEvent AlarmCommandClient.GetEvent ( System.Guid id)
inline

Gets a specific event based on the input id.

Parameters
idEvent id
Exceptions
AlarmServiceFaultThrown if the id is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
Event

Implements IAlarmCommand.

◆ GetEventLines()

VideoOS.Platform.Proxy.Alarm.EventLine[] AlarmCommandClient.GetEventLines ( int from,
int maxCount,
VideoOS.Platform.Proxy.Alarm.EventFilter filter )
inline

Gets event lines based on event filter. The lines received is a subset of the full set of event lines that satisfies the filter conditions. The subset is received based on the "from" and "maxCount" input parameters. An example: Get the newest 100 event lines where the event name contains "My event". The event lines should be returned in descending time order. Help on constructing the event filter matching this, see the event filter documentation. The "from" parameter should be set to 0 meaning the start of the resulting matching set and the "maxCount" parameter is set to 100.

Parameters
fromStart of event lines.
maxCountMax count of received event lines
filterThe event filter
Exceptions
AlarmServiceFaultThrown if the event id is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
List of event lines

Implements IAlarmCommand.

◆ GetHeader()

VideoOS.Platform.Data.EventHeader AlarmCommandClient.GetHeader ( System.Guid id)
inline

Gets the event header from a specific alarm.

Parameters
idAlarm id
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
Event header

Implements IAlarmCommand.

◆ GetSessionAlarmLines()

AlarmUpdateData AlarmCommandClient.GetSessionAlarmLines ( int maxCount,
Guid sessionId )
inline

Implements IAlarmCommand.

◆ GetSessionEventLines()

EventUpdateData AlarmCommandClient.GetSessionEventLines ( int maxCount,
Guid sessionId )
inline

Implements IAlarmCommand.

◆ GetSnapshots()

VideoOS.Platform.Data.SnapshotList AlarmCommandClient.GetSnapshots ( System.Guid id)
inline

Get the snapshot list from a specific alarm.

Parameters
idAlarm id
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
Snapshot list

Implements IAlarmCommand.

◆ GetStatistics()

VideoOS.Platform.Proxy.Alarm.Statistic[] AlarmCommandClient.GetStatistics ( )
inline

Gets the alarm statistics. The statistics contains overall informations on alarm count based on different alarm properties like state and priority VideoOS.Platform.Proxy.Alarm.Statistic for more information about the content.

Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.
Returns
Alarm statistics

Implements IAlarmCommand.

◆ StartAlarmLineSession()

Guid AlarmCommandClient.StartAlarmLineSession ( VideoOS.Platform.Proxy.Alarm.AlarmFilter filter)
inline

Implements IAlarmCommand.

◆ StartEventLineSession()

Guid AlarmCommandClient.StartEventLineSession ( VideoOS.Platform.Proxy.Alarm.EventFilter filter)
inline

Implements IAlarmCommand.

◆ StopAlarmLineSession()

void AlarmCommandClient.StopAlarmLineSession ( Guid sessionId)
inline

Implements IAlarmCommand.

◆ StopEventLineSession()

void AlarmCommandClient.StopEventLineSession ( Guid sessionId)
inline

Implements IAlarmCommand.

◆ UpdateAlarm()

void AlarmCommandClient.UpdateAlarm ( System.Guid id,
string text,
int state,
int priority,
System.DateTime time,
string assignedTo )
inline

Updates a specific alarm with the input parameters. Only valid input parameters is updated.

Parameters
idId of the alarm to be updated
textThe text will not be added to the alarm but to the alarm history which contains the history of alarm updates VideoOS.Platform.Proxy.Alarm.AlarmHistory. If null no text is written
stateThe new alarm state. Only states greater than 0 is valid
priorityThe new alarm priority. Only priorities greater than 0 is valid
timeThe time of the update
assignedToThe new assigned to owner. If null no owner is assigned
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.


Implements IAlarmCommand.

◆ UpdateAlarmValues()

void AlarmCommandClient.UpdateAlarmValues ( System.Guid id,
KeyValuePair< string, string >[] updates )
inline

Updates a set of fields on a given alarm. The alarm to update is identified by the id.

The updates parameter defines what fields to update, and what value to assign to them.

The following fields can be updated:

  • "AssignedTo"
  • "Comment"
  • "Priority"
  • "PriorityInt"
  • "PriorityName"
  • "ReasonCode"
  • "State"
  • "StateInt"
  • "StateName"
Exceptions
VideoOS.Platform.Proxy.Alarm.AlarmServiceFaultThrown if invalid field key or value
Parameters
idId of alarm to update
updatesKeyValuePair of fields to update

Implements IAlarmCommand.

◆ UpdateMultipleAlarms()

void AlarmCommandClient.UpdateMultipleAlarms ( System.Guid objectId,
int oldState,
int newState,
System.DateTime time,
string assignedTo )
inline

Updates multiple alarms. The method updates all alarms which is created by a specific object. The object is defined by the Alarm.EventHeader.Source.FQID.ObjectId. Both state and the assigned to will be updated.

Parameters
objectIdObject id of the alarms to update. The id is matched to Alarm.EventHeader.Source.FQID.ObjectId in the alarm.
oldStateOld state. Only alarms with the this state will be updated.
newStateNew state.
timeThe time of the update
assignedToNew assigned to user
Exceptions
AlarmServiceFaultThrown if the alarm is rejected by the Event Server
ExceptionThrown on communications errors.


Implements IAlarmCommand.