//This file was generated by the LASAL2 CodeGenerator  -- 
//Please, do not edit this file (it might be overwritten by the next generator run)
//{{LSL_DECLARATION

(*!
<Class
	Name               = "XXXBase_IOs"
	Revision           = "1.1"
	GUID               = "{42E1B640-B96E-4F8F-89AF-47A9750E5F90}"
	RealtimeTask       = "false"
	CyclicTask         = "false"
	BackgroundTask     = "false"
	Sigmatek           = "true"
	OSInterface        = "false"
	HighPriority       = "false"
	Automatic          = "false"
	UpdateMode         = "Prescan"
	IconPath           = ".\Class\DigInOut.ICO"
	SharedCommandTable = "true"
	Objectsize         = "(570,540)"
	Comment            = "Baseclass for CPU_IO classes.">
	<Channels>
		<Server Name="CAN_1_Connect" GUID="{83C939D4-A82F-4B02-B773-1C6DC179E5F9}" Class="_CanLib" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="CAN_2_Connect" GUID="{383E4B58-CFED-458A-8E6B-564AE6891714}" Class="_CanLib" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="ClassState" GUID="{3A3AB6B3-8638-4EBF-BE1F-FF95BD2A673E}" Visualized="true" Initialize="false" WriteProtected="true" Retentive="false" Comment="Shows the state of the class.&#13;&#10;0 ... ok."/>
		<Server Name="COM_1_Connect" GUID="{6A4552D6-7062-4CAD-AD9A-E7619F9F37CA}" Class="_SerLib" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="COM_2_Connect" GUID="{1BFC4461-9020-48D2-9DB1-E823170D2123}" Class="_SerLib" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="COM_3_Connect" GUID="{09E89E80-DF2D-42DC-834B-8C75F5F3328E}" Class="_SerLib" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="Ethernet_1_Connect" GUID="{6985EEDF-2BAB-48D0-AC8D-BBDF20AC8CA1}" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="Ethernet_2_Connect" GUID="{4442C261-D7FA-44B3-8FE1-981FC3115A30}" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="Ethernet_3_Connect" GUID="{9F32484C-3598-435B-8C6E-CE5C8302FAE1}" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="Ethernet_4_Connect" GUID="{23B8FBAF-0399-4AA9-857A-CB018029A0B8}" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Server Name="USB_1_Connect" GUID="{24A03AA2-AED4-4115-ACB5-AE6797BBD4F1}" Visualized="false" Initialize="false" WriteProtected="true" Retentive="false" Comment="Connection servers for Hardware-Editor."/>
		<Client Name="_CanLib1" Required="true" Internal="true"/>
		<Client Name="_CanLib2" Required="true" Internal="true"/>
		<Client Name="_SerLib1" Required="true" Internal="true"/>
		<Client Name="_SerLib2" Required="true" Internal="true"/>
		<Client Name="_SerLib3" Required="true" Internal="true"/>
		<Client Name="To_HwControl" Required="true" Internal="false" Comment="Connect to server &quot;Control&quot; of &quot;HwControl&quot;-Object"/>
	</Channels>
	<RevDoku>
		<Owner Company="Sigmatek" Author="HaeTho"/>
		<Dokumentation Revision="1.1" Date="06.11.2018" Author="HaeTho&#13;&#10;EisMic" Company="Sigmatek" Description="Index of sub classes for CAN- and seriell connection is now &gt;= 1&#13;&#10;Added methods LogError and LogValue."/>
		<Dokumentation Revision="1.0" Date="02.08.2018" Author="HaeTho" Company="Sigmatek" Description="Hardware-Editor Bus-Connectors, first library version"/>
	</RevDoku>
	<Network Name="XXXBase_IOs">
		<!-- List of Components in this network -->
		<Components>
			<Object
				Name       = "_CanLib1"
				GUID       = "{99F54FB9-50C4-4B09-9754-D88D3CAD66E4}"
				Class      = "_CanLib"
				Position   = "(150,300)"
				Visualized = "true"
				Remotely   = "true">
				<Channels>
					<Server Name="CanBus" Value="1"/>
					<Server Name="Command"/>
					<Client Name="To_Can"/>
				</Channels>
			</Object>
			<Object
				Name       = "_CanLib2"
				GUID       = "{AE619A04-D25E-4D1A-A696-5DECE6B25694}"
				Class      = "_CanLib"
				Position   = "(150,510)"
				Visualized = "true"
				Remotely   = "true">
				<Channels>
					<Server Name="CanBus" Value="2"/>
					<Server Name="Command"/>
					<Client Name="To_Can"/>
				</Channels>
			</Object>
			<Object
				Name       = "_SerLib1"
				GUID       = "{20E65384-3D3B-4ACE-BEEE-0C43CE37B814}"
				Class      = "_SerLib"
				Position   = "(150,720)"
				Visualized = "true"
				Remotely   = "true">
				<Channels>
					<Server Name="Com" Value="1"/>
					<Server Name="Command"/>
				</Channels>
			</Object>
			<Object
				Name       = "_SerLib2"
				GUID       = "{4164A4B8-81D1-4134-8792-127DF657E364}"
				Class      = "_SerLib"
				Position   = "(150,930)"
				Visualized = "true"
				Remotely   = "true">
				<Channels>
					<Server Name="Com" Value="2"/>
					<Server Name="Command"/>
				</Channels>
			</Object>
			<Object
				Name       = "_SerLib3"
				GUID       = "{6D7A9FC0-9DDD-45A0-8169-90CDF9145BFC}"
				Class      = "_SerLib"
				Position   = "(150,1140)"
				Visualized = "true"
				Remotely   = "true">
				<Channels>
					<Server Name="Com" Value="3"/>
					<Server Name="Command"/>
				</Channels>
			</Object>
		</Components>
		<Comments>
		</Comments>
		<!-- List of Connections in this network -->
		<Connections>
			<Connection Source="this._CanLib1" Destination="_CanLib1.Command"/>
			<Connection Source="this.CAN_1_Connect" Destination="_CanLib1.Command" Vertices="(652,570),(480,390),"/>
			<Connection Source="this._CanLib2" Destination="_CanLib2.Command"/>
			<Connection Source="this.CAN_2_Connect" Destination="_CanLib2.Command" Vertices="(652,630),(480,600),"/>
			<Connection Source="this._SerLib1" Destination="_SerLib1.Command"/>
			<Connection Source="this.COM_1_Connect" Destination="_SerLib1.Command" Vertices="(652,690),(450,810),"/>
			<Connection Source="this._SerLib2" Destination="_SerLib2.Command"/>
			<Connection Source="this.COM_2_Connect" Destination="_SerLib2.Command" Vertices="(652,750),(450,1020),"/>
			<Connection Source="this._SerLib3" Destination="_SerLib3.Command"/>
			<Connection Source="this.COM_3_Connect" Destination="_SerLib3.Command" Vertices="(652,810),(450,1230),"/>
		</Connections>
		<!-- Headerfiles -->
		<Options>
		</Options>
	</Network>
</Class>
*)
XXXBase_IOs : CLASS
  //Servers:
	ClassState 	: SvrChCmd_DINT;
	USB_1_Connect 	: SvrChCmd_DINT;
	Ethernet_1_Connect 	: SvrChCmd_DINT;
	Ethernet_2_Connect 	: SvrChCmd_DINT;
	Ethernet_3_Connect 	: SvrChCmd_DINT;
	Ethernet_4_Connect 	: SvrChCmd_DINT;
	CAN_1_Connect 	: SvrChCmd_DINT;
	CAN_2_Connect 	: SvrChCmd_DINT;
	COM_1_Connect 	: SvrChCmd_DINT;
	COM_2_Connect 	: SvrChCmd_DINT;
	COM_3_Connect 	: SvrChCmd_DINT;
  //Clients:
	To_HwControl 	: CltChCmd_HwControl;
	_SerLib1 	: CltChCmd__SerLib;
	_SerLib2 	: CltChCmd__SerLib;
	_CanLib1 	: CltChCmd__CanLib;
	_CanLib2 	: CltChCmd__CanLib;
	_SerLib3 	: CltChCmd__SerLib;
  //Variables:
  //Functions:
	
	FUNCTION LogError
		VAR_INPUT
			pMsg 	: ^CHAR;
		END_VAR;
	
	FUNCTION LogValue
		VAR_INPUT
			pString 	: ^CHAR;
			udValue 	: UDINT;
			udValue2 	: UDINT;
			udValue3 	: UDINT;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL Ethernet_1_Connect::NewInst
		VAR_INPUT
			pPara 	: ^CmdStruct;
			pResult 	: ^results;
		END_VAR
		VAR_OUTPUT
			ret_code 	: iprStates;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL Ethernet_2_Connect::NewInst
		VAR_INPUT
			pPara 	: ^CmdStruct;
			pResult 	: ^results;
		END_VAR
		VAR_OUTPUT
			ret_code 	: iprStates;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL Ethernet_3_Connect::NewInst
		VAR_INPUT
			pPara 	: ^CmdStruct;
			pResult 	: ^results;
		END_VAR
		VAR_OUTPUT
			ret_code 	: iprStates;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL Ethernet_4_Connect::NewInst
		VAR_INPUT
			pPara 	: ^CmdStruct;
			pResult 	: ^results;
		END_VAR
		VAR_OUTPUT
			ret_code 	: iprStates;
		END_VAR;
	
	FUNCTION VIRTUAL GLOBAL COM_3_Connect::Read
		VAR_OUTPUT
			output (EAX) 	: DINT;
		END_VAR;
  //Tables:
	FUNCTION @STD
		VAR_OUTPUT
			ret_code	: CONFSTATES;
		END_VAR;
	FUNCTION GLOBAL TAB @CT_;
END_CLASS;

#pragma using _CanLib
#pragma using _SerLib
#pragma usingLtd HwControl


//}}LSL_DECLARATION


FUNCTION GLOBAL TAB XXXBase_IOs::@CT_
0$UINT,
2#0100000000000000$UINT, //TY_XXXBASE_IOS
1$UINT, 1$UINT, (SIZEOF(::XXXBase_IOs))$UINT, 
11$UINT, 6$UINT, 0$UINT, 
TO_UDINT(819479645), "XXXBase_IOs", //Class
TO_UDINT(0), 0, 0$UINT, 0$UINT, //Baseclass
//Servers:
(::XXXBase_IOs.ClassState.pMeth)$UINT, _CH_CMD$UINT, 2#0000000000000000$UINT, TO_UDINT(1096059024), "ClassState", 
(::XXXBase_IOs.USB_1_Connect.pMeth)$UINT, _CH_CMD$UINT, 2#0000000000000000$UINT, TO_UDINT(4121287287), "USB_1_Connect", 
(::XXXBase_IOs.Ethernet_1_Connect.pMeth)$UINT, _CH_CMD$UINT, 2#0000000000000000$UINT, TO_UDINT(1853777383), "Ethernet_1_Connect", 
(::XXXBase_IOs.Ethernet_2_Connect.pMeth)$UINT, _CH_CMD$UINT, 2#0000000000000000$UINT, TO_UDINT(1475565858), "Ethernet_2_Connect", 
(::XXXBase_IOs.Ethernet_3_Connect.pMeth)$UINT, _CH_CMD$UINT, 2#0000000000000000$UINT, TO_UDINT(1082674529), "Ethernet_3_Connect", 
(::XXXBase_IOs.Ethernet_4_Connect.pMeth)$UINT, _CH_CMD$UINT, 2#0000000000000000$UINT, TO_UDINT(619258024), "Ethernet_4_Connect", 
(::XXXBase_IOs.CAN_1_Connect.pMeth)$UINT, _CH_SVR_OBJ$UINT, 2#0000000000000000$UINT, TO_UDINT(192824020), "CAN_1_Connect", 
(::XXXBase_IOs.CAN_2_Connect.pMeth)$UINT, _CH_SVR_OBJ$UINT, 2#0000000000000000$UINT, TO_UDINT(854818321), "CAN_2_Connect", 
(::XXXBase_IOs.COM_1_Connect.pMeth)$UINT, _CH_SVR_OBJ$UINT, 2#0000000000000000$UINT, TO_UDINT(2074998731), "COM_1_Connect", 
(::XXXBase_IOs.COM_2_Connect.pMeth)$UINT, _CH_SVR_OBJ$UINT, 2#0000000000000000$UINT, TO_UDINT(1109445390), "COM_2_Connect", 
(::XXXBase_IOs.COM_3_Connect.pMeth)$UINT, _CH_SVR_OBJ$UINT, 2#0000000000000000$UINT, TO_UDINT(1432084301), "COM_3_Connect", 
//Clients:
(::XXXBase_IOs.To_HwControl.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(1012711711), "To_HwControl", TO_UDINT(2471641665), "HwControl", 5$UINT, 24$UINT, 
(::XXXBase_IOs._SerLib1.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(3678909994), "_SerLib1", TO_UDINT(4078275645), "_SerLib", 1$UINT, 35$UINT, 
(::XXXBase_IOs._SerLib2.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(1112467344), "_SerLib2", TO_UDINT(4078275645), "_SerLib", 1$UINT, 35$UINT, 
(::XXXBase_IOs._CanLib1.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(2182615665), "_CanLib1", TO_UDINT(529317953), "_CanLib", 1$UINT, 10$UINT, 
(::XXXBase_IOs._CanLib2.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(454116299), "_CanLib2", TO_UDINT(529317953), "_CanLib", 1$UINT, 10$UINT, 
(::XXXBase_IOs._SerLib3.pCh)$UINT, _CH_CLT_OBJ$UINT, 2#0000000000000010$UINT, TO_UDINT(894031622), "_SerLib3", TO_UDINT(4078275645), "_SerLib", 1$UINT, 35$UINT, 
END_FUNCTION


#define USER_CNT_XXXBase_IOs 0

TYPE
	_LSL_STD_VMETH	: STRUCT
			CmdTable	: CMDMETH;
			UserFcts	: ARRAY[0..USER_CNT_XXXBase_IOs] OF ^Void;
	END_STRUCT;
END_TYPE

FUNCTION XXXBase_IOs::@STD
	VAR_OUTPUT
		ret_code	: CONFSTATES;
	END_VAR
	VAR
		vmt	: _LSL_STD_VMETH;
	END_VAR

	//Command Methods
	InitCmdTable (nCmd := nSTDCMD + USER_CNT_XXXBase_IOs, pCmd := #vmt.CmdTable);
	ClassState.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF ClassState.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, USB_1_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	USB_1_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF USB_1_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, Ethernet_1_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	vmt.CmdTable.NewInstr		:= #Ethernet_1_Connect::NewInst();
	Ethernet_1_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF Ethernet_1_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, Ethernet_2_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	vmt.CmdTable.NewInstr		:= #Ethernet_2_Connect::NewInst();
	Ethernet_2_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF Ethernet_2_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, Ethernet_3_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	vmt.CmdTable.NewInstr		:= #Ethernet_3_Connect::NewInst();
	Ethernet_3_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF Ethernet_3_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, Ethernet_4_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	vmt.CmdTable.NewInstr		:= #Ethernet_4_Connect::NewInst();
	Ethernet_4_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF Ethernet_4_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, CAN_1_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	CAN_1_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF CAN_1_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, CAN_2_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	CAN_2_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF CAN_2_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, COM_1_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	COM_1_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF COM_1_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, COM_2_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	COM_2_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF COM_2_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;
	_memcpy((#vmt.CmdTable)$^USINT, COM_3_Connect.pMeth, SIZEOF(CMDMETH));
	vmt.CmdTable.nCmds		:= nSTDCMD;
	vmt.CmdTable.Read		:= #COM_3_Connect::Read();
	COM_3_Connect.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

	IF COM_3_Connect.pMeth THEN
		ret_code	:= C_OK;
	ELSE
		ret_code	:= C_OUTOF_NEAR;
		RETURN;
	END_IF;

END_FUNCTION

//{{LSL_IMPLEMENTATION


FUNCTION XXXBase_IOs::LogError
	VAR_INPUT
		pMsg 	: ^CHAR;
	END_VAR

#ifdef HWC_LogError
  HWC_LogError(this, pMsg);
#endif

END_FUNCTION

FUNCTION XXXBase_IOs::LogValue
	VAR_INPUT
		pString 	: ^CHAR;
		udValue 	: UDINT;
		udValue2 	: UDINT;
		udValue3 	: UDINT;
	END_VAR

#ifdef HWC_LogValue3
  HWC_LogValue3(this, pString, udValue, udValue2, udValue3);
#endif

END_FUNCTION


FUNCTION VIRTUAL GLOBAL XXXBase_IOs::Ethernet_1_Connect::NewInst
	VAR_INPUT
		pPara 	: ^CmdStruct;
		pResult 	: ^Results;
	END_VAR
	VAR_OUTPUT
		ret_code 	: IprStates;
	END_VAR
  
  ret_code := ERROR;

	CASE pPara^.uiCmd OF
  
    //***********************************************************************************************************  
		CMD_HWC_GET_INTERFACE_NUMBER:
    
      //Check for valid version
      if pPara^.aPara[0] = 0x1 then
    
        //Return version number
        pResult^.aData[0] := 0x1; 
        
        //Interface number of Ethernet Interface
        pResult^.aData[1]$DINT  := 1;
        
        ret_code := READY;
      end_if;  
    
    //***********************************************************************************************************
        
	END_CASE;


END_FUNCTION


FUNCTION VIRTUAL GLOBAL XXXBase_IOs::Ethernet_2_Connect::NewInst
	VAR_INPUT
		pPara 	: ^CmdStruct;
		pResult 	: ^Results;
	END_VAR
	VAR_OUTPUT
		ret_code 	: IprStates;
	END_VAR

  ret_code := ERROR;

	CASE pPara^.uiCmd OF
  
    //***********************************************************************************************************  
		CMD_HWC_GET_INTERFACE_NUMBER:
    
      //Check for valid version
      if pPara^.aPara[0] = 0x1 then
    
        //Return version number
        pResult^.aData[0] := 0x1; 
        
        //Interface number of Ethernet Interface
        pResult^.aData[1]$DINT  := 2;
        
        ret_code := READY;
      end_if;  
    
    //***********************************************************************************************************
    
	END_CASE;

END_FUNCTION


FUNCTION VIRTUAL GLOBAL XXXBase_IOs::Ethernet_3_Connect::NewInst
	VAR_INPUT
		pPara 	: ^CmdStruct;
		pResult 	: ^Results;
	END_VAR
	VAR_OUTPUT
		ret_code 	: IprStates;
	END_VAR

  ret_code := ERROR;

	CASE pPara^.uiCmd OF
  
    //***********************************************************************************************************  
		CMD_HWC_GET_INTERFACE_NUMBER:
    
      //Check for valid version
      if pPara^.aPara[0] = 0x1 then
    
        //Return version number
        pResult^.aData[0] := 0x1; 
        
        //Interface number of Ethernet Interface
        pResult^.aData[1]$DINT  := 3;
        
        ret_code := READY;
      end_if;  
    
    //***********************************************************************************************************
    
	END_CASE;

END_FUNCTION


FUNCTION VIRTUAL GLOBAL XXXBase_IOs::Ethernet_4_Connect::NewInst
	VAR_INPUT
		pPara 	: ^CmdStruct;
		pResult 	: ^Results;
	END_VAR
	VAR_OUTPUT
		ret_code 	: IprStates;
	END_VAR

  ret_code := ERROR;

	CASE pPara^.uiCmd OF
  
    //***********************************************************************************************************  
		CMD_HWC_GET_INTERFACE_NUMBER:
    
      //Check for valid version
      if pPara^.aPara[0] = 0x1 then
    
        //Return version number
        pResult^.aData[0] := 0x1; 
        
        //Interface number of Ethernet Interface
        pResult^.aData[1]$DINT  := 4;
        
        ret_code := READY;
      end_if;  
    
    //***********************************************************************************************************
    
	END_CASE;

END_FUNCTION


FUNCTION VIRTUAL GLOBAL XXXBase_IOs::COM_3_Connect::Read
	VAR_OUTPUT
		output (EAX) 	: DINT;
	END_VAR

	COM_3_Connect := _SerLib3.Command.Read();
	output := COM_3_Connect;

END_FUNCTION
