<root>
<document scada='0' schema='103' license='1,CompMaker,PWKUUN' title='' description='' fcversion='655360' target='PIC.16F.16F1937' >
	<config data='!0,fe2!10,1633%0,2%3,0%5,1%6,1%7,1%8,1%9,3%b,1%c,0%d,0%10,3%14,3%18,0%19,1%1a,1%1c,1%1d,0' clkspd='19660800' simspd='1' usewdt='0' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='1' head='// Hack for erroneously exported declarations
#define MX_DLL_DECL(a,b,c)
' 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='9' />
			<data name='CalculatedCommsDelay' value='9' />
			<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='1' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='1' />
		<definition guid='0341d84f-f7fd-473c-8076-b38b2d563e13' vstate='40' vmin='9' vmaj='1' srcleaf='TCPIP_RPI.fcfx' visiblename='TCP/IP (Raspberry Pi)' description='TCP/IP sockets component for use with Raspberry Pi.
Raspberry Pi Only' category='Comms: Networking' category2='' category3='' bIs2dOnly='1' bIs3dOnly='0' catenable='1' author='Matrix Ltd.' manuname='Raspberry Pi Foundation' manucode='' sysinfo='1053083' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='..\..\Icons\Components\TCP_IP.png' />
		<component class_type='root' codename='TCP_IP_Pi' panelId='-1' x='0' y='0' z='0' 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='0' comp2dType='0' >
			<resources />
			<properties >
				<property name='Label' target='label' typeid='10' hidden='0' locked='0' info='' />
				<property name='RemapIndex' target='RemapIndex' typeid='21' hidden='1' locked='0' info='' />
			</properties>
			<values >
				<value target='label' data='RPi TCP/IP' />
				<value target='RemapIndex' data='1' />
			</values>
			<events >
				<event class='Compile' event='AddHeader' target='Ev_AddHeader' />
				<event class='Simulation' event='Stop' target='Ev_Stop' />
				<event class='Components' event='Initialise' target='Ev_Initialise' />
				<event class='Simulation' event='Start' target='Ev_Start' />
				<event class='Components' event='Property' target='Ev_Property' />
				<event class='Components' event='Renamed' target='Ev_Renamed' />
			</events>
			<apis >
				<api name='Connect' alt='FC_CAL_SOCKET_$(macro)_$(instance)' type='5' proto='1' />
				<api name='Receive' alt='FC_CAL_SOCKET_$(macro)_$(instance)' type='5' proto='1' />
				<api name='Send' alt='FC_CAL_SOCKET_$(macro)_$(instance)' type='5' proto='1' />
				<api name='Listen' alt='FC_CAL_SOCKET_$(macro)_$(instance)' type='5' proto='1' />
				<api name='SocketOpen' alt='FC_CAL_SOCKET_$(macro)_$(instance)' type='5' proto='1' />
				<api name='SocketClose' alt='FC_CAL_SOCKET_$(macro)_$(instance)' type='5' proto='1' />
				<api name='AcceptOpen' alt='FC_CAL_SOCKET_$(macro)_$(instance)' type='5' proto='1' />
				<api name='AcceptClose' alt='FC_CAL_SOCKET_$(macro)_$(instance)' type='5' proto='1' />
				<api name='Initialise' alt='Initialise' type='1' proto='1' />
			</apis>
			<variables >
				<variable public='0' >
					<def class_type='variable' name='IP' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='console' type='h32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<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='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='SocketClose' />
						<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='AcceptClose' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Connect' description='Attempt to connect to the given address and port.
First open a socket on the local device using the Socket function and check that it is successful. ' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='T8*' description='Remote destination address' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='Port' type='u16' description='Remote destination port' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='ParseIPString' >
							<return exp='.Return' />
							<argument exp='.Address' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Return' swap='0' >
							<flowline >
								<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='CreateTCPSocket' >
									<argument exp='0' />
									<argument exp='.Port &gt;&gt; 8' />
									<argument exp='.Port' />
								</command>
								<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='TCPConnect' >
									<return exp='.Return' />
									<argument exp='0' />
									<argument exp='IP[0]' />
									<argument exp='IP[1]' />
									<argument exp='IP[2]' />
									<argument exp='IP[3]' />
									<argument exp='.Port &gt;&gt; 8' />
									<argument exp='.Port' />
								</command>
								<command class_type='sim' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='LibraryComponent1' macro='FlashRx' />
								<command class_type='sim' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='LibraryComponent1' macro='FlashTx' />
							</flowline>
							<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='' />
						<local name='temp_str' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='temp_handle' type='h32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='sim' title='Simulation' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='GetConsole' >
							<return exp='console' />
						</command>
						<command class_type='sim' title='Simulation' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='LibraryComponent1' macro='SetConsoleHandle' >
							<argument exp='console' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Receive' description='Receive data into the data buffer.
Returns the number of bytes received' statediag='0' >
						<return name='Return' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Data' type='T8*' description='Data byte buffer to receive the data' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='Count' type='u16' description='Maximum number of bytes to read' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='DataAvailable' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='RxDataAvailable' >
							<return exp='.DataAvailable' />
							<argument exp='0' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.DataAvailable' swap='0' >
							<flowline >
								<command class_type='sim' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='LibraryComponent1' macro='FlashRx' />
								<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='RxDataSize' >
									<return exp='.Return' />
									<argument exp='0' />
								</command>
								<command class_type='comment' title='' comment='Need a check on size here!' textarea='12,0,12,0' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' />
								<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='RxReadString' >
									<return exp='.Data' />
									<argument exp='0' />
									<argument exp='.Return' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Send' description='Send data' statediag='0' >
						<return name='Return' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Data' type='T8*' description='Data byte buffer to send' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<param name='Count' type='u16' description='Number of bytes to send' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='idx' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<local name='temp' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2' />
						</local>
						<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='TxStart' >
							<argument exp='0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' type='0' exp='.idx &lt; .Count' >
							<flowline >
								<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='TxSendByte' >
									<argument exp='0' />
									<argument exp='.Data[.idx]' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='.idx = .idx + 1' />
								</command>
								<command class_type='sim' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='LibraryComponent1' macro='FlashTx' />
							</flowline>
						</command>
						<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='TxEnd' >
							<argument exp='0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='.Return = .idx' />
						</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='' />
						<local name='str' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
					</flowline>
				</macro>
				<macro >
					<flowline name='ParseIPString' description='Converts a string into a set of 4 bytes -&gt; IP[4]
Returns: 0=Fail, 1=OK' statediag='0' >
						<return name='Return' type='b1' 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>
						<local name='idx' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<local name='length' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='IPidx' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
						<command class_type='calculation' title='Default to invalid address' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='.Return = 0' />
						</command>
						<command class_type='calculation' title='Reset IP address' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='IP[0] = 0' />
							<exp exp='IP[1] = 0' />
							<exp exp='IP[2] = 0' />
							<exp exp='IP[3] = 0' />
						</command>
						<command class_type='calculation' title='Calculate Length of string to parse' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='.length = Length$ (.Address)' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' type='0' exp='.idx &lt; .length' >
							<flowline >
								<command class_type='decision' title='Decision' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Address[.idx] = &apos;.&apos;' swap='0' >
									<flowline >
										<command class_type='calculation' title='Increment IP pointer' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='.IPidx = .IPidx + 1' />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='(.Address[.idx] &gt;= &apos;0&apos;) &amp;&amp; (.Address[.idx] &lt;= &apos;9&apos;)' swap='0' >
											<flowline >
												<command class_type='calculation' title='Add number to IP' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
													<exp exp='IP[.IPidx] = IP[.IPidx] * 10' />
													<exp exp='IP[.IPidx] = IP[.IPidx] + (.Address[.idx] - &apos;0&apos;)' />
												</command>
											</flowline>
											<flowline >
												<command class_type='calculation' title='Unrecognised character' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
													<exp exp='.idx = .length' />
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
								<command class_type='calculation' title='Increment string pointer' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='.idx = .idx + 1' />
								</command>
							</flowline>
						</command>
						<command class_type='decision' title='Do we have a valid IP &quot;x.x.x.x&quot;' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.IPidx = 3' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='.Return = 1' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Listen' description='Bind the socket to a port on the local host and set to listen mode.
First open a socket on the local device using the Socket function and check that it is successful. ' 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' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='CreateTCPSocket' >
							<return exp='.Return' />
							<argument exp='0' />
							<argument exp='.Port &gt;&gt; 8' />
							<argument exp='.Port' />
						</command>
						<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='TCPListen' >
							<argument exp='0' />
						</command>
						<command class_type='sim' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='LibraryComponent1' macro='FlashRx' />
					</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='' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='Tree.GetName' >
							<return exp='.Name' />
							<argument exp='this' />
						</command>
						<command class_type='sim' title='' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='Component.Property.SetValue' >
							<argument exp='LibraryComponent1' />
							<argument exp='&quot;Name&quot;' />
							<argument exp='.Name' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SocketOpen' description='Attempts to create a socket on the local device.
Type =0 for TCP, =1 for UDP
This must be successfully done before attempting connection with a remote destination.
Returns 1 if successful, 0 if not.' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Type' type='u8' description='Type of socket to create' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='.Return = 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SocketClose' description='Close the socket' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='sim' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='TCPClose' >
							<argument exp='0' />
						</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>
						<local name='ih' type='h32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='sim' title='Simulation' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='Component.GetInstance' >
							<return exp='.ih' />
							<argument exp='this' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='.HeadCode = .HeadCode + &quot;#define MX_SOCKET_REF&quot; + STRING .ih + &quot;\n&quot;' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='AcceptOpen' description='' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='.Return = 1' />
						</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='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='TCP_Base' macro='Initialise' />
					</flowline>
				</macro>
				<macro >
					<flowline name='AcceptClose' description='Close the accept socket' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
					</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='call' title='Call Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='Ev_Initialise' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise' description='Initialises the TCP/IP component' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='54369d81-80ed-4d59-97bf-91f4b2cdf24c' vmin='2' vmaj='2' codename='TCP_Base' panelId='-1' x='0' y='0' z='0' xsz='0.01' ysz='0.01' zsz='0' 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='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='hostname' data='192.168.0.1' />
					<value target='interface' data='4' />
					<value target='gateway0' data='192' />
					<value target='gateway1' data='168' />
					<value target='gateway2' data='0' />
					<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='0' />
					<value target='ip3' data='41' />
					<value target='mac0' data='164' />
					<value target='mac1' data='107' />
					<value target='mac2' data='182' />
					<value target='mac3' data='24' />
					<value target='mac4' data='2' />
					<value target='mac5' data='89' />
					<value target='ConsoleData' data='1' />
					<value target='notify_target' data='dash_IO_flasher1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<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' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Text::sText' data='RPi
TCP/IP' />
					<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='ConsoleHandle' data='0' />
					<value target='Upgraded' data='0' />
				</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='-26.5227' ye='-16.0087' ze='478.794' xt='-26.5227' yt='-16.0087' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='622' dy='343' zoom='157.191' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='0' />
		<winpos ID='7005' RectRecentFloat='1270,379,1920,829' RectRecentDocked='0,0,642,413' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='1' />
	</panel2d>
	<panel3d shadows='0' lighting='0' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='-4.26694' ye='54.1141' ze='161.53' xt='-4.26694' yt='54.1141' zt='0.606553' 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='52,5954,694,6367' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='1' />
	</panel3d>
	<panels2d count='0' />
	<layout >
		<view type='0' name='Receive' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SocketOpen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Initialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Initialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SocketClose' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Send' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Listen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Connect' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='AcceptOpen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='AcceptClose' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ParseIPString' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Property' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAUwYAABoCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
