SetActionConditions
Top  Previous  Next

Description

Configures the device for the asserting conditions of the specified action task.


Syntax


[VB]
objActiveGige.SetActionConditions ActionIndex, GroupKey, GroupMask


[C/C++]
HRESULT SetActionConditions (short ActionIndex, long GroupKey, long GroupMask)


Data Types
[VB]

ActionIndex: Short
GroupKey:
Long
GroupMask
: Long


Parameters
[C/C++]

ActionIndex [in]  
The 1-based integer index of the device's action task to which further parameters will be applied. If the device supports only one action task, this parameter must be set to 1.  
GroupKey [in]  
The 32-bit value of the group key for the specified ActionIndex. The device will only assert an Action Command sent by an application if the device's group key matches the group key parameter transmitted in the action command. Different action tasks on the device can be assigned different group keys.  
GroupMask [in]  
The 32-bit value of the group mask for the specified ActionIndex.. The device will only assert an Action Command sent by an application if the AND-wise application of the device's group mask against the group mask in the action command results in a non-zero value . Different action tasks on the device can be assigned different group masks.  


Return Values


S_OK  
Success  
E_FAIL  
Failure  

Example

The following VB example configures the camera for two different action conditions. The camera is assumed to support two action tasks, with the group key 11 being assigned to "Action1" and group key 12 to "Action2". An action command broadcast upon a button click will cause the camera to perform the "Action1" task.

Private Sub
 Form_Load()
ActiveGigE1.SetDeviceKey 24
ActiveGigE1.SetActionConditions 1,11,7
ActiveGigE1.SetActionConditions 2,12,7
ActiveGigE1.SetFeature "TriggerSource","Action1"
ActiveGigE1.Trigger=
True

ActiveGige1.Acquire=
True

End Sub


Private Sub
 OnButtonActionCommand()
ActiveGigE1.SendActionCommand 24,11,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 SendActionCommand.