Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
Data Structures | Macros | Typedefs | Enumerations | Functions
ptxLog.h File Reference
#include "ptx_Status.h"
#include "ptxOsal.h"
#include "ptx_Platform.h"
Include dependency graph for ptxLog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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 ptxLogItempptxLogItem_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.
 

Detailed Description

SPDX-License-Identifier: BSD-3-Clause

Copyright (c) 2026, Renesas Electronics Corporation and/or its affiliates

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Renesas nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY Renesas "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RENESAS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT

OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project : PTX1K Module : LOG File : ptxLog.h

Description : Public header for UNIFIED logging methods library