Jump to content

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

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(One intermediate revision by the same user not shown)
Line 102: Line 102:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 116: Line 116:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 130: Line 130:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 154: Line 154:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 168: Line 168:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 187: Line 187:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 211: Line 211:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 235: Line 235:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 249: Line 249:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 268: Line 268:
{| class="mtx-class-macrotable wikitable"
{| 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