IO-Link Master  1.03.03
SMI Event

Overview

SMI Event.

Typedefs

typedef void(* IOLM_SMI_CBDeviceEventInd) (INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Device Event indicator callback. More...
 
typedef void(* IOLM_SMI_CBPortEventInd) (INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Port event indicator callback. More...
 

Typedef Documentation

◆ IOLM_SMI_CBDeviceEventInd

IOLM_SMI_CBDeviceEventInd

Device Event indicator callback.

This service allows for signaling an event generated by the Device.

Parameters
[in]u8Port_pPort ID.
[in]u16ArgBlockLength_pLength of ArgBlock.
[in]pu8ArgBlock_pData pointer which points to the Device Event data (IOLM_SMI_SDeviceEvent).
Example
void IOLM_SMI_DeviceEventInd(INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
{
IOLM_SMI_SDeviceEvent *psuEvent = (IOLM_SMI_SDeviceEvent *)pu8ArgBlock_p;
// Event Code
psuEvent->u16EventCode;
// Event Qualifier (according specification Annex A.6.4)
psuEvent->u8EventQualifier;
// Example Output
UART_printf("IO-Link port %u: Device event - qualifier: 0x%02x - code: 0x%04x\n",
u8Port_p,
psuEvent->u8EventQualifier,
psuEvent->u16EventCode);
// ToDo: Insert application specific code here
}
See also
IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID

◆ IOLM_SMI_CBPortEventInd

IOLM_SMI_CBPortEventInd

Port event indicator callback.

This service allows for signaling an event generated by the Master port.

Parameters
[in]u8Port_pPort ID.
[in]u16ArgBlockLength_pLength of ArgBlock.
[in]pu8ArgBlock_pData pointer which points to the port event data (IOLM_SMI_SPortEvent).
Example
void IOLM_SMI_PortEventInd(INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
{
IOLM_SMI_SPortEvent *psuEvent = (IOLM_SMI_SPortEvent *)pu8ArgBlock_p;
// Event Code
psuEvent->u16EventCode;
// Event Qualifier (according specification Annex A.6.4)
psuEvent->u8EventQualifier;
// Example Output
UART_printf("IO-Link port %u: Port event - qualifier: 0x%02x - code: 0x%04x\n",
u8Port_p,
psuEvent->u8EventQualifier,
psuEvent->u16EventCode);
// ToDo: Insert application specific code here
}
See also
IOLM_SMI_SCallbacks, IOLM_SMI_vInit, IOLM_SMI_EArgBlockID
IOLM_SMI_SDeviceEvent
This structure is used for Device Events (remote).
INT16U
uint16_t INT16U
16 bit unsigned integer
Definition: IOL_Port_Types.h:44
IOLM_SMI_SPortEvent
This structure is used for port events (local).
INT8U
uint8_t INT8U
8 bit unsigned integer
Definition: IOL_Port_Types.h:42