|
ASN1C C/C++ Common Runtime
ASN1C v7.8.x
|
Functions | |
| int | rtxDateToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| int | rtxTimeToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| int | rtxDateTimeToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| int | rtxGYearToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| int | rtxGYearMonthToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| int | rtxGMonthToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| int | rtxGMonthDayToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| int | rtxGDayToString (const OSNumDateTime *pvalue, OSUTF8CHAR *buffer, size_t bufsize) |
| int | rtxGetCurrDateTime (OSNumDateTime *pvalue) |
| int | rtxGetCurrDateTimeString (char *buffer, OSSIZE bufsize, OSBOOL local) |
| int | rtxCmpDate (const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2) |
| int | rtxCmpDate2 (const OSNumDateTime *pvalue, OSINT32 year, OSUINT8 mon, OSUINT8 day, OSBOOL tzflag, OSINT32 tzo) |
| int | rtxCmpTime (const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2) |
| int | rtxCmpTime2 (const OSNumDateTime *pvalue, OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo) |
| int | rtxCmpDateTime (const OSNumDateTime *pvalue1, const OSNumDateTime *pvalue2) |
| int | rtxCmpDateTime2 (const OSNumDateTime *pvalue, OSINT32 year, OSUINT8 mon, OSUINT8 day, OSUINT8 hour, OSUINT8 min, OSREAL sec, OSBOOL tzflag, OSINT32 tzo) |
| int | rtxParseDateString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue) |
| int | rtxParseTimeString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue) |
| int | rtxParseDateTimeString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue) |
| int | rtxParseGYearString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue) |
| int | rtxParseGYearMonthString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue) |
| int | rtxParseGMonthString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue) |
| int | rtxParseGMonthDayString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue) |
| int | rtxParseGDayString (const OSUTF8CHAR *inpdata, size_t inpdatalen, OSNumDateTime *pvalue) |
| int | rtxMSecsToDuration (OSINT32 msecs, OSUTF8CHAR *buf, OSUINT32 bufsize) |
| int | rtxDurationToMSecs (OSUTF8CHAR *buf, OSUINT32 bufsize, OSINT32 *msecs) |
| int | rtxSetDateTime (OSNumDateTime *pvalue, struct tm *timeStruct) |
| int | rtxGetGMTime (struct tm *pvalue, time_t timeMs) |
| int | rtxGetLocalTime (struct tm *pvalue, time_t timeMs) |
| int | rtxSetLocalDateTime (OSNumDateTime *pvalue, time_t timeMs) |
| int | rtxSetUtcDateTime (OSNumDateTime *pvalue, time_t timeMs) |
| int | rtxGetDateTime (const OSNumDateTime *pvalue, time_t *timeMs) |
| OSBOOL | rtxDateIsValid (const OSNumDateTime *pvalue) |
| OSBOOL | rtxTimeIsValid (const OSNumDateTime *pvalue) |
| OSBOOL | rtxDateTimeIsValid (const OSNumDateTime *pvalue) |
| int | rtxAscTime (char *buffer, OSSIZE bufsize, struct tm *pvalue) |
These functions handle the conversion of date/time to and from various internal formats to XML schema standard string forms.
| int rtxAscTime | ( | char * | buffer, |
| OSSIZE | bufsize, | ||
| struct tm * | pvalue | ||
| ) |
This function returns a string representation of the given date/time structure. It is similar to the std::asctime function except uses the secure version of asctime (asctime_s) for Windows.
| buffer | Character array into which to write characetr data. |
| bufsize | Size of the character buffer. |
| pvalue | Pointer value to convert. |
| int rtxCmpDate | ( | const OSNumDateTime * | pvalue1, |
| const OSNumDateTime * | pvalue2 | ||
| ) |
This function compares the date part of two OSNumDateTime structures and returns the result of the comparison.
| pvalue1 | Pointer to OSNumDateTime structure. |
| pvalue2 | Pointer to OSNumDateTime structure. |
| int rtxCmpDate2 | ( | const OSNumDateTime * | pvalue, |
| OSINT32 | year, | ||
| OSUINT8 | mon, | ||
| OSUINT8 | day, | ||
| OSBOOL | tzflag, | ||
| OSINT32 | tzo | ||
| ) |
This function compares the date part of OSNumDateTime structure and date components, specified as parameters.
| pvalue | Pointer to OSNumDateTime structure. |
| year | Year (-inf..inf) |
| mon | Month (1..12) |
| day | Day (1..31) |
| tzflag | TRUE, if time zone offset is set (see tzo parameter). |
| tzo | Time zone offset (-840..840). |
| int rtxCmpDateTime | ( | const OSNumDateTime * | pvalue1, |
| const OSNumDateTime * | pvalue2 | ||
| ) |
This function compares two OSNumDateTime structures and returns the result of the comparison.
| pvalue1 | Pointer to OSNumDateTime structure. |
| pvalue2 | Pointer to OSNumDateTime structure. |
| int rtxCmpDateTime2 | ( | const OSNumDateTime * | pvalue, |
| OSINT32 | year, | ||
| OSUINT8 | mon, | ||
| OSUINT8 | day, | ||
| OSUINT8 | hour, | ||
| OSUINT8 | min, | ||
| OSREAL | sec, | ||
| OSBOOL | tzflag, | ||
| OSINT32 | tzo | ||
| ) |
This function compares the OSNumDateTime structure and dateTime components, specified as parameters.
| pvalue | Pointer to OSNumDateTime structure. |
| year | Year (-inf..inf) |
| mon | Month (1..12) |
| day | Day (1..31) |
| hour | Hour (0..23) |
| min | Minutes (0..59) |
| sec | Seconds (0.0..59.(9)) |
| tzflag | TRUE, if time zone offset is set (see tzo parameter). |
| tzo | Time zone offset (-840..840). |
| int rtxCmpTime | ( | const OSNumDateTime * | pvalue1, |
| const OSNumDateTime * | pvalue2 | ||
| ) |
This function compares the time part of two OSNumDateTime structures and returns the result of the comparison.
| pvalue1 | Pointer to OSNumDateTime structure. |
| pvalue2 | Pointer to OSNumDateTime structure. |
| int rtxCmpTime2 | ( | const OSNumDateTime * | pvalue, |
| OSUINT8 | hour, | ||
| OSUINT8 | min, | ||
| OSREAL | sec, | ||
| OSBOOL | tzflag, | ||
| OSINT32 | tzo | ||
| ) |
This function compares the time part of OSNumDateTime structure and time components, specified as parameters.
| pvalue | Pointer to OSNumDateTime structure. |
| hour | Hour (0..23) |
| min | Minutes (0..59) |
| sec | Seconds (0.0..59.(9)) |
| tzflag | TRUE, if time zone offset is set (see tzo parameter). |
| tzo | Time zone offset (-840..840). |
| OSBOOL rtxDateIsValid | ( | const OSNumDateTime * | pvalue | ) |
This function verifies that date members (year, month, day, timezone) of the OSNumDateTime structure contains valid values.
| pvalue | Pointer to OSNumDateTime structure to be checked. |
| OSBOOL rtxDateTimeIsValid | ( | const OSNumDateTime * | pvalue | ) |
This function verifies that all members of the OSNumDateTime structure contains valid values.
| pvalue | Pointer to OSNumDateTime structure to be checked. |
| int rtxDateTimeToString | ( | const OSNumDateTime * | pvalue, |
| OSUTF8CHAR * | buffer, | ||
| size_t | bufsize | ||
| ) |
This function formats a numeric date/time value of all components in the OSNumDateTime structure into XML schema standard format (CCYY-MM-DDTHH:MM:SS[.frac][TZ]).
| pvalue | Pointer to OSNumDateTime structure containing date/time components to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string. |
| bufsize | Size of the buffer to receive the formatted date. |
| int rtxDateToString | ( | const OSNumDateTime * | pvalue, |
| OSUTF8CHAR * | buffer, | ||
| size_t | bufsize | ||
| ) |
This function formats a numeric date value consisting of individual date components (year, month, day) into XML schema standard format (CCYY-MM-DD).
| pvalue | Pointer to OSNumDateTime structure containing date components to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is at least nine bytes long to hold the formatted date and a null-terminator character. |
| bufsize | Size of the buffer to receive the formatted date. |
| int rtxDurationToMSecs | ( | OSUTF8CHAR * | buf, |
| OSUINT32 | bufsize, | ||
| OSINT32 * | msecs | ||
| ) |
This function converts a duration string to milliseconds. In the case of a string prepended with a minus sign (-) the duration in milliseconds will have negative value.
| buf | Pointer to OSUTF8CHAR array. |
| bufsize | OSINT32 indicates the bufsize to be read. |
| msecs | OSINT32 updated after calculation. |
| int rtxGDayToString | ( | const OSNumDateTime * | pvalue, |
| OSUTF8CHAR * | buffer, | ||
| size_t | bufsize | ||
| ) |
This function formats a gregorian day value to a string (DD).
| pvalue | Pointer to OSNumDateTime structure containing day value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 3 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
| int rtxGetCurrDateTime | ( | OSNumDateTime * | pvalue | ) |
This function reads the system date and time and stores the value in the given OSNumDateTime structure variable.
| pvalue | Pointer to OSNumDateTime structure. |
| int rtxGetCurrDateTimeString | ( | char * | buffer, |
| OSSIZE | bufsize, | ||
| OSBOOL | local | ||
| ) |
This function reads the current system date and time and returns it as a formatted string. The format is that returned by the asctime system function.
| buffer | Character buffer to receive string. Buffer should be at least 32 characters in size. |
| bufsize | Size of buffer. If string will not fit in buffer, an error is returned. |
| local | True for local time, false for GMT. |
| int rtxGetDateTime | ( | const OSNumDateTime * | pvalue, |
| time_t * | timeMs | ||
| ) |
This function converts an OSNumDateTime structure to a calendar time encoded as a value of type time_t.
| pvalue | The pointed OSNumDateTime structure variable to be converted. |
| timeMs | A pointer to time_t value to be set. |
| int rtxGetGMTime | ( | struct tm * | pvalue, |
| time_t | timeMs | ||
| ) |
This function gets GM time. It provides a platform independent abstraction of the the C RTL gmtime function.
| pvalue | A pointer to tm structure to receive time value. |
| timeMs | Time value to be converted to GMT. |
| int rtxGetLocalTime | ( | struct tm * | pvalue, |
| time_t | timeMs | ||
| ) |
This function gets local time. It provides a platform independent abstraction of the the C RTL localtime function.
| pvalue | A pointer to tm structure to receive local time value. |
| timeMs | Time value to be converted to local time. |
| int rtxGMonthDayToString | ( | const OSNumDateTime * | pvalue, |
| OSUTF8CHAR * | buffer, | ||
| size_t | bufsize | ||
| ) |
This function formats a gregorian month and day value to a string (MM-DD).
| pvalue | Pointer to OSNumDateTime structure containing month and day value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 6 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
| int rtxGMonthToString | ( | const OSNumDateTime * | pvalue, |
| OSUTF8CHAR * | buffer, | ||
| size_t | bufsize | ||
| ) |
This function formats a gregorian month value to a string (MM).
| pvalue | Pointer to OSNumDateTime structure containing month value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 3 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
| int rtxGYearMonthToString | ( | const OSNumDateTime * | pvalue, |
| OSUTF8CHAR * | buffer, | ||
| size_t | bufsize | ||
| ) |
This function formats a gregorian year and month value to a string (CCYY-MM).
| pvalue | Pointer to OSNumDateTime structure containing year and month value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 8 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
| int rtxGYearToString | ( | const OSNumDateTime * | pvalue, |
| OSUTF8CHAR * | buffer, | ||
| size_t | bufsize | ||
| ) |
This function formats a gregorian year value to a string (CCYY).
| pvalue | Pointer to OSNumDateTime structure containing year value to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string (in this case, at least 5 characters long). |
| bufsize | Size of the buffer to receive the formatted date. |
| int rtxMSecsToDuration | ( | OSINT32 | msecs, |
| OSUTF8CHAR * | buf, | ||
| OSUINT32 | bufsize | ||
| ) |
This function converts millisecs to a duration string with format "PnYnMnDTnHnMnS". In case of negative duration a minus sign is prepended to the output string
| msecs | Number of milliseconds. |
| buf | Output buffer to recieve formatted duration. |
| bufsize | Output buffer size. |
| int rtxParseDateString | ( | const OSUTF8CHAR * | inpdata, |
| size_t | inpdatalen, | ||
| OSNumDateTime * | pvalue | ||
| ) |
This function decodes a date value from a supplied string and sets the given OSNumDateTime argument to the decoded date value.
| inpdata | Date string to be parsed/decoded as OSNumDateTime.
|
| inpdatalen | For decoding, consider inpdata string up to this length. |
| pvalue | The OSNumDateTime structure variable will be set to the decoded date value.
|
| int rtxParseDateTimeString | ( | const OSUTF8CHAR * | inpdata, |
| size_t | inpdatalen, | ||
| OSNumDateTime * | pvalue | ||
| ) |
This function decodes a datetime value from a supplied string and sets the given OSNumDateTime to the decoded date and time value.
| inpdata | Input date/time string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The pointed OSNumDateTime structure variable will be set to the decoded date and time value. |
| int rtxParseGDayString | ( | const OSUTF8CHAR * | inpdata, |
| size_t | inpdatalen, | ||
| OSNumDateTime * | pvalue | ||
| ) |
This function decodes a gregorian day value from a supplied string and sets the day field in the given OSNumDateTime to the decoded value.
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The day field in the given OSNumDateTime variable will be set to the decoded value. |
| int rtxParseGMonthDayString | ( | const OSUTF8CHAR * | inpdata, |
| size_t | inpdatalen, | ||
| OSNumDateTime * | pvalue | ||
| ) |
This function decodes a gregorian month and day value from a supplied string and sets the month and day fields in the given OSNumDateTime to the decoded values.
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The month and day fields in the given OSNumDateTime variable will be set to the decoded values. |
| int rtxParseGMonthString | ( | const OSUTF8CHAR * | inpdata, |
| size_t | inpdatalen, | ||
| OSNumDateTime * | pvalue | ||
| ) |
This function decodes a gregorian month value from a supplied string and sets the month field in the given OSNumDateTime to the decoded value.
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The month field in the given OSNumDateTime variable will be set to the decoded value. |
| int rtxParseGYearMonthString | ( | const OSUTF8CHAR * | inpdata, |
| size_t | inpdatalen, | ||
| OSNumDateTime * | pvalue | ||
| ) |
This function decodes a gregorian year and month value from a supplied string and sets the year and month fields in the given OSNumDateTime to the decoded values.
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The year and month fields in the given OSNumDateTime variable will be set to the decoded value. |
| int rtxParseGYearString | ( | const OSUTF8CHAR * | inpdata, |
| size_t | inpdatalen, | ||
| OSNumDateTime * | pvalue | ||
| ) |
This function decodes a gregorian year value from a supplied string and sets the year in the given OSNumDateTime to the decoded value.
| inpdata | Input string to be parsed. |
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The year field in the given OSNumDateTime structure variable will be set to the decoded value. |
| int rtxParseTimeString | ( | const OSUTF8CHAR * | inpdata, |
| size_t | inpdatalen, | ||
| OSNumDateTime * | pvalue | ||
| ) |
This function decodes a time value from a supplied string and sets the given OSNumDateTime structure to the decoded time value.
| inpdata | The inpdata is a time string to be parsed/decoded as OSNumDateTime.
|
| inpdatalen | For decoding, consider the inpdata string up to this length. |
| pvalue | The OSNumDateTime structure variable will be set to the decoded time value.
|
| int rtxSetDateTime | ( | OSNumDateTime * | pvalue, |
| struct tm * | timeStruct | ||
| ) |
This function converts a structure of type 'struct tm' to an OSNumDateTime structure.
| pvalue | The pointed OSNumDateTime structure variable will be set to time value. |
| timeStruct | A pointer to tm structure to be converted. |
| int rtxSetLocalDateTime | ( | OSNumDateTime * | pvalue, |
| time_t | timeMs | ||
| ) |
This function converts a local date and time value to an OSNumDateTime structure.
| pvalue | The pointed OSNumDateTime structure variable will be set to time value. |
| timeMs | A calendar time encoded as a value of type time_t. |
| int rtxSetUtcDateTime | ( | OSNumDateTime * | pvalue, |
| time_t | timeMs | ||
| ) |
This function converts a UTC date and time value to an OSNumDateTime structure.
| pvalue | The pointed OSNumDateTime structure variable will be set to time value. |
| timeMs | A calendar time encoded as a value of type time_t. The time is represented as seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). |
| OSBOOL rtxTimeIsValid | ( | const OSNumDateTime * | pvalue | ) |
This function verifies that time members (hour, minute, second, timezone) of the OSNumDateTime structure contains valid values.
| pvalue | Pointer to OSNumDateTime structure to be checked. |
| int rtxTimeToString | ( | const OSNumDateTime * | pvalue, |
| OSUTF8CHAR * | buffer, | ||
| size_t | bufsize | ||
| ) |
This function formats a numeric time value consisting of individual time components (hour, minute, second, fraction-of-second, time zone) into XML schema standard format (HH:MM:SS[.frac][TZ]).
| pvalue | Pointer to OSNumDateTime structure containing time components to be formatted. |
| buffer | Buffer into which date is to be formatted. This is a fixed-sized buffer. The user must provide a buffer that is large enough to hold the formatted time string. |
| bufsize | Size of the buffer to receive the formatted date. |