Snapdragon® Telematics Application Framework (TelAF) Interface Specification
|
Go to the source code of this file.
Data Structures | |
struct | le_clk_Time_t |
Macros | |
String Formats | |
Pre-defined formats for converting time to string format. These pre-defined formats use the conversion specifiers from strftime(). | |
#define | LE_CLK_STRING_FORMAT_DATE_TIME "%c" |
Preferred date and time format for current locale, e.g. "Mon Jan 21 13:37:05 2013". More... | |
#define | LE_CLK_STRING_FORMAT_DATE "%x" |
Preferred date format for current locale, e.g. "01/21/13". More... | |
#define | LE_CLK_STRING_FORMAT_TIME "%X" |
Preferred time format for current locale, e.g. "13:37:05". More... | |
Functions | |
le_clk_Time_t | le_clk_GetRelativeTime (void) |
le_clk_Time_t | le_clk_GetAbsoluteTime (void) |
le_clk_Time_t | le_clk_Add (le_clk_Time_t timeA, le_clk_Time_t timeB) |
bool | le_clk_GreaterThan (le_clk_Time_t timeA, le_clk_Time_t timeB) |
bool | le_clk_Equal (le_clk_Time_t timeA, le_clk_Time_t timeB) |
le_clk_Time_t | le_clk_Sub (le_clk_Time_t timeA, le_clk_Time_t timeB) |
le_clk_Time_t | le_clk_Multiply (le_clk_Time_t timeA, int scaleFactor) |
le_result_t | le_clk_GetUTCDateTimeString (const char *formatSpecStrPtr, char *destStrPtr, size_t destSize, size_t *numBytesPtr) |
le_result_t | le_clk_GetLocalDateTimeString (const char *formatSpecStrPtr, char *destStrPtr, size_t destSize, size_t *numBytesPtr) |
le_result_t | le_clk_ConvertToUTCString (le_clk_Time_t time, const char *formatSpecStrPtr, char *destStrPtr, size_t destSize, size_t *numBytesPtr) |
le_result_t | le_clk_ConvertToLocalTimeString (le_clk_Time_t time, const char *formatSpecStrPtr, char *destStrPtr, size_t destSize, size_t *numBytesPtr) |
le_result_t | le_clk_SetAbsoluteTime (le_clk_Time_t absoluteTime) |
LE_FULL_API le_result_t | le_clk_ConvertToTime (const char *formatSpecStrPtr, const char *srcStrPtr, le_clk_Time_t *timePtr) |
LE_FULL_API le_result_t | le_clk_SetUTCDateTimeString (const char *formatSpecStrPtr, const char *srcStrPtr) |
le_result_t | le_clk_SetTimezoneFile (const int32_t timezoneOffsetSeconds, const uint8_t dstOffsetHours) |
Legato System Clock API include file.
Copyright (C) Sierra Wireless Inc.
#define LE_CLK_STRING_FORMAT_DATE_TIME "%c" |
Preferred date and time format for current locale, e.g. "Mon Jan 21 13:37:05 2013".
#define LE_CLK_STRING_FORMAT_DATE "%x" |
Preferred date format for current locale, e.g. "01/21/13".
#define LE_CLK_STRING_FORMAT_TIME "%X" |
Preferred time format for current locale, e.g. "13:37:05".
le_clk_Time_t le_clk_GetRelativeTime | ( | void | ) |
Get relative time since a fixed but unspecified starting point.
le_clk_Time_t le_clk_GetAbsoluteTime | ( | void | ) |
Get absolute time since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
le_clk_Time_t le_clk_Add | ( | le_clk_Time_t | timeA, |
le_clk_Time_t | timeB | ||
) |
Add two time values together, and return the result.
bool le_clk_GreaterThan | ( | le_clk_Time_t | timeA, |
le_clk_Time_t | timeB | ||
) |
Compare two time values.
bool le_clk_Equal | ( | le_clk_Time_t | timeA, |
le_clk_Time_t | timeB | ||
) |
Compare two time values.
le_clk_Time_t le_clk_Sub | ( | le_clk_Time_t | timeA, |
le_clk_Time_t | timeB | ||
) |
Subtract two time values, and return the result.
le_clk_Time_t le_clk_Multiply | ( | le_clk_Time_t | timeA, |
int | scaleFactor | ||
) |
Multiply the time by a scale factor, and return the result
le_result_t le_clk_GetUTCDateTimeString | ( | const char * | formatSpecStrPtr, |
char * | destStrPtr, | ||
size_t | destSize, | ||
size_t * | numBytesPtr | ||
) |
Get the UTC date/time as a formatted string.
The formatted date/time string, including NULL-terminator, will be copied to the destination buffer, provided it fits, and the number of bytes copied (not including the NULL-terminator) will be returned in numBytesPtr.
If the formatted date/time string does not fit in the destination buffer, the contents of the destination buffer will be undefined and the value returned in numBytesPtr will be zero.
[in] | formatSpecStrPtr | Format specifier string, using conversion specifiers defined for strftime(). |
[out] | destStrPtr | Destination for the formatted date/time string |
[in] | destSize | Size of the destination buffer in bytes. |
[out] | numBytesPtr | Number of bytes copied, not including NULL-terminator. Parameter can be set to NULL if the number of bytes copied is not needed. |
le_result_t le_clk_GetLocalDateTimeString | ( | const char * | formatSpecStrPtr, |
char * | destStrPtr, | ||
size_t | destSize, | ||
size_t * | numBytesPtr | ||
) |
Get the Local date/time as a formatted string.
The formatted date/time string, including NULL-terminator, will be copied to the destination buffer, provided it fits, and the number of bytes copied (not including the NULL-terminator) will be returned in numBytesPtr.
If the formatted date/time string does not fit in the destination buffer, then the contents of the destination buffer will be undefined, and the value returned in numBytesPtr will be zero.
[in] | formatSpecStrPtr | Format specifier string, using conversion specifiers defined for strftime(). |
[out] | destStrPtr | Destination for the formatted date/time string |
[in] | destSize | Size of the destination buffer in bytes. |
[out] | numBytesPtr | Number of bytes copied, not including NULL-terminator. Parameter can be set to NULL if the number of bytes copied is not needed. |
le_result_t le_clk_ConvertToUTCString | ( | le_clk_Time_t | time, |
const char * | formatSpecStrPtr, | ||
char * | destStrPtr, | ||
size_t | destSize, | ||
size_t * | numBytesPtr | ||
) |
Generate a printable string representation of a given absolute date/time value as UTC time (no timezone offset applied).
The formatted date/time string, including NULL-terminator, will be copied to the destination buffer, provided it fits, and the number of bytes copied (not including the NULL-terminator) will be returned in numBytesPtr.
If the formatted date/time string does not fit in the destination buffer, the contents of the destination buffer will be undefined and the value returned in numBytesPtr will be zero.
[in] | time | date/time to convert |
[in] | formatSpecStrPtr | Format specifier string, using conversion specifiers defined for strftime(). |
[out] | destStrPtr | Destination for the formatted date/time string |
[in] | destSize | Size of the destination buffer in bytes. |
[out] | numBytesPtr | Number of bytes copied, not including NULL-terminator. Parameter can be set to NULL if the number of bytes copied is not needed. |
le_result_t le_clk_ConvertToLocalTimeString | ( | le_clk_Time_t | time, |
const char * | formatSpecStrPtr, | ||
char * | destStrPtr, | ||
size_t | destSize, | ||
size_t * | numBytesPtr | ||
) |
Generate a printable string representation of a given absolute date/time value as a local time (with timezone offset applied).
The formatted date/time string, including NULL-terminator, will be copied to the destination buffer, provided it fits, and the number of bytes copied (not including the NULL-terminator) will be returned in numBytesPtr.
If the formatted date/time string does not fit in the destination buffer, then the contents of the destination buffer are undefined, and the value returned in numBytesPtr is zero.
[in] | time | date/time to convert |
[in] | formatSpecStrPtr | Format specifier string, using conversion specifiers defined for strftime(). |
[out] | destStrPtr | Destination for the formatted date/time string |
[in] | destSize | Size of the destination buffer in bytes. |
[out] | numBytesPtr | Number of bytes copied, not including NULL-terminator. Parameter can be set to NULL if the number of bytes copied is not needed. |
le_result_t le_clk_SetAbsoluteTime | ( | le_clk_Time_t | absoluteTime | ) |
Set absolute time since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
[in] | absoluteTime | Absolute time in seconds/microseconds |
LE_FULL_API le_result_t le_clk_ConvertToTime | ( | const char * | formatSpecStrPtr, |
const char * | srcStrPtr, | ||
le_clk_Time_t * | timePtr | ||
) |
Generate an absolute date/time value as UTC time representation of a given printable string representation (no timezone offset applied).
[in] | formatSpecStrPtr | Format specifier string, using conversion specifiers defined for strptime(). |
[in] | srcStrPtr | Formatted date/time string. |
[out] | timePtr | Converted date/time. |
LE_FULL_API le_result_t le_clk_SetUTCDateTimeString | ( | const char * | formatSpecStrPtr, |
const char * | srcStrPtr | ||
) |
Set the UTC date/time as a formatted string.
[in] | formatSpecStrPtr | Format specifier string, using conversion specifiers defined for strptime(). |
[in] | srcStrPtr | Formatted date/time string. |
le_result_t le_clk_SetTimezoneFile | ( | const int32_t | timezoneOffsetSeconds, |
const uint8_t | dstOffsetHours | ||
) |
Set the timezone information
[in] | timezoneOffsetSeconds | Timezone offset in seconds |
[in] | dstOffsetHours | Daylight savings adjustment in hours |