. |
mpiControlClientCountSet Declaration
Description mpiControlClientCountSet sets the number of client connections to be used by the MPIControl object when connecting to remote controllers. Increasing the number of connections will improve performance of multi-threaded client MPI applications. mpiControlClientCountSet must be called between mpiControlCreate(…) and mpiControlInit(…). Once mpiControlInit(…) has been called, it is not possible to change the number of clients used to communicate to the server. Note: The MPI application utility (apputil) library’s Service, CacheService, and HostService objects all spawn a single thread. It is recommended that an application set clientCount to the number of threads the application directly creates that will access the remote controller plus one for each of the Service, CacheService, and HostService objects created.
Sample Code /* Create and initialize MPI objects */ void programInit(MPIControl *control, MPIControlType controlType, MPIControlAddress *controlAddress, long clientCount) { long returnValue; /* Create motion controller object */ *control = mpiControlCreate(controlType, controlAddress); msgCHECK(mpiControlValidate(*control)); /* Set the MPIControl object's client connection count */ returnValue = mpiControlClientCountSet(*control, clientCount); msgCHECK(returnValue); /* Initialize motion controller */ returnValue = mpiControlInit(*control); msgCHECK(returnValue); } See Also
|
| | Copyright © 2001-2021 Motion Engineering |