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

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_TCPIP_RPI.fcfx FC_Comp_Source_TCPIP_RPI.fcfx]
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_TCPIP_RPI.fcfx FC_Comp_Source_TCPIP_RPI.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 26: Line 28:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 32: Line 36:
  
 
==Macro reference==
 
==Macro reference==
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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.  
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | Remote destination address 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Port
 +
|-
 +
| colspan="2" | Remote destination port 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Receive'''
 +
|-
 +
| colspan="2" | Receive data into the data buffer. Returns the number of bytes received 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | Data byte buffer to receive the data 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Count
 +
|-
 +
| colspan="2" | Maximum number of bytes to read 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send'''
 +
|-
 +
| colspan="2" | Send data 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | Data byte buffer to send 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Count
 +
|-
 +
| colspan="2" | Number of bytes to send 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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.  
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Port
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Type
 +
|-
 +
| colspan="2" | Type of socket to create 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketClose'''
 +
|-
 +
| colspan="2" | Close the socket 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AcceptOpen'''
 +
|-
 +
| colspan="2" |  
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AcceptClose'''
 +
|-
 +
| colspan="2" | Close the accept socket 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Initialises the TCP/IP component 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
 +
 +
==Property reference==
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Label
 +
|-
 +
| colspan="2" |  
 +
|}==Macro reference==
  
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"

Revision as of 15:17, 20 January 2023

Author Matrix Ltd.
Version 1.9
Category Comms: Networking


TCP/IP (Raspberry Pi) component

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

Component Source Code

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

Fc9-comp-macro.png 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.  
Fc9-string-icon.png - STRING Address
Remote destination address 
Fc9-u16-icon.png - UINT Port
Remote destination port 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Receive
Receive data into the data buffer. Returns the number of bytes received 
Fc9-string-icon.png - STRING Data
Data byte buffer to receive the data 
Fc9-u16-icon.png - UINT Count
Maximum number of bytes to read 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png Send
Send data 
Fc9-string-icon.png - STRING Data
Data byte buffer to send 
Fc9-u16-icon.png - UINT Count
Number of bytes to send 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png 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.  
Fc9-u16-icon.png - UINT Port
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Type
Type of socket to create 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SocketClose
Close the socket 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png AcceptOpen
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png AcceptClose
Close the accept socket 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Initialises the TCP/IP component 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-10-icon.png Label
 

==Macro reference==

Fc9-comp-macro.png 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.  
Fc9-string-icon.png - STRING Address
Remote destination address 
Fc9-u16-icon.png - UINT Port
Remote destination port 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Receive
Receive data into the data buffer. Returns the number of bytes received 
Fc9-string-icon.png - STRING Data
Data byte buffer to receive the data 
Fc9-u16-icon.png - UINT Count
Maximum number of bytes to read 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png Send
Send data 
Fc9-string-icon.png - STRING Data
Data byte buffer to send 
Fc9-u16-icon.png - UINT Count
Number of bytes to send 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png 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.  
Fc9-u16-icon.png - UINT Port
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Type
Type of socket to create 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SocketClose
Close the socket 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png AcceptOpen
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png AcceptClose
Close the accept socket 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Initialises the TCP/IP component 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-10-icon.png Label