Jump to content

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

From Flowcode Help
No edit summary
No edit summary
Line 85: Line 85:


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




Line 90: Line 92:
==Macro reference==
==Macro reference==


===Connect===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 113: Line 116:




===Receive===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 136: Line 140:




===Send===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 159: Line 164:




===Listen===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 177: Line 183:




===SocketOpen===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 195: Line 202:




===SocketClose===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 208: Line 216:




===AcceptOpen===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 221: Line 230:




===AcceptClose===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
Line 234: Line 244:




===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-

Revision as of 11:52, 3 February 2023

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

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


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


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


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


SocketClose

SocketClose
Close the socket 
- VOID Return


AcceptOpen

AcceptOpen
 
- BYTE Return


AcceptClose

AcceptClose
Close the accept socket 
- VOID Return


Initialise

Initialise
 
- VOID Return



Property reference

Properties