Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
Data Structures | Typedefs | Enumerations | Functions

Factory. More...

Collaboration diagram for Factory:

Data Structures

struct  ptxNscFactoryDefaultInit
 
struct  ptxNscFactory
 Factory Component Structure. More...
 
struct  ptxNscFactoryBuild
 Stack initialization Structure. More...
 

Typedefs

typedef enum ptxNscFactory_P ptxNscFactory_P_t
 
typedef enum ptxNscFactoryAboveNsc ptxNscFactoryAboveNsc_t
 
typedef struct ptxNscFactoryDefaultInit ptxNscFactoryDefaultInit_t
 
typedef struct ptxNscFactory ptxNscFactory_t
 Factory Component Structure.
 
typedef struct ptxNscFactoryBuild ptxNscFactoryBuild_t
 Stack initialization Structure.
 

Enumerations

enum  ptxNscFactory_P {
  ptxNscFactory_P_Reserved_0 , ptxNscFactory_P_Interface , ptxNscFactory_P_SpeedInit , ptxNscFactory_P_SpeedApp ,
  ptxNscFactory_P_HwFlowControl , ptxNscFactory_P_Type , ptxNscFactory_P_LogHistory , ptxNscFactory_P_BusAddress ,
  ptxNscFactory_P_BufferPoolDbgLog , ptxNscFactory_P_NscBufferSize , ptxNscFactory_P_SetMaxDynLogConns , ptxNscFactory_P_SetInitialNrCredits ,
  ptxNscFactory_P_SetCreditNtfTrigger , ptxNscFactory_P_NSCCommandedBy , ptxNscFactory_P_IrqGpioNum , ptxNscFactory_P_FTDITrxLog ,
  ptxNscFactory_P_FTDISerialNumber , ptxNscFactory_P_Number
}
 
enum  ptxNscFactoryAboveNsc { ptxNscFactory_Integration , ptxNscFactory_NCI }
 

Functions

PTX_LIBFUNC ptxStatus_t ptxNscFactory_Init (ptxNscFactory_t *fCtx, struct ptxOsal **osAl, void *sysCtx)
 Factory Initialization.
 
PTX_LIBFUNC ptxStatus_t ptxNscFactory_DeInit (ptxNscFactory_t *fCtx)
 De-Initialize the factory.
 
PTX_LIBFUNC ptxStatus_t ptxNscFactory_SetParameter (ptxNscFactory_t *fCtx, ptxNscFactory_P_t parType, uint8_t *parBuf, uint32_t parLenOrValue)
 Set Factory Operating Parameter.
 
PTX_LIBFUNC ptxStatus_t ptxNscFactory_BuildStack (ptxNscFactory_t *fCtx, ptxNscFactoryBuild_t *cComps)
 Build the stack, initialize and link together the components.
 
PTX_LIBFUNC ptxStatus_t ptxNscFactory_DestroyStack (ptxNscFactory_t *fCtx)
 Stack De-Initialization, Step 1.
 
PTX_LIBFUNC ptxStatus_t ptxNscFactory_DestroyStack_Finalize (ptxNscFactory_t *fCtx)
 Stack De-Initialization, Step 2.
 
PTX_LIBFUNC ptxStatus_t ptxNscFactory_SetLogExternal (ptxNscFactory_t *fCtx)
 Set log component as built from outside.
 
PTX_LIBFUNC ptxStatus_t ptxNscFactory_ClearLogExternal (ptxNscFactory_t *fCtx)
 Clear log component as built from outside.
 
PTX_LIBFUNC ptxFifoIoRq_tptxNscFactory_GetFifo (ptxNscFactory_t *fCtx)
 Get reference to FIFO.
 

Detailed Description

Factory.

Typedef Documentation

◆ ptxNscFactory_P_t

Parameter Types

◆ ptxNscFactory_t

Factory Component Structure.

Holds the list of parameters required for stack build-up/initialization procedure. Initialize Factory object with ptxNscFactory_Init and set parameters with ptxNscFactory_SetParameter before calling ptxNscFactory_BuildStack.

Properly initialized instance of ptxNscFactory_t object facilitates further set-up of various stack-components parameters.

◆ ptxNscFactoryAboveNsc_t

Enumeration of Components that can reside on top of NSC and HCI. This enumeration Shall be kept on sync with values of NSC_COMMANDED_BY in json file.

◆ ptxNscFactoryBuild_t

Stack initialization Structure.

This structure defines a helper object used during stack building up process. Placeholder for parameters required by ptxNscFactory_BuildStack.

◆ ptxNscFactoryDefaultInit_t

Default Initialization Parameter

Enumeration Type Documentation

◆ ptxNscFactory_P

Parameter Types

Enumerator
ptxNscFactory_P_Reserved_0 

Reserved for future use.

ptxNscFactory_P_Interface 

The name of the connected device.

ptxNscFactory_P_SpeedInit 

Initial device speed/baudrate. Used by peripheral before being configured by application.

ptxNscFactory_P_SpeedApp 

Speed/baudrate set by the application. The value of the speed for communication after NSC Init.

ptxNscFactory_P_HwFlowControl 

Enable/disable hardware flow control. Used only for Uart interface.

ptxNscFactory_P_Type 

Define which HAL interface will be used. One of the ptxHal_InterfaceType_t values.

ptxNscFactory_P_LogHistory 

Define the number of log entries used by LOG component.

ptxNscFactory_P_BusAddress 

Bus address used for I2C interface.

ptxNscFactory_P_BufferPoolDbgLog 

Enable/disable Buffer-Pool debug logging.

ptxNscFactory_P_NscBufferSize 

The size of NSC Buffer-Pool buffer. Total size of memory space is defined by Application, by setting parameter NumBuffers in ptxNSC_InitParam_t.

ptxNscFactory_P_SetMaxDynLogConns 

Define maximum number of dynamic connections for NCI.

ptxNscFactory_P_SetInitialNrCredits 

Initial number of Credits for all Data connections. Used by NCI.

ptxNscFactory_P_SetCreditNtfTrigger 

Define after how many received data packets a Credit-Notification shall be sent. Used by NCI.

ptxNscFactory_P_NSCCommandedBy 

Define whether NCI is on top of NSC.

ptxNscFactory_P_IrqGpioNum 

GPIO-Pin number for NFC-IRQ

ptxNscFactory_P_FTDITrxLog 

FTDI: Enable or disable the log.

ptxNscFactory_P_FTDISerialNumber 

FTDI: Serial Number of Ftdi device to be used

◆ ptxNscFactoryAboveNsc

Enumeration of Components that can reside on top of NSC and HCI. This enumeration Shall be kept on sync with values of NSC_COMMANDED_BY in json file.

Enumerator
ptxNscFactory_Integration 

Integration component is on top of NSC.

ptxNscFactory_NCI 

NCI is on top of NSC.

Function Documentation

◆ ptxNscFactory_BuildStack()

PTX_LIBFUNC ptxStatus_t ptxNscFactory_BuildStack ( ptxNscFactory_t * fCtx,
ptxNscFactoryBuild_t * cComps )

Build the stack, initialize and link together the components.

Parameters
[in]fCtxPointer to the allocated and initialized component structure.
[in]cCompsPointer to the the structure, holding pointers to allocated but non-initialized component structures.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNscFactory_ClearLogExternal()

PTX_LIBFUNC ptxStatus_t ptxNscFactory_ClearLogExternal ( ptxNscFactory_t * fCtx)

Clear log component as built from outside.

Parameters
[in]fCtxPointer to the allocated and initialized component structure.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNscFactory_DeInit()

PTX_LIBFUNC ptxStatus_t ptxNscFactory_DeInit ( ptxNscFactory_t * fCtx)

De-Initialize the factory.

Parameters
[in]fCtxPointer to the allocated component structure.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNscFactory_DestroyStack()

PTX_LIBFUNC ptxStatus_t ptxNscFactory_DestroyStack ( ptxNscFactory_t * fCtx)

Stack De-Initialization, Step 1.

De-Initializes the stack. Components are de-initialized, handles are closed. However, the function performs no de-allocation of the stack. Neither is a shutdown of the LOG done in this function. To shut down the log, use the second step, ptxNscFactory_DestroyStack_Finalize.

Parameters
[in]fCtxPointer to the allocated and initialized component structure.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNscFactory_DestroyStack_Finalize()

PTX_LIBFUNC ptxStatus_t ptxNscFactory_DestroyStack_Finalize ( ptxNscFactory_t * fCtx)

Stack De-Initialization, Step 2.

De-Initializes the LOG. The purpose is to be able to be able to observe the shutdown procedure.

Parameters
[in]fCtxPointer to the allocated and initialized component structure.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNscFactory_GetFifo()

PTX_LIBFUNC ptxFifoIoRq_t * ptxNscFactory_GetFifo ( ptxNscFactory_t * fCtx)

Get reference to FIFO.

Parameters
[in]fCtxPointer to the allocated and initialized component structure.
Returns
Pointer to FIFO if successful or NULL if not.

◆ ptxNscFactory_Init()

PTX_LIBFUNC ptxStatus_t ptxNscFactory_Init ( ptxNscFactory_t * fCtx,
struct ptxOsal ** osAl,
void * sysCtx )

Factory Initialization.

Initializes the Factory. Requires an already-allocated component object. Call this function first.

Parameters
[in]fCtxPointer to the allocated component structure.
[in,out]osAlPointer to OSAL.
[in]sysCtxPointer to arbitrary system context. May be NULL on some systems.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNscFactory_SetLogExternal()

PTX_LIBFUNC ptxStatus_t ptxNscFactory_SetLogExternal ( ptxNscFactory_t * fCtx)

Set log component as built from outside.

Parameters
[in]fCtxPointer to the allocated and initialized component structure.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.

◆ ptxNscFactory_SetParameter()

PTX_LIBFUNC ptxStatus_t ptxNscFactory_SetParameter ( ptxNscFactory_t * fCtx,
ptxNscFactory_P_t parType,
uint8_t * parBuf,
uint32_t parLenOrValue )

Set Factory Operating Parameter.

Set an operating parameter for the factory. This interface is intended to apply parameters that will be propagated to the individual components once they get instantiated. Call the function before ptxNscFactory_BuildStack for parameters needed by the components to properly initialize.

Parameters
[in]fCtxPointer to the allocated component structure.
[in]parTypeType of the parameter to set.
[in]parBufUse this to pass longer data types or strings (e.g. "/dev/ttyUSB0"). Set to NULL when not applicable. Caution: String zero-termination is not handled, always use the next parameter for string length.
[in]parLenOrValueBuffer length or integer parameter.
  • If the previous buffer parameter is used (not NULL) this parameter is the length of the buffer. Please note that this will be needed as soon as the buffer parameter is used.
  • With the previous buffer parameter set to NULL this parameter is a simple unsigned integer.
Returns
Status, indicating whether the operation was successful. See ptxStatus_t.