|
float | GetMiscNetwTime () |
| Get synched network time from X-Plane (sim/network/misc/network_time_sec) as used in Log.txt. More...
|
|
bool | CheckEverySoOften (float &_lastCheck, float _interval, float _now) |
| Convenience function to check on something at most every x seconds. More...
|
|
std::string | GetPluginName (XPLMPluginID who) |
| Return a plugin's name. More...
|
|
std::istream & | safeGetline (std::istream &is, std::string &t) |
| Read a text line, handling both Windows (CRLF) and Unix (LF) ending. More...
|
|
float | HeadDiff (float from, float to) |
| Return shortest turn from one heading to the other. More...
|
|
float | RpmToAngle (float angle, float rpm, float s) |
| Rotation: Computes new rotation angle based on current + revolution in a (small) amount of time. More...
|
|
std::string | str_n (const char *s, size_t max) |
| Copy at most n chars from location, or less if zero-terminated. More...
|
|
std::vector< std::string > | str_tokenize (const std::string &s, const std::string &tokens, bool bSkipEmpty) |
| separates string into tokens More...
|
|
std::pair< std::string, std::string > | str_split (const std::string &s, const std::string &tokens) |
| Split the string at the first of the tokens and return the two pieces. More...
|
|
const char * | LogGetString (const char *szPath, int ln, const char *szFunc, logLevelTy lvl, const char *szMsg, va_list args) |
| Returns ptr to static buffer filled with formatted log string. More...
|
|
void | LogMsg (const char *szPath, int ln, const char *szFunc, logLevelTy lvl, const char *szMsg,...) |
| Log Text to log file. More...
|
|
Miscellaneous utility functions, including logging.
- Author
- Birger Hoppe
- Copyright
- (c) 2020 Birger Hoppe
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.