IO-Link Master  1.03.03
SMI Process Data

Overview

SMI Process Data.

Typedefs

typedef void(* IOLM_SMI_CBPDInCnf) (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16Error_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Get input data confirmation callback. More...
 
typedef void(* IOLM_SMI_CBPDOutCnf) (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16Error_p)
 Set output data confirmation callback. More...
 
typedef void(* IOLM_SMI_CBPDInOutCnf) (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16Error_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Get input and set output data confirmation. More...
 
typedef void(* IOLM_SMI_CBPDInIQCnf) (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16Error_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Get input data confirmation callback. More...
 
typedef void(* IOLM_SMI_CBPDOutIQCnf) (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16Error_p)
 Set output data confirmation callback. More...
 

Functions

IOL_FUNC_DECL void IOLM_SMI_vPDInReq (INT8U u8ClientID_p, INT8U u8Port_p)
 Get input data. More...
 
IOL_FUNC_DECL INT16U IOLM_SMI_u16PDInReqCnf (INT8U u8Port_p, INT16U *pu16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Get input data request and confirmation. More...
 
IOL_FUNC_DECL void IOLM_SMI_vPDOutReq (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Set output data. More...
 
IOL_FUNC_DECL INT16U IOLM_SMI_u16PDOutReqCnf (INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Set output data request and confirmation. More...
 
IOL_FUNC_DECL void IOLM_SMI_vPDInOutReq (INT8U u8ClientID_p, INT8U u8Port_p)
 Get input and set output data. More...
 
IOL_FUNC_DECL INT16U IOLM_SMI_u16PDInOutReqCnf (INT8U u8Port_p, INT16U *pu16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Get input and output data request and confirmation. More...
 
IOL_FUNC_DECL void IOLM_SMI_vPDInIQReq (INT8U u8ClientID_p, INT8U u8Port_p)
 Get input data. More...
 
IOL_FUNC_DECL void IOLM_SMI_vPDOutIQReq (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Set Output Data. More...
 

Typedef Documentation

◆ IOLM_SMI_CBPDInCnf

IOLM_SMI_CBPDInCnf

Get input data confirmation callback.

This service allows for cyclically reading input process data from an input buffer. Confirmation to the IOLM_SMI_vPDInReq request if a single port was read.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16Error_pError Message as IOL_EErrorType.
[in]u16ArgBlockLength_pLength of ArgBlock.
[in]pu8ArgBlock_pData Pointer which points to the PDIn Data (IOLM_SMI_SPDIn).
Example
void IOLM_SMI_vPDInCnf(INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16Error_p,
INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
{
IOLM_SMI_SPDIn *psuPDIn = (IOLM_SMI_SPDIn *)pu8ArgBlock_p;
INT8U au8Data[32] = {0, };
// Copy data
memcpy(au8Data, psuPDIn->au8Data, psuPDIn->u8InputDataLength);
// ToDo: Insert application specific code here
}
See also
IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID, IOLM_SMI_u16PDInReqCnf

◆ IOLM_SMI_CBPDInIQCnf

IOLM_SMI_CBPDInIQCnf

Get input data confirmation callback.

This service allows for cyclically reading input Process Data from an InBuffer containing the value of the input "I" signal (Pin 2 at M12). Confirmation to the IOLM_SMI_vPDInIQReq request.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16Error_pError Message as IOL_EErrorType.
[in]u16ArgBlockLength_pLength of ArgBlock.
[in]pu8ArgBlock_pData Pointer which points to the PDInIQ Data.
Example
void IOLM_SMI_vPDInIQCnf(INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16Error_p,
INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
{
IOLM_SMI_SPDInIQ *psuPDInIQ = (IOLM_SMI_SPDInIQ *)pu8ArgBlock_p;
// State of the input
psuPDInIQ->u8PQI;
// ToDo: Insert application specific code here
}
See also
IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID

◆ IOLM_SMI_CBPDInOutCnf

IOLM_SMI_CBPDInOutCnf

Get input and set output data confirmation.

This service allows for periodically reading input from an InBuffer and periodically reading output Process Data from an OutBuffer. Confirmation to the IOLM_SMI_vPDInOutReq request.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16Error_pError Message as IOL_EErrorType.
[in]u16ArgBlockLength_pLength of ArgBlock.
[in,out]pu8ArgBlock_pData Pointer which points to the PDInOut Data (IOLM_SMI_SPDInOut).
Example
void IOLM_SMI_vPDInOutCnf(INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16Error_p,
INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
{
IOLM_SMI_SPDInOut *psuPDInOut = (IOLM_SMI_SPDInOut *)pu8ArgBlock_p;
INT8U au8Data[2*(32+1)] = {0, };
// Copy data
memcpy(au8Data, psuPDInOut->au8Data, psuPDInOut->u8InputDataLength);
// ToDo: Insert application specific code here
}
See also
IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID

◆ IOLM_SMI_CBPDOutCnf

IOLM_SMI_CBPDOutCnf

Set output data confirmation callback.

This service allows for cyclically writing output Process Data to an output buffer. Confirmation to the IOLM_SMI_vPDOutReq request.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16Error_pError message as IOL_EErrorType.
See also
IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID

◆ IOLM_SMI_CBPDOutIQCnf

IOLM_SMI_CBPDOutIQCnf

Set output data confirmation callback.

This service allows for cyclically writing output Process Data to an OutBuffer containing the value of the output "Q" signal (Pin 2 at M12). Confirmation to the IOLM_SMI_vPDOutIQReq request.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16Error_pError message as IOL_EErrorType.
See also
IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID

Function Documentation

◆ IOLM_SMI_u16PDInOutReqCnf()

IOL_FUNC_DECL INT16U IOLM_SMI_u16PDInOutReqCnf ( INT8U  u8Port_p,
INT16U pu16ArgBlockLength_p,
INT8U pu8ArgBlock_p 
)

Get input and output data request and confirmation.

This service allows for cyclically reading input and output Process Data to an input buffer and combines request (IOLM_SMI_vPDInOutReq) and confirmation (IOLM_SMI_CBPDInOutCnf).

Parameters
[in]u8Port_pPort ID.
[in,out]pu16ArgBlockLength_pPointer which points to the length of ArgBlock.
[in,out]pu8ArgBlock_pData pointer which points to the PDInOut data (IOLM_SMI_SPDInOut).
Returns
Error as IOL_EErrorType
Example
INT16U u16Length = sizeof(IOLM_SMI_SPDInOut);
INT16U u16Error;
// Get PDIn
u16Error = IOLM_SMI_u16PDInReqCnf(u8Port, &u16Length, (INT8U *)&suPDInOut);
if (u16Error == IOL_eErrorType_NONE)
{
// ToDo: Insert application specific code here
}

◆ IOLM_SMI_u16PDInReqCnf()

IOL_FUNC_DECL INT16U IOLM_SMI_u16PDInReqCnf ( INT8U  u8Port_p,
INT16U pu16ArgBlockLength_p,
INT8U pu8ArgBlock_p 
)

Get input data request and confirmation.

This service allows for cyclically reading input Process Data to an input buffer and combines request (IOLM_SMI_vPDInReq) and confirmation (IOLM_SMI_CBPDInCnf).

Parameters
[in]u8Port_pPort ID.
[in,out]pu16ArgBlockLength_pPointer which points to the length of ArgBlock.
[in,out]pu8ArgBlock_pData pointer which points to the PDIn data (IOLM_SMI_SPDIn).
Returns
Error as IOL_EErrorType
Example
INT16U u16Length = sizeof(IOLM_SMI_SPDIn);
INT16U u16Error;
// Get PDIn
u16Error = IOLM_SMI_u16PDInReqCnf(u8Port, &u16Length, (INT8U *)&suPDIn);
if (u16Error == IOL_eErrorType_NONE)
{
// ToDo: Insert application specific code here
}

◆ IOLM_SMI_u16PDOutReqCnf()

IOL_FUNC_DECL INT16U IOLM_SMI_u16PDOutReqCnf ( INT8U  u8Port_p,
INT16U  u16ArgBlockLength_p,
INT8U pu8ArgBlock_p 
)

Set output data request and confirmation.

This service allows for cyclically writing output Process Data to an output buffer and combines request and confirmation.

Parameters
[in]u8Port_pPort ID.
[in,out]u16ArgBlockLength_pPointer which points to the Length of ArgBlock.
[in,out]pu8ArgBlock_pData pointer which points to the PDOut data (IOLM_SMI_SPDOut).
Returns
Error as IOL_EErrorType
Example
INT16U u16Length = sizeof(IOLM_SMI_SPDOut);
INT16U u16Error;
// Set PDOut
u16Error = IOLM_SMI_u16PDOutReqCnf(u8Port, &u16Length, (INT8U *)&suPDOut);
if (u16Error == IOL_eErrorType_NONE)
{
// ToDo: Insert application specific code here
}

◆ IOLM_SMI_vPDInIQReq()

IOL_FUNC_DECL void IOLM_SMI_vPDInIQReq ( INT8U  u8ClientID_p,
INT8U  u8Port_p 
)

Get input data.

This service allows for cyclically reading input Process Data from an InBuffer containing the value of the input "I" signal (Pin 2 at M12). The answer to the request is the function IOLM_SMI_CBPDInIQCnf.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.

◆ IOLM_SMI_vPDInOutReq()

IOL_FUNC_DECL void IOLM_SMI_vPDInOutReq ( INT8U  u8ClientID_p,
INT8U  u8Port_p 
)

Get input and set output data.

This service allows for periodically reading input from an InBuffer and periodically reading output Process Data from an OutBuffer. The answer to the request is the function IOLM_SMI_CBPDInOutCnf.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.

◆ IOLM_SMI_vPDInReq()

IOL_FUNC_DECL void IOLM_SMI_vPDInReq ( INT8U  u8ClientID_p,
INT8U  u8Port_p 
)

Get input data.

This service allows for cyclically reading input Process Data from an input buffer. The answer to the request is one of these functions: IOLM_SMI_CBPDInCnf

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.

◆ IOLM_SMI_vPDOutIQReq()

IOL_FUNC_DECL void IOLM_SMI_vPDOutIQReq ( INT8U  u8ClientID_p,
INT8U  u8Port_p,
INT16U  u16ArgBlockLength_p,
INT8U pu8ArgBlock_p 
)

Set Output Data.

This service allows for cyclically writing output Process Data to an OutBuffer containing the value of the output "Q" signal (Pin 2 at M12). The answer to the request is the function IOLM_SMI_CBPDOutIQCnf.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16ArgBlockLength_pLength of ArgBlock.
[in]pu8ArgBlock_pData Pointer which points to the PDOutIQ Data.
Example
IOLM_SMI_SPDOutIQ *psuReq = malloc(sizeof(IOLM_SMI_SPDOutIQ));
// Fill request
psuReq->u16ArgBlockID = IOLM_SMI_ENDIAN_16(IOLM_SMI_eArgBlockID_PDOutIQ);
...
// Send request
IOLM_SMI_vPDOutIQReq(
0, // Client ID
0, // Port
sizeof(IOLM_SMI_SPDOutIQ), // Length
(INT8U *)psuReq
);
// Wait for IOLM_SMI_vPDOutIQCnf

◆ IOLM_SMI_vPDOutReq()

IOL_FUNC_DECL void IOLM_SMI_vPDOutReq ( INT8U  u8ClientID_p,
INT8U  u8Port_p,
INT16U  u16ArgBlockLength_p,
INT8U pu8ArgBlock_p 
)

Set output data.

This service allows for cyclically writing output Process Data to an output buffer. The answer to the request is the function IOLM_SMI_CBPDOutCnf.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16ArgBlockLength_pLength of ArgBlock.
[in]pu8ArgBlock_pData pointer which points to the PDOut data (IOLM_SMI_SPDOut).
Example
IOLM_SMI_SPDOut *psuReq = malloc(sizeof(IOLM_SMI_SPDOut));
// Fill request
psuReq->u16ArgBlockID = IOLM_SMI_ENDIAN_16(IOLM_SMI_eArgBlockID_PDOut);
...
// Send request
IOLM_SMI_vPDOutReq(
0, // Client ID
0, // Port
sizeof(IOLM_SMI_SPDOut), // Length
(INT8U *)psuReq
);
// Wait for IOLM_SMI_CBPDOutCnf
IOLM_SMI_SPDInOut::au8Data
INT8U au8Data[2 *(32+1)]
input len + data + output len + data
Definition: IOLM_SMI_Types.h:666
IOLM_SMI_SPDOutIQ::u16ArgBlockID
INT16U u16ArgBlockID
Big endian.
Definition: IOLM_SMI_Types.h:626
IOLM_SMI_u16PDOutReqCnf
INT16U IOLM_SMI_u16PDOutReqCnf(INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
Set output data request and confirmation.
Definition: IOLM_SMI.c:1201
IOLM_SMI_SPDIn::u8InputDataLength
INT8U u8InputDataLength
Input data length in bytes.
Definition: IOLM_SMI_Types.h:587
IOLM_SMI_SPDIn
This structure is used for Process Data input.
Definition: IOLM_SMI_Types.h:584
IOLM_SMI_SPDOut::u16ArgBlockID
INT16U u16ArgBlockID
Big endian.
Definition: IOLM_SMI_Types.h:600
IOLM_SMI_SPDInIQ
This structure is used for IQ input.
Definition: IOLM_SMI_Types.h:614
INT16U
uint16_t INT16U
16 bit unsigned integer
Definition: IOL_Port_Types.h:44
IOLM_SMI_SPDIn::au8Data
INT8U au8Data[32]
32 bytes.
Definition: IOLM_SMI_Types.h:588
IOLM_SMI_u16PDInReqCnf
INT16U IOLM_SMI_u16PDInReqCnf(INT8U u8Port_p, INT16U *pu16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
Get input data request and confirmation.
Definition: IOLM_SMI.c:1096
IOLM_SMI_SPDInOut
This structure is used for Process Data input and output read back.
Definition: IOLM_SMI_Types.h:662
IOLM_SMI_SPDOutIQ
This structure is used for IQ output.
Definition: IOLM_SMI_Types.h:625
IOL_eErrorType_NONE
@ IOL_eErrorType_NONE
No error.
Definition: IOL_Types.h:530
IOLM_SMI_SPDOut
This structure is used for Process Data output.
Definition: IOLM_SMI_Types.h:599
INT8U
uint8_t INT8U
8 bit unsigned integer
Definition: IOL_Port_Types.h:42