|
Check if the gpsd is running and optionally return number of clients using this library. The function can be called periodically in application in order to check if the gpsd is running and how many other processes are using gpsd service at the moment.
- Parameters:
-
| ctx | context returned by gpsmgr_start(), optional. If the param is not given, then num_of_clients cannot be returned. |
| num_of_clients | if user supplies this then the API will place number of library users to it (only when mode is set to GPSMGR_MODE_JUST_CHECK) |
| mode | if set to GPSMGR_MODE_JUST_CHECK, then the library just checks if the gpsd is running. The value GPSMGR_MODE_LOCK_IF_POSSIBLE means that the library locks the gpsd lockfile (which means that gpsd is running) if the gpsd is not yet running. In this case the caller should call gpsmgr_start() to really start the gpsd. |
- Return values:
-
| GPSMGR_NOT_RUNNING | not running or an error happened |
| GPSMGR_RUNNING | running |
| GPSMGR_READY_TO_RUN | was not running, but is now ready to be run |
| GPSMGR_RESTART | if the system requires that API is to be restarted e.g., because of configuration change etc |
|