|
Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
|

Data Structures | |
| struct | ptxLogItem_ParamBuffer |
| Log buffer. More... | |
| struct | ptxLogItem_2U32 |
| Log item for 2 x UInt32. More... | |
| union | ptxLogItem_Param |
| Log User Parameter(s) More... | |
| struct | ptxLogItem |
| Log item, representing a single entry. More... | |
| struct | ptxLogState |
| Logger Component Structure. More... | |
| struct | ptxLog |
| Logger Component Structure. More... | |
Macros | |
| #define | PTX_LOG_FILE_NAME_LEN 40 |
| #define | PTX_LOG_FILE_BUF_LEN 258 |
| #define | PTX_LOG_MIN_NUM_ENTRIES 3 |
| #define | PTX_LOG_ASSERT_LOG_ENTRIES (PTX_LOG_MIN_NUM_ENTRIES * 2) |
Typedefs | |
| typedef struct ptxLogItem * | pptxLogItem_t |
| typedef ptxStatus_t(* | pptxLogCallbackFn_t) (void *LogContext, pptxLogItem_t pLogItem) |
| typedef enum ptxLogClass | ptxLogClass_t |
| Log entry classification. | |
| typedef enum ptxLogParamType | ptxLogParamType_t |
| Type of parameter of log entry. | |
| typedef struct ptxLogItem_ParamBuffer | ptxLogItem_ParamBuffer_t |
| Log buffer. | |
| typedef struct ptxLogItem_2U32 | ptxLogItem_2U32_t |
| Log item for 2 x UInt32. | |
| typedef union ptxLogItem_Param | ptxLogItem_Param_t |
| Log User Parameter(s) | |
| typedef struct ptxLogItem | ptxLogItem_t |
| Log item, representing a single entry. | |
| typedef struct ptxLogState | ptxLogState_t |
| Logger Component Structure. | |
| typedef struct ptxLog | ptxLog_t |
| Logger Component Structure. | |
Enumerations | |
| enum | ptxLogClass { ptxLogClass_Trace , ptxLogClass_Message , ptxLogClass_Warning , ptxLogClass_Error , ptxLogClass_Rx , ptxLogClass_Tx , ptxLogClass_Sys_Debug , ptxLogClass_Sys_Info , ptxLogClass_Sys_Warn , ptxLogClass_Sys_Error , ptxLogClass_Assert , ptxLogClass_Assert_Status , ptxLogClass_Assert_NotNull , ptxLogClass_Assert_Equals , ptxLogClass_Assert_NotEqual } |
| Log entry classification. More... | |
| enum | ptxLogParamType { ptxLogParamType_None , ptxLogParamType_P2 , ptxLogParamType_PL , ptxLogParamType_Ptr , ptxLogParamType_Data , ptxLogParamType_String } |
| Type of parameter of log entry. More... | |
Functions | |
| ptxStatus_t | ptxLog_Init (ptxLog_t *logCtx, void *osAl, size_t numEntries) |
| Initialize the logger and the storage. | |
| ptxStatus_t | ptxLog_InitRTLogging (ptxLog_t *logCtx, pptxLogCallbackFn_t LogCallbackFn, void *Handler) |
| Initialize Realtime-Logging (= write every log item directly to a file). | |
| ptxStatus_t | ptxLog_DeInit (ptxLog_t *logCtx) |
| De-Initialize the logger and free the storage. | |
| void | ptxLog_SP2 (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, ptxLogClass_t logClass, uint32_t logStatus, uint32_t logP1, uint32_t logP2) |
| Log two parameters. | |
| void | ptxLog_SPL (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, ptxLogClass_t logClass, uint32_t logStatus, uint64_t logP) |
| Log long parameter. | |
| void | ptxLog_SD (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, ptxLogClass_t logClass, uint32_t logStatus, uint8_t *logData, size_t logLen) |
| Log Data. | |
| void | ptxLog_S (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, ptxLogClass_t logClass, uint32_t logStatus) |
| Log status only. | |
| void | ptxLog_TraceText (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, const char *traceText) |
| Trace function. | |
| void | ptxLog_TraceTextStatus (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, const char *traceText, uint32_t logStatus) |
| Trace function, including status. | |
| void | ptxLog_AssertStatus (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, ptxStatus_t actualStatus, const ptxStatus_t requiredStatus) |
| Assert Status. | |
| void | ptxLog_AssertNotNull (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, void *actualPtr) |
| Assert on not NULL. | |
| void | ptxLog_AssertEquals (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, uint32_t actualValue, uint32_t requiredValue, const char *traceText) |
| Assert on equality. | |
| void | ptxLog_AssertNotEqual (ptxLog_t *logCtx, const char *locationMajor, int locationMinor, uint32_t actualValue, uint32_t requiredValue, const char *traceText) |
| Assert on non-equality. | |
| ptxStatus_t | ptxLog_GetFirst (ptxLog_t *logCtx, ptxLogItem_t **logItem) |
| Get recent log item. | |
| ptxStatus_t | ptxLog_GetNext (ptxLog_t *logCtx, ptxLogItem_t **logItem) |
| Get next log item. | |
| ptxStatus_t | ptxLogAssert_GetFirst (ptxLog_t *logCtx, ptxLogItem_t **logItem) |
| Get recent log item. | |
| ptxStatus_t | ptxLogAssert_GetNext (ptxLog_t *logCtx, ptxLogItem_t **logItem) |
| Get next log item. | |
| #define PTX_LOG_ASSERT_LOG_ENTRIES (PTX_LOG_MIN_NUM_ENTRIES * 2) |
Assert log items count
| #define PTX_LOG_MIN_NUM_ENTRIES 3 |
Minimum number of log entries.
| typedef ptxStatus_t(* pptxLogCallbackFn_t) (void *LogContext, pptxLogItem_t pLogItem) |
Typedef (including forward declarations)
| typedef struct ptxLogItem* pptxLogItem_t |
Typedef (including forward declarations)
| enum ptxLogClass |
Log entry classification.
| enum ptxLogParamType |
Type of parameter of log entry.
| void ptxLog_AssertEquals | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| uint32_t | actualValue, | ||
| uint32_t | requiredValue, | ||
| const char * | traceText ) |
Assert on equality.
In case of failure, log the point of occurrence into a separate assertion log.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | actualValue | Value to check. |
| [in] | requiredValue | Reference value. |
| [in] | traceText | Optional text to be output, may be NULL. |
| void ptxLog_AssertNotEqual | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| uint32_t | actualValue, | ||
| uint32_t | requiredValue, | ||
| const char * | traceText ) |
Assert on non-equality.
In case of failure, log the point of occurrence into a separate assertion log.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | actualValue | Value to check. |
| [in] | requiredValue | Reference value. |
| [in] | traceText | Optional text to be output, may be NULL. |
| void ptxLog_AssertNotNull | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| void * | actualPtr ) |
Assert on not NULL.
In case of failure, log the point of occurrence into a separate assertion log.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | actualPtr | Pointer to check. |
| void ptxLog_AssertStatus | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| ptxStatus_t | actualStatus, | ||
| const ptxStatus_t | requiredStatus ) |
Assert Status.
In case of failure, log the point of occurrence and status into a separate assertion log.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | actualStatus | Actual status code. |
| [in] | requiredStatus | Required status code. |
| ptxStatus_t ptxLog_DeInit | ( | ptxLog_t * | logCtx | ) |
De-Initialize the logger and free the storage.
| [in,out] | logCtx | Pointer to an initialized instance of the component structure. |
| ptxStatus_t ptxLog_GetFirst | ( | ptxLog_t * | logCtx, |
| ptxLogItem_t ** | logItem ) |
Get recent log item.
A pointer to internal storage is provided, which has two implications:
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in,out] | logItem | Pointer to a location that will receive a copy of the latest entry. If there is no such entry, NULL is provided. |
| ptxStatus_t ptxLog_GetNext | ( | ptxLog_t * | logCtx, |
| ptxLogItem_t ** | logItem ) |
Get next log item.
A pointer to internal storage is provided, which has two implications:
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in,out] | logItem | Pointer to a location that will receive a copy of the next entry. If there is no such entry, NULL is provided. |
| ptxStatus_t ptxLog_Init | ( | ptxLog_t * | logCtx, |
| void * | osAl, | ||
| size_t | numEntries ) |
Initialize the logger and the storage.
| [in,out] | logCtx | Pointer to an existing instance of the component structure to be initialized. |
| [in] | osAl | Pointer to initialized OSAL. |
| [in] | numEntries | Number of log entries to be generated. |
| ptxStatus_t ptxLog_InitRTLogging | ( | ptxLog_t * | logCtx, |
| pptxLogCallbackFn_t | LogCallbackFn, | ||
| void * | Handler ) |
Initialize Realtime-Logging (= write every log item directly to a file).
| [in,out] | logCtx | Pointer to an existing instance of the component structure to be initialized. |
| [in] | LogCallbackFn | Pointer to Callback function to perform additional tasks after logging entry was written (optional). |
| [in] | Handler | Pointer to Integration component (optional). |
| void ptxLog_S | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| ptxLogClass_t | logClass, | ||
| uint32_t | logStatus ) |
Log status only.
Log the point of occurrence, class, status.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | logClass | Classification of the log event. |
| [in] | logStatus | Status code. |
| void ptxLog_SD | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| ptxLogClass_t | logClass, | ||
| uint32_t | logStatus, | ||
| uint8_t * | logData, | ||
| size_t | logLen ) |
Log Data.
Log the point of occurrence, class, status and data.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | logClass | Classification of the log event. |
| [in] | logStatus | Status code. |
| [in] | logData | User Data Parameter. |
| [in] | logLen | User Data Length Parameter, in bytes. |
| void ptxLog_SP2 | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| ptxLogClass_t | logClass, | ||
| uint32_t | logStatus, | ||
| uint32_t | logP1, | ||
| uint32_t | logP2 ) |
Log two parameters.
Log the point of occurrence, class, status and two user-defined parameters.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | logClass | Classification of the log event. |
| [in] | logStatus | Status code. |
| [in] | logP1 | User Parameter 1. |
| [in] | logP2 | User Parameter 2. |
| void ptxLog_SPL | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| ptxLogClass_t | logClass, | ||
| uint32_t | logStatus, | ||
| uint64_t | logP ) |
Log long parameter.
Log the point of occurrence, class, status and one long user-defined parameter.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | logClass | Classification of the log event. |
| [in] | logStatus | Status code. |
| [in] | logP | User Parameter. |
| void ptxLog_TraceText | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| const char * | traceText ) |
Trace function.
Log the point of occurrence, and text.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | traceText | Zero-terminated user-defined string. If NULL, no text is stored. |
| void ptxLog_TraceTextStatus | ( | ptxLog_t * | logCtx, |
| const char * | locationMajor, | ||
| int | locationMinor, | ||
| const char * | traceText, | ||
| uint32_t | logStatus ) |
Trace function, including status.
Log the point of occurrence, status and text.
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in] | locationMajor | Major location information as zero-terminated string (use FILE). |
| [in] | locationMinor | Minor location ID, like line number (use LINE). |
| [in] | traceText | Zero-terminated user-defined string. If NULL, no text is stored. |
| [in] | logStatus | Status code. |
| ptxStatus_t ptxLogAssert_GetFirst | ( | ptxLog_t * | logCtx, |
| ptxLogItem_t ** | logItem ) |
Get recent log item.
A pointer to internal storage is provided, which has two implications:
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in,out] | logItem | Pointer to a location that will receive a copy of the latest entry. If there is no such entry, NULL is provided. |
| ptxStatus_t ptxLogAssert_GetNext | ( | ptxLog_t * | logCtx, |
| ptxLogItem_t ** | logItem ) |
Get next log item.
A pointer to internal storage is provided, which has two implications:
| [in] | logCtx | Pointer to an initialized instance of the component structure. |
| [in,out] | logItem | Pointer to a location that will receive a copy of the next entry. If there is no such entry, NULL is provided. |