<root>
<document scada='0' projtype='1' schema='103' license='1,82702381,95CJQR' title='' description='' fcversion='720899' target='ESP.ESP32.ESP32_WROVER' >
	<config data='' clkspd='240000000' simspd='1' usewdt='0' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='&#13;&#10;' body='' />
	<debug />
	<traces />
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='7' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='5' />
			<data name='CalculatedCommsDelay' value='5' />
			<data name='AnalogEB2PrescaleValue' value='2' />
			<data name='DigitalEB2SampleRate' value='100000' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='0' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='87e4d3be-0bc6-4a13-9e00-be09a764e1b4' vstate='40' vmin='0' vmaj='1' srcleaf='ETH_ESP32.fcfx' visiblename='Ethernet (ESP32)' description='Wired Ethernet component for ESP32 modules with an RMII PHY, such as the Olimex ESP32-POE, ESP32-POE-ISO and ESP32-GATEWAY.&#13;&#10;The socket macro interface is identical to the WLAN (ESP32) component so the Network Comms, Web Server, MQTT and other network layers work unchanged on top of it.' category='Comms: Networking' category2='' category3='' bIs2dOnly='1' bIs3dOnly='0' bIsWysiwyg='0' catenable='1' author='Matrix Ltd.' manuname='Espressif' manucode='' sysinfo='1061147' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='..\..\Icons\Components\TCP_IP.png' />
		<component class_type='root' codename='ETH_ESP32' panelId='-1' x='10' y='0' z='-1' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='0' poslock='1' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' angle2d='0' comp2dType='0' >
			<resources />
			<properties >
				<property name='Verbose Debug' target='Verbose' typeid='7' hidden='0' locked='0' info='Provides verbose debugging output via hardware UART channel 1 which is often connected to a UART to USB bridge.&#13;&#10;' expansion='ETH_DEBUG' initialiser='($(value))' />
				<property name='PHY Hardware' folder='property_2' hidden='0' >
					<property name='PHY Type' target='PhyType' typeid='16' hidden='0' locked='0' info='Ethernet PHY chip connected to the ESP32 RMII interface.&#13;&#10;ESP32-POE / ESP32-POE-ISO / ESP32-GATEWAY use the LAN8710A (LAN87xx driver).&#13;&#10;WT32-ETH01 uses the LAN8720A (LAN87xx driver).' filter='000LAN87xx (LAN8710 / LAN8720)&#13;&#10;001IP101&#13;&#10;002RTL8201&#13;&#10;003DP83848&#13;&#10;004KSZ80xx' expansion='ETH_PHY_TYPE' initialiser='$(value)' />
					<property name='PHY Address' target='PhyAddr' typeid='14' hidden='0' locked='0' info='SMI address of the PHY chip, normally 0 or 1.&#13;&#10;Set to -1 to auto detect.' expansion='ETH_PHY_ADDR' initialiser='($(value))' />
					<property name='PHY Power GPIO' target='PhyPower' typeid='14' hidden='0' locked='0' info='GPIO number used to switch on power to the PHY.&#13;&#10;ESP32-POE uses GPIO12. Set to -1 if the PHY is always powered.' expansion='ETH_PHY_POWER' initialiser='($(value))' />
					<property name='PHY Reset GPIO' target='PhyReset' typeid='14' hidden='0' locked='0' info='GPIO number connected to the PHY reset pin.&#13;&#10;Set to -1 if not connected (ESP32-POE).' expansion='ETH_PHY_RESET' initialiser='($(value))' />
					<property name='MDC GPIO' target='Mdc' typeid='21' hidden='0' locked='0' info='GPIO number used for the SMI management clock (MDC).&#13;&#10;ESP32-POE uses GPIO23.' expansion='ETH_MDC' initialiser='($(value))' />
					<property name='MDIO GPIO' target='Mdio' typeid='21' hidden='0' locked='0' info='GPIO number used for the SMI management data (MDIO).&#13;&#10;ESP32-POE uses GPIO18.' expansion='ETH_MDIO' initialiser='($(value))' />
					<property name='RMII Clock' target='ClkMode' typeid='16' hidden='0' locked='0' info='Source of the 50MHz RMII reference clock.&#13;&#10;ESP32-POE / ESP32-GATEWAY: Inverted output on GPIO17.&#13;&#10;WT32-ETH01: External input on GPIO0.' filter='000External 50MHz input on GPIO0&#13;&#10;001Output on GPIO0&#13;&#10;002Output on GPIO16&#13;&#10;003Inverted output on GPIO17' expansion='ETH_CLK_MODE' initialiser='$(value)' />
				</property>
				<property name='Network Configuration' folder='property_3' hidden='0' >
					<property name='Connect Timeout' target='ConnectTimeout' typeid='21' hidden='0' locked='0' info='Maximum number of seconds Initialise waits for the cable link and, when DHCP is enabled, an IP address before giving up.&#13;&#10;Default 20' expansion='ETH_CONNECT_TIMEOUT' initialiser='($(value))' />
					<property name='DHCP' target='DHCP' typeid='7' hidden='0' locked='0' info='Enable DHCP to automatically obtain the IP address, subnet mask, gateway and DNS server from a DHCP server.&#13;&#10;When enabled the static IP Address, Subnet Mask and Gateway IP properties are not used.' expansion='ETH_DHCP' initialiser='($(value))' />
					<property name='IP Address' hidden='0' >
						<property name='IP0' target='ip0' typeid='21' hidden='0' locked='0' info='First octet of the static IP address (e.g. 192 in 192.168.1.100). Ignored when DHCP is enabled.' expansion='ETH_IP0' initialiser='($(value))' />
						<property name='IP1' target='ip1' typeid='21' hidden='0' locked='0' info='Second octet of the static IP address. Ignored when DHCP is enabled.' expansion='ETH_IP1' initialiser='($(value))' />
						<property name='IP2' target='ip2' typeid='21' hidden='0' locked='0' info='Third octet of the static IP address. Ignored when DHCP is enabled.' expansion='ETH_IP2' initialiser='($(value))' />
						<property name='IP3' target='ip3' typeid='21' hidden='0' locked='0' info='Fourth octet of the static IP address (e.g. 100 in 192.168.1.100). Ignored when DHCP is enabled.' expansion='ETH_IP3' initialiser='($(value))' />
					</property>
					<property name='Subnet Mask' hidden='0' >
						<property name='Subnet0' target='subnet0' typeid='21' hidden='0' locked='0' info='First octet of the subnet mask (e.g. 255 for 255.255.255.0). Ignored when DHCP is enabled.' expansion='ETH_SN0' initialiser='($(value))' />
						<property name='Subnet1' target='subnet1' typeid='21' hidden='0' locked='0' info='Second octet of the subnet mask. Ignored when DHCP is enabled.' expansion='ETH_SN1' initialiser='($(value))' />
						<property name='Subnet2' target='subnet2' typeid='21' hidden='0' locked='0' info='Third octet of the subnet mask. Ignored when DHCP is enabled.' expansion='ETH_SN2' initialiser='($(value))' />
						<property name='Subnet3' target='subnet3' typeid='21' hidden='0' locked='0' info='Fourth octet of the subnet mask (e.g. 0 for 255.255.255.0). Ignored when DHCP is enabled.' expansion='ETH_SN3' initialiser='($(value))' />
					</property>
					<property name='Gateway IP' hidden='0' >
						<property name='Gateway0' target='gateway0' typeid='21' hidden='0' locked='0' info='First octet of the default gateway IP address (e.g. 192 in 192.168.1.1). Ignored when DHCP is enabled.' expansion='ETH_GW0' initialiser='($(value))' />
						<property name='Gateway1' target='gateway1' typeid='21' hidden='0' locked='0' info='Second octet of the default gateway IP address. Ignored when DHCP is enabled.' expansion='ETH_GW1' initialiser='($(value))' />
						<property name='Gateway2' target='gateway2' typeid='21' hidden='0' locked='0' info='Third octet of the default gateway IP address. Ignored when DHCP is enabled.' expansion='ETH_GW2' initialiser='($(value))' />
						<property name='Gateway3' target='gateway3' typeid='21' hidden='0' locked='0' info='Fourth octet of the default gateway IP address (e.g. 1 in 192.168.1.1). Ignored when DHCP is enabled.' expansion='ETH_GW3' initialiser='($(value))' />
					</property>
					<property name='DNS Server' hidden='0' >
						<property name='DNS0' target='dns0' typeid='21' hidden='0' locked='0' info='First octet of the DNS server IP address (e.g. 8 in 8.8.8.8). Used in static IP mode; also acts as fallback if DHCP does not provide a DNS server.' expansion='ETH_DNS0' initialiser='($(value))' />
						<property name='DNS1' target='dns1' typeid='21' hidden='0' locked='0' info='Second octet of the DNS server IP address.' expansion='ETH_DNS1' initialiser='($(value))' />
						<property name='DNS2' target='dns2' typeid='21' hidden='0' locked='0' info='Third octet of the DNS server IP address.' expansion='ETH_DNS2' initialiser='($(value))' />
						<property name='DNS3' target='dns3' typeid='21' hidden='0' locked='0' info='Fourth octet of the DNS server IP address. Google Public DNS default.' expansion='ETH_DNS3' initialiser='($(value))' />
					</property>
				</property>
				<property name='RemapIndex' target='RemapIndex' typeid='21' hidden='1' locked='0' info='' />
				<property name='Simulation' folder='property_1' hidden='0' >
					<property name='Network Interface' target='TCP_Base1::interface' typeid='16' hidden='0' locked='0' info='List of network interfaces connected to the PC. &#13;&#10;Sets which interface we are communicating via.' filter='0000&#10;255AutoDetect' />
					<property name='Console Data' target='TCP_Base1::ConsoleData' typeid='7' hidden='0' locked='0' info='Generate Console Data' />
				</property>
				<property name='IsSim' target='IsSim' typeid='7' hidden='1' locked='0' info='' />
			</properties>
			<values >
				<value target='Verbose' data='0' />
				<value target='PhyType' data='000' />
				<value target='PhyAddr' data='0' />
				<value target='PhyPower' data='12' />
				<value target='PhyReset' data='-1' />
				<value target='Mdc' data='23' />
				<value target='Mdio' data='18' />
				<value target='ClkMode' data='003' />
				<value target='ConnectTimeout' data='20' />
				<value target='DHCP' data='1' />
				<value target='ip0' data='192' />
				<value target='ip1' data='168' />
				<value target='ip2' data='1' />
				<value target='ip3' data='222' />
				<value target='subnet0' data='255' />
				<value target='subnet1' data='255' />
				<value target='subnet2' data='255' />
				<value target='subnet3' data='0' />
				<value target='gateway0' data='192' />
				<value target='gateway1' data='168' />
				<value target='gateway2' data='1' />
				<value target='gateway3' data='1' />
				<value target='dns0' data='8' />
				<value target='dns1' data='8' />
				<value target='dns2' data='8' />
				<value target='dns3' data='8' />
				<value target='RemapIndex' data='22' />
				<value target='TCP_Base1::interface' data='0' />
				<value target='TCP_Base1::ConsoleData' data='1' />
				<value target='IsSim' data='0' />
			</values>
			<events >
				<event class='Simulation' event='Start' target='Ev_Start' />
				<event class='Compile' event='Start' target='Ev_CompileStart' />
				<event class='Components' event='Initialise' target='Ev_Initialise' />
				<event class='Simulation' event='Stop' target='Ev_Stop' />
				<event class='Components' event='Property' target='Ev_Property' />
				<event class='Components' event='Resize' target='Ev_Resize' />
				<event class='Compile' event='AddHeader' target='Ev_AddHeader' />
				<event class='Components' event='Renamed' target='Ev_Renamed' />
				<event class='System' event='Timer' target='Ev_Timer' />
			</events>
			<apis >
				<api name='ReadIPString' alt='ReadIPString' type='1' proto='1' />
				<api name='SocketConnect' alt='eth_socket_connect' type='5' proto='0' />
				<api name='SocketListen' alt='eth_socket_listen' type='5' proto='0' />
				<api name='ReadIP' alt='ReadIP' type='1' proto='1' />
				<api name='SocketWrite' alt='eth_socket_write' type='5' proto='0' />
				<api name='Deinitialise' alt='eth_deinitialise' type='5' proto='0' />
				<api name='SocketOpen' alt='eth_socket_open' type='5' proto='0' />
				<api name='ReadLinkStatus' alt='ReadLinkStatus' type='1' proto='1' />
				<api name='SocketClose' alt='eth_socket_close' type='5' proto='0' />
				<api name='AcceptOpen' alt='eth_accept_open' type='5' proto='0' />
				<api name='SocketRead' alt='eth_socket_read' type='5' proto='0' />
				<api name='AcceptClose' alt='eth_accept_close' type='5' proto='0' />
				<api name='Initialise' alt='eth_initialise' type='5' proto='0' />
				<api name='ReadMACString' alt='ReadMACString' type='1' proto='1' />
			</apis>
			<variables />
			<macros >
				<macro >
					<flowline name='Ev_Timer' description='Called back on the panel command System.TimerStart' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='TimerID' type='u32' description='The identifier passed to the System.TimerStart panel command' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='Handle' type='h32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Component Macro' component='TCP_Base1' macro='GetConsole' >
							<return exp='.Handle' />
						</command>
						<command class_type='sim' title='Component Macro' component='LibraryComponent1' macro='SetConsoleHandle' >
							<argument exp='.Handle' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Stop' description='Broadcast to all components that simulation has stopped' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='this' />
							<argument exp='&quot;IsSim&quot;' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadIPString' description='Collects the local IP address and returns it as an ASCII string.&#13;&#10;e.g. &quot;192.168.0.1&quot;' statediag='0' >
						<return name='Return' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2000' />
						</return>
						<local name='Dat' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='Idx' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.Return = &quot;&quot;' />
						</command>
						<command class_type='loop' title='Loop' type='2' forvar='.Idx' exp='4' for1='' for3='' >
							<flowline >
								<command class_type='call' title='User Macro' macro='ReadIP' >
									<return exp='.Dat' />
									<argument exp='3 - .Idx' />
								</command>
								<command class_type='calculation' title='Calculation' >
									<exp exp='.Return = .Return + ToString$ (.Dat)' />
								</command>
								<command class_type='decision' title='Decision' exp='.Idx &lt; 3' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='.Return = .Return + &quot;.&quot;' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Initialise' description='Initialisation routine for the component once the component is linked to its parent' statediag='0' >
						<return name='Return' type='u32' description='Non-zero to prevent initialisation' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='Setup Console Click Through' textarea='12,0,12,0' />
						<command class_type='call' title='Call Macro' macro='Ev_Property' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SocketConnect' description='' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='Port' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Call Component Macro' component='TCP_Base1' macro='Connect' >
							<return exp='.Return' />
							<argument exp='.Address' />
							<argument exp='.Port' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SocketListen' description='Listen on, or bind, local port to already opened socket.&#13;&#10;Returns 1 if OK, 0 if fail' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Port' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Call Component Macro' component='TCP_Base1' macro='Listen' >
							<return exp='.Return' />
							<argument exp='.Port' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadIP' description='Collects a single byte from the local IP address.&#13;&#10;For example 192.168.0.1&#13;&#10;Index = 3 : Return = 192 / Index = 0 : Return = 1' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Index' type='u8' description='Range: 0 to 3 Where 3 = the first number and 0 = the last number' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='native' title='C Code' ccode='// e.g. 127.0.0.1 eth_ip_addr = 0x7f000001UL&#13;&#10;// Hence if Index 0 wants least significant octet ...&#13;&#10;FCR_RETVAL = (MX_UINT8)((eth_ip_addr.addr &gt;&gt; (8* (3-FCL_INDEX)))&amp;0xFF);' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SocketWrite' description='' statediag='0' >
						<return name='Return' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Buffer' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='Size' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Call Component Macro' component='TCP_Base1' macro='Send' >
							<return exp='.Return' />
							<argument exp='.Buffer' />
							<argument exp='.Size' />
						</command>
						<command class_type='sim' title='Component Macro' component='LibraryComponent1' macro='FlashTx' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Deinitialise' description='Stops the Ethernet link, removes the driver and powers down the PHY.&#13;&#10;Call Initialise again to bring the network back up.&#13;&#10;Returns 1 if successful&#13;&#10;Returns 0 if not' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.Return = 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Property' description='Sent when a property has been changed by the User' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Built-in Function' macro='System.TimerStart' >
							<argument exp='0' />
							<argument exp='200' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Renamed' description='' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='Name' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<command class_type='sim' title='' macro='Tree.GetName' >
							<return exp='.Name' />
							<argument exp='this' />
						</command>
						<command class_type='sim' title='' macro='Component.Property.SetValue' >
							<argument exp='LibraryComponent1' />
							<argument exp='&quot;Name&quot;' />
							<argument exp='.Name' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SocketOpen' description='Returns 1 if socket sucessfully opened' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='native' title='C Code' ccode='FCR_RETVAL = eth_socket_open();' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadLinkStatus' description='Returns 1 if the Ethernet cable link is up, 0 if the link is down.' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' exp='IsSim' swap='0' >
							<flowline >
								<command class_type='calculation' title='Assume link is up in simulation' >
									<exp exp='.Return = 1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='native' title='C Code' ccode='FCR_RETVAL = eth_link_status();' language='C' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SocketClose' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='sim' title='Call Component Macro' component='TCP_Base1' macro='SocketClose' />
					</flowline>
				</macro>
				<macro >
					<flowline name='AcceptOpen' description='Returns 1 if there is an incoming connection on the listening port' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Call Component Macro' component='TCP_Base1' macro='AcceptOpen' >
							<return exp='.Return' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_AddHeader' description='Sent to a component to allow dynamic amendment of header code' statediag='0' >
						<return name='Return' type='u32' description='Non-zero to block header code insertion' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='HeadCode' type='T8*' description='Text to amend for header' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<command class_type='calculation' title='Calculation' >
							<exp exp='.Return = 0' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='.HeadCode = .HeadCode + &quot;\n//Include ESP Ethernet CAL\n#define MX_CAL_ESP32_ETH\n\n&quot;' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Resize' description='Sent to the mouse target when the user has altered the position of a component child' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Component' type='h32' description='The component that has been altered' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='PrevPos' type='h32' description='The position of the object before the start of positioning' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Final' type='b1' description='True if this is the end of a drag operation' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Built-in Function' macro='System.Forward' >
							<argument exp='LibraryComponent1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_CompileStart' description='Broadcast to all components that compilation is starting' statediag='0' >
						<return name='Return' type='u32' description='Non-zero to prevent compilation' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='this' />
							<argument exp='&quot;IsSim&quot;' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Start' description='Broadcast to all components that simulation is starting' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='this' />
							<argument exp='&quot;IsSim&quot;' />
							<argument exp='1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SocketRead' description='' statediag='0' >
						<return name='Return' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Buffer' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='Size' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Call Component Macro' component='TCP_Base1' macro='Receive' >
							<return exp='.Return' />
							<argument exp='.Buffer' />
							<argument exp='.Size' />
						</command>
						<command class_type='decision' title='Decision' exp='.Return' swap='0' >
							<flowline >
								<command class_type='sim' title='Component Macro' component='LibraryComponent1' macro='FlashRx' />
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='AcceptClose' description='Close the socket associated with the Accepted incoming connection' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='sim' title='Call Component Macro' component='TCP_Base1' macro='AcceptClose' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='Component Version Information;&#13;&#10;1, 1.0, 23-10-26, BR, Component created - wired Ethernet for ESP32 with RMII PHY (ESP32-POE). Socket interface identical to WLAN (ESP32), wireless-only macros removed, Initialise brings the link up and Deinitialise tears it down;&#13;&#10;' textarea='12,0,12,0' />
						<command class_type='call' title='Call Macro' disable='1' macro='Ev_Initialise' />
						<command class_type='call' title='Call Macro' macro='Initialise' />
						<command class_type='loop' title='Loop' type='0' exp='1' for1='' for3='' >
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadMACString' description='Returns the MAC address of the Ethernet interface as an ASCII string.&#13;&#10;e.g. &quot;24:0A:C4:12:34:56&quot;' statediag='0' >
						<return name='Return' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2000' />
						</return>
						<command class_type='decision' title='Decision' exp='IsSim' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='.Return = &quot;00:00:00:00:00:00&quot;' />
								</command>
							</flowline>
							<flowline >
								<command class_type='native' title='C Code' ccode='eth_mac_string((char*)FCR_RETVAL, FCRsz_RETVAL);' language='C' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise' description='Initialises the Ethernet MAC, PHY and network interface, brings the link up and waits for an IP address (DHCP) or for the cable link (static IP).&#13;&#10;The maximum wait is set by the Connect Timeout property.&#13;&#10;Returns 1 once the network is ready&#13;&#10;Returns 0 on failure or timeout' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Component Macro' component='TCP_Base1' macro='Initialise' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.Return = 1' />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='58be670e-18fb-477e-ab09-61fde14b23ec' vmin='0' vmaj='1' codename='LibraryComponent1' panelId='-1' x='0' y='0' z='0' xsz='100' ysz='100' zsz='100' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='1' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' angle2d='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Text::sText' data='ETH&#13;&#10;ESP32' />
					<value target='Name' data='' />
					<value target='Peripheral::sText' data='' />
					<value target='Text::nVerticalAlignment' data='002' />
					<value target='ShowComms' data='1' />
					<value target='InputIcon::CommsType' data='001' />
					<value target='InputIcon::LinkTo' data='0' />
					<value target='IconsOnRight' data='0' />
					<value target='OutputIcon::CommsType' data='255' />
					<value target='OutputIcon::LinkTo' data='0' />
					<value target='InputIcon1::CommsType' data='255' />
					<value target='ConsoleHandle' data='791' />
					<value target='Upgraded' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='54369d81-80ed-4d59-97bf-91f4b2cdf24c' vmin='2' vmaj='2' codename='TCP_Base1' panelId='-1' x='0' y='0' z='0' xsz='0.01' ysz='0.01' zsz='0.01' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='0' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' angle2d='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='hostname' data='IRONMAN-PC2' />
					<value target='interface' data='0' />
					<value target='gateway0' data='192' />
					<value target='gateway1' data='168' />
					<value target='gateway2' data='1' />
					<value target='gateway3' data='10' />
					<value target='subnet0' data='255' />
					<value target='subnet1' data='255' />
					<value target='subnet2' data='255' />
					<value target='subnet3' data='0' />
					<value target='ip0' data='192' />
					<value target='ip1' data='168' />
					<value target='ip2' data='1' />
					<value target='ip3' data='86' />
					<value target='mac0' data='16' />
					<value target='mac1' data='255' />
					<value target='mac2' data='224' />
					<value target='mac3' data='143' />
					<value target='mac4' data='157' />
					<value target='mac5' data='123' />
					<value target='ConsoleData' data='1' />
					<value target='notify_target' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='0' brightness='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='5.01088' ye='-12.0944' ze='338.82' xt='5.01088' yt='-12.0944' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='622' dy='352' zoom='222.13' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='0' />
		<winpos ID='7005' RectRecentFloat='943,314,1593,764' RectRecentDocked='947,341,1589,760' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='4' />
		<table rgb='1517134' img='' style='0' size='50' />
		<camera xe='11.4574' ye='7.91241' ze='186.521' xt='11.4574' yt='7.91241' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
		<winpos ID='7004' RectRecentFloat='0,425,654,1002' RectRecentDocked='0,0,236,872' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='0' />
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadIP' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadIPString' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Initialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='AcceptClose' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='AcceptOpen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_AddHeader' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Initialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Property' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SocketClose' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SocketConnect' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SocketListen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SocketOpen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SocketRead' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SocketWrite' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Timer' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Resize' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_CompileStart' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Stop' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Start' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadLinkStatus' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ReadMACString' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Deinitialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAbAAAAEgQAAGMDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
