|
IO-Link Master
1.03.03
|
|
SMI On Request Data.
◆ IOLM_SMI_CBDeviceReadCnf
Get Device On-request Data confirmation callback.
This service allows for reading On-request Data (OD) from the Device via the Master. Confirmation to the IOLM_SMI_vDeviceReadReq request.
- Parameters
-
[in] | u8ClientID_p | Client ID. |
[in] | u8Port_p | Port ID. |
[in] | u16Error_p | Error message as IOL_EErrorType. |
[in] | u16ArgBlockLength_p | Length of ArgBlock. |
[in] | pu8ArgBlock_p | Data pointer which points to the Device On-request Data (IOLM_SMI_SOnRequestData). |
- Example
void IOLM_SMI_vDeviceReadCnf(
INT8U u8ClientID_p,
INT8U u8Port_p,
INT16U u16Error_p,
{
{
UART_printf("IO-Link port %u: Read failed with error 0x%04x\n", u8Port_p, u16Error_p);
}
else
{
}
}
- See also
- IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID
◆ IOLM_SMI_CBDeviceWriteCnf
IOLM_SMI_CBDeviceWriteCnf |
Set Device On-request Data confirmation callback.
This callback indicates an answer to an On-request Data (OD) write request from a Device. Confirmation to the IOLM_SMI_vDeviceWriteReq request.
- Parameters
-
[in] | u8ClientID_p | Client ID. |
[in] | u8Port_p | Port ID. |
[in] | u16Error_p | Error message as IOL_EErrorType. |
- Example
void IOLM_SMI_vDeviceWriteCnf(
INT8U u8ClientID_p,
INT8U u8Port_p,
INT16U u16Error_p)
{
{
UART_printf("IO-Link port %u: Write failed with error 0x%04x\n", u8Port_p, u16Error_p);
}
else
{
}
}
- See also
- IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID
◆ IOLM_SMI_vDeviceReadReq()
IOL_FUNC_DECL void IOLM_SMI_vDeviceReadReq |
( |
INT8U |
u8ClientID_p, |
|
|
INT8U |
u8Port_p, |
|
|
INT16U |
u16ArgBlockLength_p, |
|
|
INT8U * |
pu8ArgBlock_p |
|
) |
| |
Get Device On-request Data.
This service allows for reading On-request Data (OD) from the Device via the Master. The answer to the request is the function IOLM_SMI_CBDeviceReadCnf.
- Parameters
-
[in] | u8ClientID_p | Client ID. |
[in] | u8Port_p | Port ID. |
[in] | u16ArgBlockLength_p | Length of ArgBlock. |
[in] | pu8ArgBlock_p | Data pointer which points to the Device On-request Data (IOLM_SMI_SOnRequestData). |
- Example
INT8U au8Mem[IOLM_SMI_ARGBLOCK_ONREQ_LEN(0)];
psuReq->
u16ArgBlockID = IOLM_SMI_ENDIAN_16(IOLM_SMI_eArgBlockID_OnRequestDataRead);
psuReq->
u16Index = IOLM_SMI_ENDIAN_16(16);
psuReq->u8Subindex = 0;
0,
0,
IOLM_SMI_ARGBLOCK_ONREQ_LEN(0),
au8Mem
);
◆ IOLM_SMI_vDeviceWriteReq()
IOL_FUNC_DECL void IOLM_SMI_vDeviceWriteReq |
( |
INT8U |
u8ClientID_p, |
|
|
INT8U |
u8Port_p, |
|
|
INT16U |
u16ArgBlockLength_p, |
|
|
INT8U * |
pu8ArgBlock_p |
|
) |
| |
Set Device On-request Data.
This service allows for writing On-request Data (OD) for propagation to the Device. The answer to the request is the function IOLM_SMI_CBDeviceWriteCnf.
- Parameters
-
[in] | u8ClientID_p | Client ID. |
[in] | u8Port_p | Port ID. |
[in] | u16ArgBlockLength_p | Length of ArgBlock. |
[in] | pu8ArgBlock_p | Data pointer which points to the Device's On-request Data (IOLM_SMI_SOnRequestData). |
- Example
INT8U au8Mem[IOLM_SMI_ARGBLOCK_ONREQ_LEN(2)];
psuReq->
u16ArgBlockID = IOLM_SMI_ENDIAN_16(IOLM_SMI_eArgBlockID_OnRequestDataWrite);
psuReq->
u16Index = IOLM_SMI_ENDIAN_16(123);
psuReq->u8Subindex = 0;
psuReq->au8Data[0] = 0x12;
psuReq->au8Data[1] = 0x34;
0,
0,
IOLM_SMI_ARGBLOCK_ONREQ_LEN(2),
au8Mem
);
void IOLM_SMI_vDeviceWriteReq(INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
Set Device On-request Data.
Definition: IOLM_SMI.c:2974
INT16U u16Index
Big endian.
Definition: IOLM_SMI_Types.h:720
void IOLM_SMI_vDeviceReadReq(INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
Get Device On-request Data.
Definition: IOLM_SMI.c:2986
This structure is used for On-request Data.
Definition: IOLM_SMI_Types.h:718
uint16_t INT16U
16 bit unsigned integer
Definition: IOL_Port_Types.h:44
INT16U u16ArgBlockID
Big endian.
Definition: IOLM_SMI_Types.h:719
@ IOL_eErrorType_NONE
No error.
Definition: IOL_Types.h:530
uint8_t INT8U
8 bit unsigned integer
Definition: IOL_Port_Types.h:42