IO-Link Masterv2.01.01
 
Loading...
Searching...
No Matches
SMI Config

Overview

SMI Configuration.

Functions

IOL_FUNC_DECL void IOLM_SMI_vMasterIdentificationReq (INT8U u8ClientID_p)
 Get Master identification.
 
IOL_FUNC_DECL void IOLM_SMI_vMasterConfigurationReq (INT8U u8ClientID_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Set Master configuration.
 
IOL_FUNC_DECL void IOLM_SMI_vPortConfigurationReq (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Set port configuration.
 
IOL_FUNC_DECL void IOLM_SMI_vReadbackPortConfigurationReq (INT8U u8ClientID_p, INT8U u8Port_p)
 Read back port configuration.
 
IOL_FUNC_DECL void IOLM_SMI_vPortStatusReq (INT8U u8ClientID_p, INT8U u8Port_p)
 Get port status.
 
IOL_FUNC_DECL INT16U IOLM_SMI_u16PortStatusReqCnf (INT8U u8Port_p, INT16U *pu16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Get port status request and confirmation.
 
IOL_FUNC_DECL void IOLM_SMI_vDSBackupToParServReq (INT8U u8ClientID_p, INT8U u8Port_p)
 Backup to parameter server.
 
IOL_FUNC_DECL void IOLM_SMI_vDSBackupFromParServReq (INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Backup from parameter server.
 
IOL_FUNC_DECL INT16U IOLM_SMI_u16PortPowerOffOnReqCnf (INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
 Port power off on request and confirmation.
 

Function Documentation

◆ IOLM_SMI_u16PortPowerOffOnReqCnf()

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

Port power off on request and confirmation.

This service allows for switching power of a particular port off and on.

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 PortPowerOffOn data (IOLM_SMI_SPortPowerOffOn).
Returns
Error as IOL_EErrorType
Example
IOLM_SMI_SPortPowerOffOn suPortPowerOffOn;
INT16U u16Error;
// Fill in request
suPortPower.u16ArgBlockID = IOLM_SMI_ENDIAN_16(IOLM_SMI_eArgBlockID_PortPowerOffOn);
suArgBlock.pu8ArgBlock = (INT8U*)&suPortPowerOffOn;
suArgBlock.u16ArgBlockLength = sizeof(suPortPowerOffOn);
suArgBlock.u16ArgBlockLengthMax = sizeof(suPortPowerOffOn);
// Set PowerOff time to 500 ms and select ONE_TIME_SWITCH_OFF to switch off port power only for 500 ms.
// To switch off permanently use IOLM_SMI_ePortPowerMode_OFF
// and to switch on use IOLM_SMI_ePortPowerMode_ON
suPortPower.u8PortPowerMode = (INT8U)IOLM_SMI_ePortPowerMode_ONE_TIME_SWITCH_OFF;
suPortPower.u16PowerOffTime = IOLM_SMI_ENDIAN_16(500);
u16Error = (IOL_EErrorType)IOLM_SMI_u16PortPowerOffOnCnf(u8Port, sizeof(IOLM_SMI_SPortPowerOffOn), &suPortPowerOffOn);
if (u16Error =/= IOL_eErrorType_NONE)
{
// ToDo: Insert application specific code here
}
IOL_EErrorType
This enumeration indicates the permissible ISDU ErrorTypes resulting from the Device application.
Definition IOL_Types.h:558
uint16_t INT16U
16 bit unsigned integer
Definition IOL_Port_Types.h:70
uint8_t INT8U
8 bit unsigned integer
Definition IOL_Port_Types.h:68
@ IOL_eErrorType_NONE
No error.
Definition IOL_Types.h:560
This structure is used for PortPowerOffOn requests.
Definition IOLM_SMI_Types.h:1153
INT16U u16ArgBlockID
Big endian.
Definition IOLM_SMI_Types.h:1154

◆ IOLM_SMI_u16PortStatusReqCnf()

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

Get port status request and confirmation.

This service allows for retrieval of the effective status of the indicated Master port. It combines the request (IOLM_SMI_vPortStatusReq) and confirmation (IOLM_SMI_CBPortStatusCnf) service.

Parameters
[in]u8Port_pPort ID.
[in,out]pu16ArgBlockLength_pPointer to length of ArgBlock.
[in,out]pu8ArgBlock_pData pointer which points to the port status (IOLM_SMI_SPortStatusList).
Returns
Error as IOL_EErrorType
Example
INT16U u16Length = sizeof(IOLM_SMI_SPortStatusList);
INT16U u16Error;
// Get Port Status
u16Error = IOLM_SMI_u16PortStatusReqCnf(u8Port, &u16Length, (INT8U *)&suPortStatus);
if (u16Error == IOL_eErrorType_NONE)
{
// ToDo: Insert application specific code here
}
INT16U IOLM_SMI_u16PortStatusReqCnf(INT8U u8Port_p, INT16U *pu16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
Get port status request and confirmation.
Definition IOLM_SMI.c:1520
This structure is used to store port status.
Definition IOLM_SMI_Types.h:936

◆ IOLM_SMI_vDSBackupFromParServReq()

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

Backup from parameter server.

With the help of this service, an SMI client such as a gateway application is able to restore the technology parameter set of a Device within Data Storage from an upper level parameter server. The answer to the request is the function IOLM_SMI_CBDSBackupFromParServCnf.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16ArgBlockLength_pLength of ArgBlock.
[in]pu8ArgBlock_pData pointer which points to the backup to parameter server.

◆ IOLM_SMI_vDSBackupToParServReq()

IOL_FUNC_DECL void IOLM_SMI_vDSBackupToParServReq ( INT8U  u8ClientID_p,
INT8U  u8Port_p 
)

Backup to parameter server.

With the help of this service, an SMI client such as a gateway application is able to retrieve the technology parameter set of a Device from Data Storage and back it up within an upper level parameter server. The answer to the request is the function IOLM_SMI_CBDSBackupToParServCnf.

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

◆ IOLM_SMI_vMasterConfigurationReq()

IOL_FUNC_DECL void IOLM_SMI_vMasterConfigurationReq ( INT8U  u8ClientID_p,
INT16U  u16ArgBlockLength_p,
INT8U pu8ArgBlock_p 
)

Set Master configuration.

This service allows to set the general configuration of the Master. The answer to the request is the function IOLM_SMI_CBMasterConfigurationCnf.

Parameters
[in]u8ClientID_pClient ID.
[in]u16ArgBlockLength_pLength of the ArgBlock.
[in]pu8ArgBlock_pData pointer which points to the Master configuration (IOLM_SMI_SVoidArgBlock).
Example
// ToDo: Set up suMasterConfig parameters
sizeof(suMasterConfig),
(INT8U *)&suMasterConfig);
IOL_FUNC_DECL void IOLM_SMI_vMasterConfigurationReq(INT8U u8ClientID_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
Set Master configuration.
Definition IOLM_SMI_API.c:872
This structure is used as general and void ArgBlock.
Definition IOLM_SMI_Types.h:577

◆ IOLM_SMI_vMasterIdentificationReq()

IOL_FUNC_DECL void IOLM_SMI_vMasterIdentificationReq ( INT8U  u8ClientID_p)

Get Master identification.

Request of the Master identification. The answer to the request is the function IOLM_SMI_CBMasterIdentificationCnf.

Parameters
[in]u8ClientID_pClient ID.

◆ IOLM_SMI_vPortConfigurationReq()

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

Set port configuration.

With the help of this service, an SMI client such as a gateway application launches the indicated Master port and the connected Device using the elements in parameter PortConfigList. The service shall be accepted immediately and performed without delay. Content of Data Storage for that port will be deleted at each new port configuration via "DS_Delete". The answer to the request is the function IOLM_SMI_CBPortConfigurationCnf.

Parameters
[in]u8ClientID_pClient ID.
[in]u8Port_pPort ID.
[in]u16ArgBlockLength_pLength of the ArgBlock.
[in]pu8ArgBlock_pData pointer which points to the port configuration (IOLM_SMI_SPortConfigList).
Example
// Set up port configuration ArgBlock
suPortConfig.u16ArgBlockID = IOLM_SMI_ENDIAN_16(IOLM_SMI_eArgBlockID_PortConfigList);
suPortConfig.u8PortMode = IOLM_SMI_ePortMode_IOL_AUTOSTART;
suPortConfig.u8ValidationBackup = IOLM_SMI_ePortValBack_NoDeviceCheck;
suPortConfig.u8IQBehavior = IOLM_SMI_ePortIQBehavior_NotSupported;
// If IOLM_SMI_ePortValBack_NoDeviceCheck is set,
// the stack will retrieve the following values from the device
suPortConfig.u8PortCycleTime = 0;
suPortConfig.u16VendorID = 0;
suPortConfig.u32DeviceID = 0;
u8Port,
sizeof(suPortConfig),
(INT8U *)&suPortConfig);
IOL_FUNC_DECL void IOLM_SMI_vPortConfigurationReq(INT8U u8ClientID_p, INT8U u8Port_p, INT16U u16ArgBlockLength_p, INT8U *pu8ArgBlock_p)
Set port configuration.
Definition IOLM_SMI_API.c:687
This structure is used to store port configuration.
Definition IOLM_SMI_Types.h:775
INT16U u16VendorID
Big endian.
Definition IOLM_SMI_Types.h:781
INT16U u16ArgBlockID
Big endian.
Definition IOLM_SMI_Types.h:776
INT8U u8PortMode
See IOLM_SMI_EPortMode.
Definition IOLM_SMI_Types.h:777
INT8U u8ValidationBackup
See IOLM_SMI_EValidationBackup.
Definition IOLM_SMI_Types.h:778
INT8U u8IQBehavior
See IOLM_SMI_EIQBehavior.
Definition IOLM_SMI_Types.h:779
INT32U u32DeviceID
Big endian.
Definition IOLM_SMI_Types.h:782

◆ IOLM_SMI_vPortStatusReq()

IOL_FUNC_DECL void IOLM_SMI_vPortStatusReq ( INT8U  u8ClientID_p,
INT8U  u8Port_p 
)

Get port status.

This service allows for retrieval of the effective status of the indicated Master port. The answer to the request is the function IOLM_SMI_CBPortStatusCnf. See also IOLM_SMI_u16PortStatusReqCnf for a combined request/confirmation service.

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

◆ IOLM_SMI_vReadbackPortConfigurationReq()

IOL_FUNC_DECL void IOLM_SMI_vReadbackPortConfigurationReq ( INT8U  u8ClientID_p,
INT8U  u8Port_p 
)

Read back port configuration.

This service allows for retrieval of the effective configuration of the indicated Master port. The answer to the request is the function IOLM_SMI_CBReadbackPortConfigurationCnf.

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