|
clkmgr 2.0
Clock Manager API library to receive events from the PTP service
|
C wrapper to the Clock Manager APIs to set up Client and monitor clock synchronization events. More...
#include "pub/clkmgr/types_c.h"#include "pub/clkmgr/timebase_configs_c.h"#include "pub/clkmgr/subscription_c.h"#include "pub/clkmgr/event_c.h"#include <time.h>
Go to the source code of this file.
Functions | |
| bool | clkmgr_connect () |
| bool | clkmgr_disconnect () |
| size_t | clkmgr_getTimebaseCfgsSize () |
| bool | clkmgr_subscribeByName (const Clkmgr_Subscription *sub_c, const char *timeBaseName, Clkmgr_ClockSyncData *data_c) |
| bool | clkmgr_subscribe (const Clkmgr_Subscription *sub_c, size_t timeBaseIndex, Clkmgr_ClockSyncData *data_c) |
| enum Clkmgr_StatusWaitResult | clkmgr_statusWaitByName (int timeout, const char *timeBaseName, Clkmgr_ClockSyncData *data_c) |
| enum Clkmgr_StatusWaitResult | clkmgr_statusWait (int timeout, size_t timeBaseIndex, Clkmgr_ClockSyncData *data_c) |
| bool | clkmgr_getTime (struct timespec *ts) |
C wrapper to the Clock Manager APIs to set up Client and monitor clock synchronization events.
| bool clkmgr_connect | ( | ) |
Connect the client
| bool clkmgr_disconnect | ( | ) |
Disconnect the client
| bool clkmgr_getTime | ( | struct timespec * | ts | ) |
Retrieve the time of the CLOCK_REALTIME
| [out] | ts | timestamp of the CLOCK_REALTIME |
| size_t clkmgr_getTimebaseCfgsSize | ( | ) |
Get the size of the time base configurations
| enum Clkmgr_StatusWaitResult clkmgr_statusWait | ( | int | timeout, |
| size_t | timeBaseIndex, | ||
| Clkmgr_ClockSyncData * | data_c | ||
| ) |
Waits for a specified timeout period for any event changes
| [in] | timeout | TThe timeout in seconds. If timeout is 0, the function will check event changes once. If timeout is -1, the function will wait until there is event changes occurs |
| [in] | timeBaseIndex | Index of the time base to be monitored |
| [out] | data_c | Pointer to the Clkmgr_ClockSyncData |
| enum Clkmgr_StatusWaitResult clkmgr_statusWaitByName | ( | int | timeout, |
| const char * | timeBaseName, | ||
| Clkmgr_ClockSyncData * | data_c | ||
| ) |
Waits for a specified timeout period for any event changes by name of the time base
| [in] | timeout | The timeout in seconds. If timeout is 0, the function will check event changes once. If timeout is -1, the function will wait until there is event changes occurs |
| [in] | timeBaseName | Name of the time base to be monitored |
| [out] | data_c | Pointer to the Clkmgr_ClockSyncData |
| bool clkmgr_subscribe | ( | const Clkmgr_Subscription * | sub_c, |
| size_t | timeBaseIndex, | ||
| Clkmgr_ClockSyncData * | data_c | ||
| ) |
Subscribe to client events
| [in] | sub_c | Pointer to the Clkmgr_Subscription |
| [in] | timeBaseIndex | Index of the time base to be subscribed |
| [out] | data_c | Pointer to the Clkmgr_ClockSyncData |
| bool clkmgr_subscribeByName | ( | const Clkmgr_Subscription * | sub_c, |
| const char * | timeBaseName, | ||
| Clkmgr_ClockSyncData * | data_c | ||
| ) |
Subscribe to client events by name for the time base
| [in] | sub_c | Pointer to the Clkmgr_Subscription |
| [in] | timeBaseName | Name of the time base to be subscribed |
| [out] | data_c | Pointer to the Clkmgr_ClockSyncData |