//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               = "CP112_IOs"
	Revision           = "1.1"
	GUID               = "{57313482-BD5C-4316-91BE-BC6D8D2B3999}"
	RealtimeTask       = "false"
	CyclicTask         = "false"
	BackgroundTask     = "false"
	Sigmatek           = "true"
	OSInterface        = "false"
	HighPriority       = "false"
	Automatic          = "false"
	UpdateMode         = "Prescan"
	IconPath           = ".\Class\DigInOut.ICO"
	SharedCommandTable = "true"
	Objectsize         = "(750,120)"
	Comment            = "Hardwareclass to access the IOs on the CP112.">
	<Channels>
	</Channels>
	<RevDoku>
		<Owner Company="Sigmatek" Author="HaeTho"/>
		<Dokumentation Revision="1.1" Date="31.01.2019" Author="HaeTho" Company="Sigmatek" Description="Index of sub classes for CAN- and seriell connection is now &gt;= 1&#13;&#10;Add server for Ethernet connection"/>
		<Dokumentation Revision="1.0" Date="02.08.2018" Author="HaeTho" Company="Sigmatek" Description="Hardware-Editor Bus-Connectors, first library version"/>
	</RevDoku>
	<Network Name="CP112_IOs">
		<!-- List of Components in this network -->
		<Components>
			<Object
				Name       = "_base"
				GUID       = "{337D461A-11B5-452C-9DE1-04064CF7AECF}"
				Class      = "XXXBase_IOs"
				Position   = "(218,120)"
				Visualized = "false">
				<Channels>
					<Server Name="CAN_1_Connect"/>
					<Server Name="CAN_2_Connect"/>
					<Server Name="ClassState"/>
					<Server Name="COM_1_Connect"/>
					<Server Name="COM_2_Connect"/>
					<Server Name="COM_3_Connect"/>
					<Server Name="Ethernet_1_Connect"/>
					<Server Name="Ethernet_2_Connect"/>
					<Server Name="Ethernet_3_Connect"/>
					<Server Name="Ethernet_4_Connect"/>
					<Server Name="USB_1_Connect"/>
					<Client Name="To_HwControl"/>
				</Channels>
			</Object>
		</Components>
		<Comments>
		</Comments>
		<!-- List of Connections in this network -->
		<Connections>
			<Connection Source="this.ClassState" Destination="_base.ClassState" Vertices="(976,210),(804,210),"/>
			<Connection Source="this.USB_1_Connect" Destination="_base.USB_1_Connect" Vertices="(976,270),(804,270),"/>
			<Connection Source="_base.To_HwControl" Destination="this.To_HwControl" Vertices="(218,210),(38,210),"/>
			<Connection Source="this.CAN_1_Connect" Destination="_base.CAN_1_Connect" Vertices="(976,450),(804,570),"/>
			<Connection Source="this.Ethernet_1_Connect" Destination="_base.Ethernet_1_Connect" Vertices="(976,330),(804,330),"/>
			<Connection Source="this.Ethernet_2_Connect" Destination="_base.Ethernet_2_Connect" Vertices="(976,390),(804,390),"/>
		</Connections>
		<!-- Headerfiles -->
		<Options>
		</Options>
	</Network>
</Class>
*)
#pragma using XXXBase_IOs

CP112_IOs : CLASS
: XXXBase_IOs
  //Servers:
  //Clients:
  //Variables:
  //Functions:
  //Tables:
	FUNCTION @STD
		VAR_OUTPUT
			ret_code	: CONFSTATES;
		END_VAR;
	FUNCTION GLOBAL TAB @CT_;
END_CLASS;

//}}LSL_DECLARATION


FUNCTION GLOBAL TAB CP112_IOs::@CT_
0$UINT,
2#0100000000000000$UINT, //TY_CP112_IOS
1$UINT, 1$UINT, (SIZEOF(::CP112_IOs))$UINT, 
0$UINT, 0$UINT, 0$UINT, 
TO_UDINT(658879389), "CP112_IOs", //Class
TO_UDINT(819479645), "XXXBase_IOs", 1$UINT, 1$UINT, //Baseclass
//Servers:
//Clients:
END_FUNCTION


#define USER_CNT_CP112_IOs 0

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

FUNCTION CP112_IOs::@STD
	VAR_OUTPUT
		ret_code	: CONFSTATES;
	END_VAR
	VAR
		vmt	: _LSL_STD_VMETH;
		nCmdSize	: UINT;
	END_VAR

	ret_code	:= XXXBase_IOs::@STD();
	IF ret_code <> C_OK THEN
		RETURN;
	END_IF;
	nCmdSize		:= XXXBase_IOs::ClassState.pMeth^.nCmds$UINT*SIZEOF(pVoid) + CMDMETH.Init;

	_memcpy((#vmt.CmdTable)$^USINT, XXXBase_IOs::ClassState.pMeth, nCmdSize);
	vmt.CmdTable.nCmds		:= nSTDCMD + USER_CNT_CP112_IOs;
	XXXBase_IOs::ClassState.pMeth		:= StoreCmd (pCmd := #vmt.CmdTable, SHARED);

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

END_FUNCTION

//{{LSL_IMPLEMENTATION
