[r67]: / trunk / IoDrvMEGAIO / IoDrvFB / ICmpIoDrv / IoDrvUpdateConfiguration / svnobj  Maximize  Restore  History

Download this file

22 lines (21 with data), 8.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
METHOD IoDrvUpdateConfiguration : UDINT
VAR_INPUT
	pConnectorList : POINTER TO IoConfigConnector;
	nCount : DINT;
END_VAR
VAR
	pParameter : POINTER TO IoConfigParameter;	
	pChild : POINTER TO IoConfigConnector;	
	pstConnectorVendorName : POINTER TO STRING;
	pstConnectorDeviceName : POINTER TO STRING;
	pudtConfig : POINTER TO IoDrvConfig;
m_pConnector := IoMgrConfigGetConnector(pConnectorList, ADR(nCount), m_wModuleType, m_dwInstance);
IF m_pConnector = 0 THEN
	IoDrvUpdateConfiguration := ERRORS.ERR_PARAMETER;
//check if device is enabled in the device tree
		IoMgrSetDriverProperties(m_hInterface, DRVPROP_CONSISTENCY OR DRVPROP_BACKGROUND_GETDIAG);
		pudtConfig := IoStandard.ConfigGetParameterValuePointer(pParameter, ADR(Result));
		_instance.udtConfig := pudtConfig^;
	//Go through all childs of the device (if applicable)
		pChild := IoMgrConfigGetNextChild(pChild, ADR(nCount), m_pConnector);
	END_WHILE