#include "isisclient.h"
Functions | |
void | LeftStr (char *substr, char *str, int nchar) |
Extract the n left-most characters from a given string. | |
void | RightStr (char *substr, char *str, int nchar) |
Extract the n right-most characters from a given string. | |
void | MidStr (char *substr, char *str, int start, int nchar) |
Extract n characters starting in the middle of a string. | |
void | SubStr (char *substr, char *str, int first, int last) |
Extracts a substring from inside a larger string. | |
void | UpperCase (char *str) |
Convert all characters in a string up uppercase. | |
void | GetArg (char *cmdstr, int argnum, char *argstr) |
Extract the n-th argument from a command string with arguments separated by spaces. | |
char * | UTCDateTag (void) |
Create a CCYYMMDD date tag string. | |
char * | UTCDate (void) |
Return the UTC date in ISO8601 format. | |
char * | UTCTime (void) |
Return the UTC Time in ISO8601 format. | |
char * | ISODate (void) |
Return the UTC date and time in ISO8601 format. | |
char * | GetFineTime (void) |
Return UTC time with microsecond precision. | |
double | SysTimestamp (void) |
Return elapsed time since UTC 1970 Jan 1 with microsecond precision. | |
int | MilliSleep (long msec) |
Pause execution for a certain number of msec. |
A suite of utility functions that most ISIS client applications will find useful. These include functions for string handling (something stock C is not well-equipped with), an dfunctions for getting time and date information, including date/time in ISO8601 format.
|
Extract the n left-most characters from a given string.
|
|
Extract the n right-most characters from a given string.
|
|
Extract n characters starting in the middle of a string.
|
|
Extracts a substring from inside a larger string.
|
|
Convert all characters in a string up uppercase.
|
|
Extract the n-th argument from a command string with arguments separated by spaces.
With the command verb itself being considerd argument "0". Returns a null string in argstr if argnum is out of range. |
|
Create a CCYYMMDD date tag string.
Reads the system timeclock and returns the UTC date in
|
|
Return the UTC date in ISO8601 format.
Reads the system clock and returns the UTC date in ISO8601-compliant
|
|
Return the UTC Time in ISO8601 format.
Reads the system clock and returns the UTC time in ISO8601-compliant time to the nearest second in
|
|
Return the UTC date and time in ISO8601 format. Reads the system clock and returns the UTC date and time in full ISO8601-compliant date/time format:
where:
|
|
Return UTC time with microsecond precision.
Reads the system's UTC time clock and returns a pointer to a string with the fine-grained UTC time in Based on gf_time() from Stevens, W.R., 1998, Unix Network Programming, Vol 2, Prentice Hall, Figure 15.6, but I make a string, and extract time to microsec instead of msec. Note: It returns microsecond precision, accuracy is quite another matter...
|
|
Return elapsed time since UTC 1970 Jan 1 with microsecond precision. Reads the system's time clock and returns a double-precision value with the time in seconds and microseconds since UTC 1970 January 1. The primary use of this function is to create a fine-grained numerical timestamp for the system, but other uses are possible. Note: It returns microsecond precision, accuracy is quite another matter...
|
|
Pause execution for a certain number of msec.
See "man 2 nanosleep" for details on the nanosleep() function. |