Difference between revisions of "Component: TCP Template (Comms: Networking)"
From Flowcode Help
Jump to navigationJump to searchLine 16: | Line 16: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 22: | Line 24: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 1,079: | Line 1,083: | ||
|- | |- | ||
| colspan="2" | Specifies the communications channel 0-3 | | colspan="2" | Specifies the communications channel 0-3 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
Revision as of 11:07, 17 November 2021
Author | Matrix Ltd. |
Version | 2.2 |
Category | Comms: Networking |
Contents
TCP Template component
Base TCP/IP component with simulation only interface to allow TCP/IP style network communications in simulation. Suitable for inheriting
Detailed description
No detailed description exists yet for this component
Examples
Additional examples can be found in the “Apps and Bundles” section of this Wiki:
Wireless LAN Application Guide
Downloadable macro reference
![]() |
SetPropertyVal |
![]() |
Property |
![]() |
Value |
![]() |
Return |
![]() |
SecureWrite |
Attempts to write max number of bytes to the secure socket from the buffer. Returns actual number of bytes written. | |
![]() |
buffer |
[[File:]] - | max |
[[File:]] - | Return |
![]() |
ForcePropEvent |
Allows the property event to be fired, doing things like fetching the correct IP for the network interface. | |
![]() |
Return |
![]() |
Receive |
Receive data into the data buffer. Returns the number of bytes received | |
![]() |
Data |
Data byte buffer to receive the data | |
![]() |
Count |
Maximum number of bytes to read | |
![]() |
Return |
![]() |
SendTo |
Send data to a destination host. Returns the number of bytes sent. | |
![]() |
Data |
Data byte buffer to send | |
![]() |
Count |
Number of bytes to send | |
![]() |
Address |
![]() |
Port |
![]() |
Return |
![]() |
SecureConnect |
Connect securely to host and port. e.g. “www.bbc.co.uk:443” Returns 1 if successful, 0 if not | |
![]() |
host |
Host:Port as string | |
[[File:]] - | Return |
![]() |
GetConsole |
Obtain the console instance for the TCP/IP base. | |
[[File:]] - | Return |
![]() |
Send |
Send data | |
![]() |
Data |
Data byte buffer to send | |
![]() |
Count |
Number of bytes to send | |
![]() |
Return |
![]() |
SecureClose |
Close the secure connection | |
![]() |
Return |
![]() |
TxEnd |
Once the transmit buffer has been filled with data, call this macro to actually send the data. | |
![]() |
Channel |
Specifies the communications channel 0-3 | |
![]() |
Return |
![]() |
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. | |
![]() |
Port |
![]() |
Return |
![]() |
GetPropertyVal |
![]() |
Property |
![]() |
Return |
![]() |
SocketClose |
Close the socket | |
![]() |
Return |
![]() |
SecureRead |
Attempts to read max number of bytes from the secure socket into the buffer. Returns actual number of bytes read. | |
![]() |
buffer |
[[File:]] - | max |
[[File:]] - | Return |
![]() |
AcceptOpen |
![]() |
Return |
![]() |
RxDataSize |
This macro is used to detect the size of data collected by the Rx_data_available macro. | |
![]() |
Channel |
Specifies the communications channel 0-3 | |
![]() |
Return |
![]() |
AcceptClose |
Close the accept socket | |
![]() |
Return |
![]() |
SecureInit |
Call once to initialise the secure socket funtionality | |
![]() |
Return |
![]() |
GetSocketStatus |
This returns the state of the requested channel's socket. | |
![]() |
Channel |
Specifies the communications channel 0-3 | |
![]() |
Return |