How do I eliminate the long startup delay on some VxWorks targets with no file system?
Note: Applies to RTI Connext 4.x and above.
RTI Connext calls fopen()
to load the default XML and NDDS_DISCOVERY_PEERS files if they exist.
On some VxWorks targets that either have no file system or use NFS, FTP, or some other network-based file system, and the file system is not mounted, RTI Connext can take a long time to initialize. In some cases, the delay is several minutes. This is caused by the fopen()
system call waiting on a network or some timeout condition which can vary from system to system.
To work around this, you can configure RTI Connext not to use any of the default QoS profiles that are normally loaded during DomainParticipant creation, as follows:
factoryQos.profile.ignore_resource_profile = DDS_BOOLEAN_TRUE; factoryQos.profile.ignore_user_profile = DDS_BOOLEAN_TRUE;
For more information on the PROFILE QoS policy, see Section 8.4.1 in the RTI Connext Core Libraries and Utilities User’s Manual.
However, RTI Connext will still look for the existence of the file NDDS_DISCOVERY_PEERS in the current working directory; this action currently cannot be disabled. A solution for this is to set the current working directory to "/null" so that fopen()
will return immediately with a NULL pointer rather than waiting for a network or other timeout condition. This can be done with the following VxWorks include and system call:
#include <usrLib.h> cd(“/null”);
To avoid any related file I/O delays, you should make this call prior to calling any RTI Connext functions.