fsp_plms_Connect()

QNX SDP8.0PLMS User's GuideAPIConfigurationDeveloper

Connect to a QPLMS instance

Synopsis:

#include <fsp/plms.h>

fsp_plms_HandleType* fsp_plms_Connect( const char *plms_name,
                                       int flags ); 

Arguments:

plms_name
The name of the PLMS instance to connect to; a NULL-terminated string.
flags
One of the following:
FSP_PLMS_HB_NONE
None.
FSP_PLMS_SETUP_PROCESS_HB
Set up heartbeat from the process to PLMS.
FSP_PLMS_SETUP_PLMS_HB

Set up heartbeat from PLMS to the process.

Library:

libplms

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

Description:

The fsp_plms_Connect() call connects to the given PLMS instance. The plms_name must match the instance name specified with the -l option when the PLMS was started.

If NULL is used for plms_name, then the default name plms will be used. Any subsequent fsp_plms_*() call must use the plms_hdl to address the right QPLMS instance.

If the process is started by PLMS, and the component is configured with the watchdog task, then the process uses the FSP_PLMS_SETUP_PROCESS_HB flag to set up the heartbeat setup mechanism. After the successful fsp_plms_Connect() call, the client can call fsp_plms_WatchdogHeartbeat() to send the heartbeat to the PLMS.

Multiple connections from either the same or different client are supported.

Returns:

Returns plms_hdl on success or NULL on error.

Errors:

ENOSYS

The resource manager ID is incorrect.

EBADMSG

The resource manager received an incomplete or combined client message.

Example:

fsp_plms_HandleType *plms_hdl= fsp_plms_Connect(NULL, 0);
Page updated: