From OpenSCADAWiki
Revision as of 15:03, 27 May 2021 by FuzzyBot (Talk | contribs) (Importing a new version from external source)
External functions
To the library included range of external functions of the object TSYS of the OpenSCADA core to make simply and unified of the internal operations range:
- int64_t curTime( clockid_t clc = CLOCK_REALTIME ); — Current time in microseconds for the clock clc, from the Unix epoch (01.01.1970) for the CLOCK_REALTIME.
- string int2str( int val ); — Conversion the signed integer to string into the decimal representing.
- int str2int( const string &val ); — Conversion the string value val to the signed integer into the decimal, hexadecimal or octal representing.
- string uint2str( unsigned val ); — Conversion the unsigned integer to string into the decimal representing.
- unsigned long str2uint( const string &val ); — Conversion the string value val to the unsigned integer into the decimal, hexadecimal or octal representing.
- string ll2str( int64_t val ); — Conversion the signed long integer (64bit) to string into the decimal representing.
- string real2str( double val, int prec = 15, char tp = 'g' ); — Conversion the real value in double precision with precision prec of signs and type tp to string.
- double str2real( const string &val ); — Conversion the string value val to the real value.
- string strParse( const string &path, int level, const string &sep, int *off = NULL, bool mergeSepSymb = false ); — String path parsing to the components, which separated by sep, in single symbols merging mergeSepSymb, starting from the offset off and with control to the item's offset end in it.
- string strLine( const string &str, int level, int *off = NULL ); — Multiline text parsing to separate lines, starting from the offset off and with control to the item's offset end in it.
- string strMess( const char *fmt, ... ); — String forming by the template fmt and the arguments, implemented on the basis of "sprintf".