C++/CLI Sample
Demonstrates how to create a C++/CLI library using the VideoXpert SDK
CPPCli::Event Class Reference

The Event class represents an instance of a particular situation that has occurred. More...

#include <Event.h>

Public Types

enum  AckStates {
  AckStates::Unknown,
  AckStates::AckNeeded,
  AckStates::Acked,
  AckStates::AutoAcked,
  AckStates::NoAckNeeded,
  AckStates::Silenced
}
 Values that represent the current acknowledgement state of an event. More...
 

Public Member Functions

 Event (VxSdk::IVxEvent *vxEvent)
 Constructor. More...
 
virtual ~Event ()
 Destructor. More...
 
 !Event ()
 Finaliser. More...
 
Results::Value Acknowledge ()
 Acknowledge the event. More...
 
Results::Value Refresh ()
 Refreshes this instances properties. More...
 
Results::Value Silence (int wakeup)
 Silence the event for a given amount of time. More...
 

Package Functions

CPPCli::Device_GetGeneratorDevice ()
 
System::Collections::Generic::List< System::Collections::Generic::KeyValuePair< System::String^ , System::String^ > >^ _GetProperties ()
 
CPPCli::Situation_GetSituation ()
 
CPPCli::Device_GetSourceDevice ()
 
CPPCli::User_GetSourceUser ()
 

Package Attributes

VxSdk::IVxEvent_event
 

Properties

System::String^  AckClientId [get]
 Gets the identifier of the client that set the current ackState, if any. More...
 
System::String^  AckClientName [get]
 Gets the friendly name of the client that set the current AckState, if any. More...
 
AckStates AckState [get]
 Gets the current acknowledgement state of the event. More...
 
System::DateTime AckTime [get]
 Gets the time at which the current AckState was set. More...
 
System::String^  AckUserName [get]
 Gets the name of the user that set the current AckState, if any. More...
 
CPPCli::Device^  GeneratorDevice [get]
 Gets the unique identifier of the device that created and injected this event into the system. More...
 
System::String^  GeneratorDeviceId [get]
 Gets the unique identifier of the device that created and injected this event into the system. More...
 
System::String^  GeneratorDeviceName [get]
 Gets the friendly name of the generator device, if any. More...
 
System::String^  Id [get]
 Gets the unique identifier created by the device that generated the event. More...
 
bool IsInitial [get]
 Gets a value indicating whether the event is in its initial generated state (its ackState has not been updated). More...
 
System::Collections::Generic::List< System::Collections::Generic::KeyValuePair< System::String^ , System::String^ >>^ Properties [get]
 Gets a list of the properties associated with the event, if any. More...
 
unsigned short Severity [get]
 Gets the severity of the event, from 1 (highest) to 10 (lowest). More...
 
CPPCli::Situation^  Situation [get]
 Gets the type of the situation that led to the generation of this Event. More...
 
System::String^  SituationType [get]
 Gets the type of the situation that led to the generation of this Event. More...
 
System::String^  SourceClientId [get]
 Gets the client identifier of the client that was the cause of the situation, if any. More...
 
CPPCli::Device^  SourceDevice [get]
 Gets the unique identifier of the device that the situation occurred on. More...
 
System::String^  SourceDeviceId [get]
 Gets the unique identifier of the device that the situation occurred on. More...
 
System::String^  SourceDeviceName [get]
 Gets the friendly name of the source device. More...
 
CPPCli::User^  SourceUser [get]
 Gets the name of the user that was the cause of the situation, if any. More...
 
System::String^  SourceUserName [get]
 Gets the name of the user that was the cause of the situation, if any. More...
 
System::DateTime Time [get]
 Gets the time at which the situation occurred. More...
 

Detailed Description

The Event class represents an instance of a particular situation that has occurred.

Definition at line 15 of file Event.h.

Member Enumeration Documentation

Values that represent the current acknowledgement state of an event.

Enumerator
Unknown 

An error or unknown value was returned.

AckNeeded 

The event needs acknowledgement.

Acked 

The event is acknowledged.

AutoAcked 

The event is auto-acknowledged.

NoAckNeeded 

No event acknowledgement is needed.

Silenced 

The event has been silenced.

Definition at line 21 of file Event.h.

21  {
23  Unknown,
24 
26  AckNeeded,
27 
29  Acked,
30 
32  AutoAcked,
33 
35  NoAckNeeded,
36 
38  Silenced
39  };

Constructor & Destructor Documentation

CPPCli::Event::Event ( VxSdk::IVxEvent vxEvent)

Constructor.

Implements the bookmark class.

Parameters
vxEventThe vx event.

Definition at line 8 of file Event.cpp.

8  {
9  _event = vxEvent;
10 }
VxSdk::IVxEvent * _event
Definition: Event.h:273
virtual CPPCli::Event::~Event ( )
inlinevirtual

Destructor.

Definition at line 50 of file Event.h.

50  {
51  this->!Event();
52  }
Event(VxSdk::IVxEvent *vxEvent)
Constructor.
Definition: Event.cpp:8
CPPCli::Event::!Event ( )

Finaliser.

Definition at line 12 of file Event.cpp.

12  {
13  _event->Delete();
14  _event = nullptr;
15 }
VxSdk::IVxEvent * _event
Definition: Event.h:273
virtual VxResult::Value Delete() const =0

Member Function Documentation

CPPCli::Device CPPCli::Event::_GetGeneratorDevice ( )
package

Definition at line 17 of file Event.cpp.

17  {
18  // Get the generator device for this event
19  VxSdk::IVxDevice* device = nullptr;
21 
22  // Return the device if GetGeneratorDevice was successful
23  if (result == VxSdk::VxResult::kOK)
24  return gcnew Device(device);
25 
26  // Return nullptr if GetGeneratorDevice is unsuccessful
27  return nullptr;
28 }
virtual VxResult::Value GetGeneratorDevice(IVxDevice *&device) const =0
VxSdk::IVxEvent * _event
Definition: Event.h:273
System::Collections::Generic::List< System::Collections::Generic::KeyValuePair< System::String^ , System::String^ > > CPPCli::Event::_GetProperties ( )
package

Definition at line 30 of file Event.cpp.

30  {
31  // Create a list of key value pair objects
32  System::Collections::Generic::List<System::Collections::Generic::KeyValuePair<System::String^, System::String^>>^ mList =
33  gcnew System::Collections::Generic::List<System::Collections::Generic::KeyValuePair<System::String^, System::String^>>();
34 
35  // Populate the list with the event properties
36  for (int i = 0; i < _event->propertySize; i++) {
37  System::Collections::Generic::KeyValuePair<System::String^, System::String^> kvPair(gcnew System::String(_event->properties[i]->key),
38  gcnew System::String(_event->properties[i]->value));
39 
40  mList->Add(kvPair);
41  }
42 
43  return mList;
44 }
VxKvObject ** properties
VxSdk::IVxEvent * _event
Definition: Event.h:273
char value[2048]
CPPCli::Situation CPPCli::Event::_GetSituation ( )
package

Definition at line 46 of file Event.cpp.

46  {
47  // Get the situation associated with this event
48  VxSdk::IVxSituation* situation = nullptr;
49  VxSdk::VxResult::Value result = _event->GetSituation(situation);
50 
51  // Return the situation if GetSituation was successful
52  if (result == VxSdk::VxResult::kOK)
53  return gcnew CPPCli::Situation(situation);
54 
55  // Return nullptr if GetSituation is unsuccessful
56  return nullptr;
57 }
VxSdk::IVxEvent * _event
Definition: Event.h:273
The Situation class represents a particular situation configuration that specifies how corresponding ...
Definition: Situation.h:15
virtual VxResult::Value GetSituation(IVxSituation *&situation) const =0
CPPCli::Device CPPCli::Event::_GetSourceDevice ( )
package

Definition at line 59 of file Event.cpp.

59  {
60  // Get the source device for this event
61  VxSdk::IVxDevice* device = nullptr;
63 
64  // Return the device if GetSourceDevice was successful
65  if (result == VxSdk::VxResult::kOK)
66  return gcnew Device(device);
67 
68  // Return nullptr if GetSourceDevice is unsuccessful
69  return nullptr;
70 }
virtual VxResult::Value GetSourceDevice(IVxDevice *&device) const =0
VxSdk::IVxEvent * _event
Definition: Event.h:273
CPPCli::User CPPCli::Event::_GetSourceUser ( )
package

Definition at line 72 of file Event.cpp.

72  {
73  // Get the source user associated with this event
74  VxSdk::IVxUser* user = nullptr;
75  VxSdk::VxResult::Value result = _event->GetUser(user);
76 
77  // Return the user if GetUser was successful
78  if (result == VxSdk::VxResult::kOK)
79  return gcnew CPPCli::User(user);
80 
81  // Return nullptr if GetUser is unsuccessful
82  return nullptr;
83 }
The User class represents information about a system user.
Definition: User.h:16
VxSdk::IVxEvent * _event
Definition: Event.h:273
virtual VxResult::Value GetUser(IVxUser *&user) const =0
Results::Value CPPCli::Event::Acknowledge ( )
inline

Acknowledge the event.

Returns
The Result of the request.

Definition at line 63 of file Event.h.

63 { return (Results::Value)_event->Acknowledge(); }
Value
Values that represent the result of calls to the VideoXpert system.
Definition: Utils.h:21
VxSdk::IVxEvent * _event
Definition: Event.h:273
virtual VxResult::Value Acknowledge() const =0
Results::Value CPPCli::Event::Refresh ( )
inline

Refreshes this instances properties.

Returns
The Result of updating the properties.

Definition at line 69 of file Event.h.

Value
Values that represent the result of calls to the VideoXpert system.
Definition: Utils.h:21
virtual VxResult::Value Refresh()=0
VxSdk::IVxEvent * _event
Definition: Event.h:273
Results::Value CPPCli::Event::Silence ( int  wakeup)
inline

Silence the event for a given amount of time.

Parameters
wakeupThe delay, in seconds, to apply prior to the event being brought to the user’s attention.
Returns
The Result of the request.

Definition at line 77 of file Event.h.

77 { return (Results::Value)_event->Silence(wakeup); }
Value
Values that represent the result of calls to the VideoXpert system.
Definition: Utils.h:21
VxSdk::IVxEvent * _event
Definition: Event.h:273
virtual VxResult::Value Silence(int wakeup) const =0

Member Data Documentation

VxSdk::IVxEvent* CPPCli::Event::_event
package

Definition at line 273 of file Event.h.

Property Documentation

System:: String^ CPPCli::Event::AckClientId
get

Gets the identifier of the client that set the current ackState, if any.

The client identifier.

Definition at line 83 of file Event.h.

System:: String^ CPPCli::Event::AckClientName
get

Gets the friendly name of the client that set the current AckState, if any.

The friendly name of the client.

Definition at line 92 of file Event.h.

AckStates CPPCli::Event::AckState
get

Gets the current acknowledgement state of the event.

The current acknowledgement state.

Definition at line 101 of file Event.h.

System:: DateTime CPPCli::Event::AckTime
get

Gets the time at which the current AckState was set.

The event acknowledgement time.

Definition at line 110 of file Event.h.

System:: String^ CPPCli::Event::AckUserName
get

Gets the name of the user that set the current AckState, if any.

The user name.

Definition at line 119 of file Event.h.

CPPCli:: Device^ CPPCli::Event::GeneratorDevice
get

Gets the unique identifier of the device that created and injected this event into the system.

The identifier of the generator device.

Definition at line 129 of file Event.h.

System:: String^ CPPCli::Event::GeneratorDeviceId
get

Gets the unique identifier of the device that created and injected this event into the system.

The identifier of the generator device.

Definition at line 139 of file Event.h.

System:: String^ CPPCli::Event::GeneratorDeviceName
get

Gets the friendly name of the generator device, if any.

The friendly name of the generator device.

Definition at line 148 of file Event.h.

System:: String^ CPPCli::Event::Id
get

Gets the unique identifier created by the device that generated the event.

The events unique identifier.

Definition at line 157 of file Event.h.

bool CPPCli::Event::IsInitial
get

Gets a value indicating whether the event is in its initial generated state (its ackState has not been updated).

true if the event is in its initial generated state, false if not.

Definition at line 166 of file Event.h.

System:: Collections:: Generic:: List< System:: Collections:: Generic:: KeyValuePair< System:: String^, System:: String^>>^ CPPCli::Event::Properties
get

Gets a list of the properties associated with the event, if any.

The event properties.

Definition at line 175 of file Event.h.

unsigned short CPPCli::Event::Severity
get

Gets the severity of the event, from 1 (highest) to 10 (lowest).

The event severity.

Definition at line 186 of file Event.h.

CPPCli:: Situation^ CPPCli::Event::Situation
get

Gets the type of the situation that led to the generation of this Event.

The type of the situation.

Definition at line 195 of file Event.h.

System:: String^ CPPCli::Event::SituationType
get

Gets the type of the situation that led to the generation of this Event.

The type of the situation.

Definition at line 204 of file Event.h.

System:: String^ CPPCli::Event::SourceClientId
get

Gets the client identifier of the client that was the cause of the situation, if any.

The client identifier.

Definition at line 213 of file Event.h.

CPPCli:: Device^ CPPCli::Event::SourceDevice
get

Gets the unique identifier of the device that the situation occurred on.

The unique identifier of the source device.

Definition at line 222 of file Event.h.

System:: String^ CPPCli::Event::SourceDeviceId
get

Gets the unique identifier of the device that the situation occurred on.

The unique identifier of the source device.

Definition at line 231 of file Event.h.

System:: String^ CPPCli::Event::SourceDeviceName
get

Gets the friendly name of the source device.

The friendly name of the source device.

Definition at line 240 of file Event.h.

CPPCli:: User^ CPPCli::Event::SourceUser
get

Gets the name of the user that was the cause of the situation, if any.

The user name.

Definition at line 249 of file Event.h.

System:: String^ CPPCli::Event::SourceUserName
get

Gets the name of the user that was the cause of the situation, if any.

The user name.

Definition at line 258 of file Event.h.

System:: DateTime CPPCli::Event::Time
get

Gets the time at which the situation occurred.

The event time.

Definition at line 267 of file Event.h.


The documentation for this class was generated from the following files:
  • C:/Git/VxSDK-Samples/CSharpSample/CSharpWrapper/Include/Event.h
  • C:/Git/VxSDK-Samples/CSharpSample/CSharpWrapper/Source/Event.cpp