Jump to content

Component: TCP/IP Dummy (Raspberry Pi) (Comms: Networking): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(4 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/TCPIP_RPI_Dummy.fcfx FC_Comp_Source_temp/TCPIP_RPI_Dummy.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_TCPIP_RPI_Dummy.fcfx FC_Comp_Source_TCPIP_RPI_Dummy.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/TCPIP_RPI_Dummy.fcfx FC_Comp_Source_temp/TCPIP_RPI_Dummy.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_TCPIP_RPI_Dummy.fcfx FC_Comp_Source_TCPIP_RPI_Dummy.fcfx]


==Detailed description==
==Detailed description==
Line 85: Line 85:


{{Fcfile|NetworkComms-RPI-Server.fcfx|Example RPI HTML Webserver}}
{{Fcfile|NetworkComms-RPI-Server.fcfx|Example RPI HTML Webserver}}




Line 97: Line 99:


===AcceptClose===
===AcceptClose===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AcceptClose'''
| width="90%" class="mtx-class-macrohead" | '''AcceptClose'''
|-
|-
| colspan="2" | Close the accept socket 
| colspan="2" | Close the accept socket 
Line 111: Line 113:


===AcceptOpen===
===AcceptOpen===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AcceptOpen'''
| width="90%" class="mtx-class-macrohead" | '''AcceptOpen'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 125: Line 127:


===Connect===
===Connect===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connect'''
| width="90%" class="mtx-class-macrohead" | '''Connect'''
|-
|-
| colspan="2" | 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.  
| colspan="2" | 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.  
Line 149: Line 151:


===Initialise===
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 163: Line 165:


===Listen===
===Listen===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Listen'''
| width="90%" class="mtx-class-macrohead" | '''Listen'''
|-
|-
| colspan="2" | 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.  
| colspan="2" | 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.  
Line 182: Line 184:


===Receive===
===Receive===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Receive'''
| width="90%" class="mtx-class-macrohead" | '''Receive'''
|-
|-
| colspan="2" | Receive data into the data buffer. Returns the number of bytes received 
| colspan="2" | Receive data into the data buffer. Returns the number of bytes received 
Line 206: Line 208:


===Send===
===Send===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send'''
| width="90%" class="mtx-class-macrohead" | '''Send'''
|-
|-
| colspan="2" | Send data 
| colspan="2" | Send data 
Line 230: Line 232:


===SocketClose===
===SocketClose===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketClose'''
| width="90%" class="mtx-class-macrohead" | '''SocketClose'''
|-
|-
| colspan="2" | Close the socket 
| colspan="2" | Close the socket 
Line 244: Line 246:


===SocketOpen===
===SocketOpen===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketOpen'''
| width="90%" class="mtx-class-macrohead" | '''SocketOpen'''
|-
|-
| colspan="2" | 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. 
| colspan="2" | 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. 
Line 264: Line 266:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|}
|}

Latest revision as of 14:23, 13 July 2026

Author Matrix Ltd.
Version 1.8
Category Comms: Networking


TCP/IP Dummy component

TCP/IP sockets component for use with Raspberry Pi. Raspberry Pi Only

Component Source Code

Please click here to download the component source project: FC_Comp_Source_TCPIP_RPI_Dummy.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_TCPIP_RPI_Dummy.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Here is an example of using the TCP/IP component as a means to request data from a remote server on the internet or local network.

Example RPI Client Request Data


Here is an example of using the TCP/IP component as a means to serve data to a client via the internet or local network.

Example RPI HTML Webserver






Macro reference

AcceptClose

AcceptClose
Close the accept socket 
- VOID Return


AcceptOpen

AcceptOpen
 
- BYTE Return


Connect

Connect
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.  
- STRING Address
Remote destination address 
- UINT Port
Remote destination port 
- BYTE Return


Initialise

Initialise
 
- VOID Return


Listen

Listen
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.  
- UINT Port
 
- BYTE Return


Receive

Receive
Receive data into the data buffer. Returns the number of bytes received 
- STRING Data
Data byte buffer to receive the data 
- UINT Count
Maximum number of bytes to read 
- UINT Return


Send

Send
Send data 
- STRING Data
Data byte buffer to send 
- UINT Count
Number of bytes to send 
- UINT Return


SocketClose

SocketClose
Close the socket 
- VOID Return


SocketOpen

SocketOpen
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. 
- BYTE Type
Type of socket to create 
- BYTE Return


Property reference

Properties