fsp_plms_Action()

QNX SDP8.0PLMS User's GuideAPIConfigurationDeveloper

Perform operations on a component or module.

Synopsis:

#include <fsp/plms.h>

fsp_ResultType fsp_plms_Action( fsp_plms_HandleType *plms_hdl,
                                fsp_plms_ActionType action_type,
                                char *node ); 

Arguments:

plms_hdl
The PLMS handle returned in fsp_plms_Connect().
action_type
The supported actions are:
  • FSP_PLMS_CTRL_ACTION_NONE — No action performed. Returns success if the node exists in PLMS, otherwise, failure.
  • FSP_PLMS_CTRL_ACTION_START — The given node will be started. If the node is not found, then fsp_plms_Action() returns an error.
  • FSP_PLMS_CTRL_ACTION_STOP — The given node will be stopped. If the node is not found, then fsp_plms_Action() returns an error.
  • FSP_PLMS_CTRL_ACTION_RESTART — The given node will be restarted. If the node is not found then fsp_plms_Action() returns an error.
  • FSP_PLMS_CTRL_ACTION_SHUTDOWN — Currently, this functions the same as FSP_PLMS_CTRL_ACTION_SHUTDOWN_FAST.
  • FSP_PLMS_CTRL_ACTION_SHUTDOWN_FAST — plms exits without shutting down the running component. When plms exits, if any processes it started continue running, and become zombie processes when they terminate.
node
The component name, module name, or NULL. The component name or module name must be a NULL-terminated string.

Library:

libplms

Use the -l plms option to qcc to link against this library.

Description:

The fsp_plms_Action() call is used to execute an action on a component, module, or plms. The caller must have the plms/control ability to use this call. The fsp_plms_Action() call is an asynchronous call. If the requested node is found, then plms will queue the actions to be performed and returns the call immediately. The client can use fsp_plms_GetComponentStatus() to get the actual status of the node.

Returns:

Returns FSP_PLMS_STATUS_EOK on success, or FSP_PLMS_STATUS_FAIL on error and sets errno.

Errors:

EINVAL
Invalid input parameters or node is not found in PLMS data.
EBADMSG
Resource manager received invalid or combined client message.
ENOSYS
Resource manager received client message with incorrect extended type.
EAGAIN
PLMS cannot create the requested action.

Example:

fsp_plms_Action(plms_hdl, FSP_PLMS_CTRL_ACTION_START, “sshd”);
Page updated: