AddActionByEvName ( EventName, Name, Type, Delay, DutyCycle,
StopAfter, Port, Output )
Creates an Action for an Event, specified by the Event name.
Syntax
HRESULT AddActionByEvName(
[in] BSTR EventName,
[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
EventName
[in] ID 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 executions 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] The value of this parameter depends on the value of
Type
.
Success
[out, retval] TRUE if specified Action settings were created, FALSE if creating 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
).
DeleteActionById ( ActionId )
Delete an Action with the given ID.
14