SetDeviceKey
Top  Previous  Next

Description

Configures the action device key register of the device (camera).


Syntax


[VB]
objActiveGige.SetDeviceKey DeviceKey


[C/C++]
HRESULT SetDeviceKey (short DeviceKey)


Data Types
[VB]

DeviceKey: Long


Parameters
[C/C++]

DeviceKey [in]  
The 32-bit value of the device key for the current device. The device will only assert an Action Command sent by an application if the device's DeviceKey matches the device key parameter transmitted in the action command.  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  
 

Example

The following VB example configures the camera for a specific the device key and action conditions, and then fires a corresponding action command.

Private Sub
 Form_Load()
ActiveGigE1.SetDeviceKey 24
ActiveGigE1.SetActionConditions 1,0,7
End Sub


Private Sub
 OnButtonActionCommand()
ActiveGigE1.SendActionCommand 24,0,7
End Sub


Remarks


The following four conditions must be met for an action command to be asserted by the device:
1) ActiveGigE or a third-party application/receiver must have a master control over the device.  
2) The Device Key parameter of the action command sent by an application and the DeviceKey assigned to the device must be equal.  
3) The Group Key parameter of the of the action command sent by an application and the GroupKey assigned to the corresponding device action must be equal.  
4) The logical AND-wise operation of the Group Mask parameter of the action command sent by an application and the GroupMask assigned to the corresponding device action must be non-zero. In other words, they must have at least one common bit at the same position.  
 
For more information on the Action functionality refer to SetActionConditions and SendActionCommand.