Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_control.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_control.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_control.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_control.html on line 8

ham_action_control()

Perform control operations on an action object in a HAM

Synopsis:

#include <ha/ham.h>

int ham_action_control( ham_action_t *ahdl,
                        int command,
                        unsigned flags);

Library:

libham

Description:

The ham_action_control() function can be used to control the state of an action object in a HAM. This function is designed to be extensible with additional commands. Currently, the following commands are defined:

HENABLE
Enable the action.
HDISABLE
Disable the action.
HADDFLAGS
Add the flags.
HREMOVEFLAGS
Remove the flags.
HSETFLAGS
Set the flags to the given value.
HGETFLAGS
Get the current flags.

When an action item is enabled (the default), it's executed when the condition associated with it is triggered. When an action item is disabled, the action isn't executed when the condition associated with it is triggered. Individual conditions and entities can be enabled and disabled using the corresponding control functions for conditions and entities, respectively.

The add flags, remove flags, and set flags commands can be used to modify the set of flags associated with the entity being controlled. Add flags and remove flags are used to either add to or remove from the current set of flags, the specified set of flags (as given in flags). The set flags function is called when the current set of flags is to be replaced by flags.

Flags

Any flag that is valid for the corresponding action can be used when ham_action_control() is being used to set flags, with the exception of HACTIONDONOW.

For the HENABLE and HDISABLE commands:

HRECURSE
Applies the command recursively.

Returns:

For the enable, disable, add flags, remove flags, and set flags functions:

0
Success.
-1
An error occurred (errno is set).

For the get flags function:

flags
Success.
-1
An error occurred (errno is set).

Errors:

EBADF
Couldn't connect to the HAM.
EINVAL
The command or flags variable is invalid.

In addition to the above errors, the HAM returns any error it encounters while servicing this request.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

ham_condition_control(), ham_entity_control()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_control.html on line 198

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_action_control.html on line 198