SetActionByIdx ( EventId, Idx, Name, Type, Delay, DutyCycle,
StopAfter, Port, Output )
Modifies an Action specified by its associated Event ID and index.
Syntax
HRESULT SetActionByIdx(
[in] long EventId,
[in] long Idx,
[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
Event ID
[in] ID of the Event that contains the Action.
Idx
[in] Index of the Action in the Event’s Action list.
Name
[in] Name to use for the 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 specified Action’s settings were updated, FALSE if updating the Action
failed.
Remarks
Action types that the WACI supports, depend on the device’s hardware capabilities (see GetActionType
( ActionId ), page
for valid type values).
The value of
Port
represents where the Action is going to send its output (see GetActionPort ( ActionId ),
for details on valid port values).
The value for
Output
depends on the value of
Type
(see GetActionOutput ( ActionId ), page
for more
information on valid values for
Output
).
SetActionByName ( EventId, Name, Type, Delay, DutyCycle, StopAfter,
Port, Output )
Modifies an Action specified by its associated Event ID and Action name.
15