sbgECom Library
4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
|
Platform-specific functions. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | SbgCommonLibOnLogFunc) (const char *pFileName, const char *pFunctionName, uint32_t line, const char *pCategory, SbgDebugLogType logType, SbgErrorCode errorCode, const char *pMessage) |
Functions | |
SBG_COMMON_LIB_API uint32_t | sbgGetTime (void) |
SBG_COMMON_LIB_API void | sbgSleep (uint32_t ms) |
SBG_COMMON_LIB_API void | sbgCommonLibSetLogCallback (SbgCommonLibOnLogFunc logCallback) |
SBG_COMMON_LIB_API void | sbgPlatformDebugLogMsg (const char *pFileName, const char *pFunctionName, uint32_t line, const char *pCategory, SbgDebugLogType logType, SbgErrorCode errorCode, const char *pFormat,...) SBG_CHECK_FORMAT(printf |
Platform-specific functions.
This file should be modified to each targeted platform. For example, all common headers should be included from this file.
The platform endianness should be defined here.
The MIT license
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.
typedef void(* SbgCommonLibOnLogFunc) (const char *pFileName, const char *pFunctionName, uint32_t line, const char *pCategory, SbgDebugLogType logType, SbgErrorCode errorCode, const char *pMessage) |
Type for logging functions.
[in] | pFileName | File name where the error occurred. |
[in] | pFunctionName | Function name where the error occurred. |
[in] | line | Line number where the error occurred. |
[in] | pCategory | Category for this log or "None" if no category has been specified. |
[in] | logType | Define if we have an error, a warning, an info or a debug log. |
[in] | errorCode | The error code associated with the message. |
[in] | pMessage | The message to log. |
SBG_COMMON_LIB_API uint32_t sbgGetTime | ( | void | ) |
Get the current time.
SBG_COMMON_LIB_API void sbgSleep | ( | uint32_t | ms | ) |
Sleep.
[in] | ms | Time to wait, in ms. |
SBG_COMMON_LIB_API void sbgCommonLibSetLogCallback | ( | SbgCommonLibOnLogFunc | logCallback | ) |
Set the log function.
Some platforms may not provide the ability to set a user-provided log function, in which case this function does nothing.
[in] | logCallback | Log function. |
SBG_COMMON_LIB_API void sbgPlatformDebugLogMsg | ( | const char * | pFileName, |
const char * | pFunctionName, | ||
uint32_t | line, | ||
const char * | pCategory, | ||
SbgDebugLogType | logType, | ||
SbgErrorCode | errorCode, | ||
const char * | pFormat, | ||
... | |||
) |
Log a message.
[in] | pFileName | File name where the error occurred. |
[in] | pFunctionName | Function name where the error occurred. |
[in] | line | Line number where the error occurred. |
[in] | pCategory | Category for this log or "None" if no category has been specified. |
[in] | logType | Define if we have an error, a warning, an info or a debug log. |
[in] | errorCode | The error code associated with the message. |
[in] | pFormat | The error message that will be used with the variable list of arguments. |