This layer provides logging and debug functionality. It is different from the other layers in the way it is initialised. It stores it's data parameters internally and only once, thus there can be only one instance.
More...
|
| phStatus_t | phLog_Init (pphLog_Callback_t pLogCallback, phLog_RegisterEntry_t *pRegisterEntries, uint16_t wMaxRegisterEntries) |
| | Initialise Logging. More...
|
| |
| phStatus_t | phLog_Register (void *pDataParams, phLog_LogEntry_t *pLogEntries, uint16_t wMaxLogEntries) |
| | Register component for logging. More...
|
| |
| void | phLog_AddString (void *pDataParams, uint8_t bLogType, char const *pString) |
| | Add a new log entry containing just a string. More...
|
| |
| void | phLog_AddParam_Uint8 (void *pDataParams, uint8_t bLogType, char const *pName, uint8_t *pParam) |
| | Add a new log entry containing an uint8_t parameter. More...
|
| |
| void | phLog_AddParam_Uint16 (void *pDataParams, uint8_t bLogType, char const *pName, uint16_t *pParam) |
| | Add a new log entry containing an uint16_t parameter. More...
|
| |
| void | phLog_AddParam_Uint32 (void *pDataParams, uint8_t bLogType, char const *pName, uint32_t *pParam) |
| | Add a new log entry containing an uint32_t parameter. More...
|
| |
| void | phLog_AddParam_Uint64 (void *pDataParams, uint8_t bLogType, char const *pName, uint64_t *pParam) |
| |
| void | phLog_AddParam_Int16 (void *pDataParams, uint8_t bLogType, char const *pName, int16_t *pParam) |
| |
| void | phLog_AddParam_Int32 (void *pDataParams, uint8_t bLogType, char const *pName, int32_t *pParam) |
| |
| void | phLog_AddParam_Int64 (void *pDataParams, uint8_t bLogType, char const *pName, int64_t *pParam) |
| |
| void | phLog_AddParam_Float64 (void *pDataParams, uint8_t bLogType, char const *pName, float64_t *pParam) |
| |
| void | phLog_AddParam_Buffer (void *pDataParams, uint8_t bLogType, char const *pName, void const *pParam, uint16_t wLength) |
| | Add a new log entry containing a byte-buffer of variable length. More...
|
| |
| void | phLog_Execute (void *pDataParams, uint8_t bOption) |
| | Execute the callback function to process the log buffer. More...
|
| |
This layer provides logging and debug functionality. It is different from the other layers in the way it is initialised. It stores it's data parameters internally and only once, thus there can be only one instance.
◆ PH_LOG_ALLOCATE_PARAMNAME
| #define PH_LOG_ALLOCATE_PARAMNAME |
( |
|
pParam | ) |
char const * pParam##_log = #pParam |
Allocate space in memory for a pString value.
- See also
- phLog_LogEnty_t
◆ phLog_Init()
Initialise Logging.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pLogCallback | [In] Pointer to a log callback function. |
| [in] | pRegisterEntries | [In] An array of phLog_RegisterEntry_t memory. |
| [in] | wMaxRegisterEntries | [In] Number of log entries the phLog_RegisterEntry_t array can hold. |
◆ phLog_Register()
Register component for logging.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Component for which logging shall be performed. |
| [in] | pLogEntries | [In] An array of phLog_LogEntry_t structures. |
| [in] | wMaxLogEntries | [In] Number of log entries the phLog_LogEntry_t array can hold. |
◆ phLog_AddString()
| void phLog_AddString |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pString |
|
) |
| |
Add a new log entry containing just a string.
- See also
- phLog_LogEnty_t
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pString | [In] The Null-terminated string to add. |
◆ phLog_AddParam_Uint8()
| void phLog_AddParam_Uint8 |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
uint8_t * |
pParam |
|
) |
| |
Add a new log entry containing an uint8_t parameter.
- See also
- phLog_LogEnty_t
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
◆ phLog_AddParam_Uint16()
| void phLog_AddParam_Uint16 |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
uint16_t * |
pParam |
|
) |
| |
Add a new log entry containing an uint16_t parameter.
- See also
- phLog_LogEnty_t
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
◆ phLog_AddParam_Uint32()
| void phLog_AddParam_Uint32 |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
uint32_t * |
pParam |
|
) |
| |
Add a new log entry containing an uint32_t parameter.
- See also
- phLog_LogEnty_t
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
◆ phLog_AddParam_Uint64()
| void phLog_AddParam_Uint64 |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
uint64_t * |
pParam |
|
) |
| |
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
◆ phLog_AddParam_Int16()
| void phLog_AddParam_Int16 |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
int16_t * |
pParam |
|
) |
| |
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
◆ phLog_AddParam_Int32()
| void phLog_AddParam_Int32 |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
int32_t * |
pParam |
|
) |
| |
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
◆ phLog_AddParam_Int64()
| void phLog_AddParam_Int64 |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
int64_t * |
pParam |
|
) |
| |
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
◆ phLog_AddParam_Float64()
| void phLog_AddParam_Float64 |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
float64_t * |
pParam |
|
) |
| |
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
◆ phLog_AddParam_Buffer()
| void phLog_AddParam_Buffer |
( |
void * |
pDataParams, |
|
|
uint8_t |
bLogType, |
|
|
char const * |
pName, |
|
|
void const * |
pParam, |
|
|
uint16_t |
wLength |
|
) |
| |
Add a new log entry containing a byte-buffer of variable length.
- See also
- phLog_LogEnty_t
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bLogType | [In] Type of Entry (one of the PH_LOG_LOGTYPE_* values). |
| [in] | pName | [In] The Null-terminated name of the parameter. |
| [in] | pParam | [In] Pointer to the memory where the parameter resides. |
| [in] | wLength | [In] The length in bytes to the supplied buffer. |
◆ phLog_Execute()
| void phLog_Execute |
( |
void * |
pDataParams, |
|
|
uint8_t |
bOption |
|
) |
| |
Execute the callback function to process the log buffer.
- Parameters
-
| [in] | pDataParams | [In] The DataParams of the calling function. |
| [in] | bOption | [In] Option byte (one of the PH_LOG_OPTION* defines). |