152
Action Methods
AddActionByEvId ( Ev
AddActionByEvId ( Ev
AddActionByEvId ( Ev
AddActionByEvId ( EventId, Name, Type, Delay, DutyCycle, StopAfter,
entId, Name, Type, Delay, DutyCycle, StopAfter,
entId, Name, Type, Delay, DutyCycle, StopAfter,
entId, Name, Type, Delay, DutyCycle, StopAfter,
Port, Output )
Port, Output )
Port, Output )
Port, Output )
Creates an Action for an Event, specified by the Event ID.
Syntax
HRESULT AddActionByEvId(
[in] long EventId,
[in] BSTR Name,
[in] long Type,
[in] double Delay,
[in] double DutyCycle,
[in] long StopAfter,
[in] BSTR Port,
[in] BSTR Output,
[out, retval] VARIANT_BOOL* Success
);
Parameters
EventId
[in] ID of the Event to add the Action to.
Name
[in] Name to give the new Action.
Type
[in] Type of Action, e.g. Serial, Variable, etc.
Delay
[in] Number of seconds to delay before sending
Output
to
Port
. This is a real number, and
non-integer values are allowed.
DutyCycle
[in] Number of seconds to delay between each successive execution of the Action. This is a
real number, and non-integer values are allowed.
StopAfter
[in] Number of times to repeat the Action. Set to
-1
to repeat infinitely.
Port
[in] Location where the output is sent.
Output
[in] Data that should be output.
Success
[out, retval] TRUE if a new Action was created with the specified settings, FALSE if creating
the Action failed.
Remarks
Action types that the WACI supports, depend on the device’s hardware capabilities (see
GetActionType (
ActionId )
, page
160
for valid type values).
The value of
Port
represents where the Action is going to send its output (see
GetActionPort ( ActionId )
,
page
159
for details on valid port values).
The value for
Output
depends on the value of
Type
(see
GetActionOutput ( ActionId )
, page
158
for more
information on valid values for
Output
).