Difference between revisions of "Component: Webserver (W5500) (Comms: Networking)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix Ltd.
 
| Matrix Ltd.
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Comms: Networking
 
| Comms: Networking
 
|}
 
|}
  
  
 +
==Webserver component==
 +
Webserver component designed to work with the W5500 module from Wiznet,  as use by the ETH WIZ Click Module. Provides a very simple interface to allow webpages to be hosted from hardware or simulation.
  
==[[File:Component Icon f77f2b22_6a7c_4ae6_9f5f_724660cc6c93.png|Image]] Webserver (W5500) component==
+
==Component Pack==
Webserver component designed to work with the W5500 module from Wiznet,
 
as use by the ETH WIZ Click Module.
 
Provides a very simple interface to allow webpages to be hosted from hardware or simulation.
 
  
==Examples==
+
COMMSC
''<span style="color:red;">No additional examples</span>''
 
  
 +
==Detailed description==
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>SetOutValue</tt></u></span>===
 
Set the value of an outbound substitution string
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''index''
 
  
:[[Variable Types|<- STRING]] ''value''
 
::''This parameter may be returned back to the caller''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>GetInValue</tt></u></span>===
 
Returns the string value of a Request parameter
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''index''
 
  
 +
''No detailed description exists yet for this component''
  
'''Return value'''
+
==Examples==
  
:[[Variable Types|STRING]]
 
  
  
===<span style="font-weight: normal;"><u><tt>CreateServerSocket</tt></u></span>===
 
Creates a listening socket on the selected channel and port ready to accept incoming web page requests.
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Channel''
 
  
:[[Variable Types|UINT]] ''Port''
 
  
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
 
  
  
===<span style="font-weight: normal;"><u><tt>CheckSocketActivity</tt></u></span>===
 
Checks for activity on the server socket and serves out the webpages to any requesting parties.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
 +
''<span style="color:red;">No additional examples</span>''
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
+
==Downloadable 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;" | '''WM_TXMEM'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | ch
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
Resets and initialises the Internet E-Block. It sets up the gateway address, subnet mask, device IP address and device MAC address as defined in the properties of the Flowcode component. This macro must be called before any other TCP_IP component macros
 
  
'''Parameters'''
+
{| 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;" | '''SetOutValue'''
 +
|-
 +
| colspan="2" | Set the value of an outbound substitution string&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | index
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | value
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
:''This macro has no parameters''
 
  
 +
{| 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_Embedded_HTML_Page4'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
+
{| 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_Embedded_HTML_Page3'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| 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;" | '''Send_Embedded_HTML_Page2'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
==Simulation macro reference==
 
  
''This component does not contain any simulation macros''
+
{| 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_Embedded_HTML_Page1'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| 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;"
<span style="font-weight: normal;"><u>Max Pages</u></span>
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetInValue'''
 +
|-
 +
| colspan="2" | Returns the string value of a Request parameter&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | index
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
This property is of type ''Signed integer'' and can be referenced with the variable name ''max_pages''.
 
  
Maximum number of pages we can serve using the embedded page type webserver.
+
{| 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;" | '''CreateServerSocket'''
 +
|-
 +
| colspan="2" | Creates a listening socket on the selected channel and port ready to accept incoming web page requests.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Port
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
<span style="font-weight: normal;"><u>Name Page 1</u></span>
 
  
This property is of type ''Line of text'' and can be referenced with the variable name ''name1''.
+
{| 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;" | '''IncRxPtr'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
Name of HTML page 1 - index.htm is the default page that will be presented.
 
  
<span style="font-weight: normal;"><u>HTML Page 1</u></span>
+
{| 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;" | '''CheckSocketActivity'''
 +
|-
 +
| colspan="2" | Checks for activity on the server socket and serves out the webpages to any requesting parties.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html1''.
 
  
Embedded HTML code used for page 1
+
{| 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" | Resets and initialises the Internet E-Block. It sets up the gateway address, subnet mask, device IP address and device MAC address as defined in the properties of the Flowcode component. This macro must be called before any other TCP_IP component macros &nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
<span style="font-weight: normal;"><u>Name Page 2</u></span>
 
  
This property is of type ''Line of text'' and can be referenced with the variable name ''name2''.
 
  
Name of HTML page 2
 
  
<span style="font-weight: normal;"><u>HTML Page 2</u></span>
+
==Property reference==
  
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html2''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Embedded HTML code used for page 2
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
<span style="font-weight: normal;"><u>Name Page 3</u></span>
+
|-
 
+
|-
This property is of type ''Line of text'' and can be referenced with the variable name ''name3''.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | HTML Source
Name of HTML page 3
+
|-
 
+
|-
<span style="font-weight: normal;"><u>HTML Page 3</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Max Pages
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html3''.
+
|-
 
+
| colspan="2" | Maximum number of pages we can serve using the embedded page type webserver.&nbsp;
Embedded HTML code used for page 3
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
<span style="font-weight: normal;"><u>Name Page 4</u></span>
+
| width="90%" | Name Page 1
 
+
|-
This property is of type ''Line of text'' and can be referenced with the variable name ''name4''.
+
| colspan="2" | Name of HTML page 1 - index.htm is the default page that will be presented.&nbsp;
 
+
|-
Name of HTML page 4
+
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
+
| width="90%" | HTML Page 1
<span style="font-weight: normal;"><u>HTML Page 4</u></span>
+
|-
 
+
| colspan="2" | Embedded HTML code used for page 1&nbsp;
This property is of type ''Multiple lines of text'' and can be referenced with the variable name ''html4''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
Embedded HTML code used for page 4
+
| width="90%" | Name Page 2
 
+
|-
<span style="font-weight: normal;"><u>Channel</u></span>
+
| colspan="2" | Name of HTML page 2&nbsp;
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::CHANNEL''.
+
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
+
| width="90%" | HTML Page 2
SPI Channel selector
+
|-
 
+
| colspan="2" | Embedded HTML code used for page 2 &nbsp;
<span style="font-weight: normal;"><u>Prescale</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::PR_SCALE''.
+
| width="90%" | Name Page 3
 
+
|-
Prescale option selector
+
| colspan="2" | Name of HTML page 3&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>MOSI</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
+
| width="90%" | HTML Page 3
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::MOSI''.
+
|-
 
+
| colspan="2" | Embedded HTML code used for page 3&nbsp;
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
<span style="font-weight: normal;"><u>MISO</u></span>
+
| width="90%" | Name Page 4
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::MISO''.
+
| colspan="2" | Name of HTML page 4&nbsp;
 
+
|-
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
+
| width="10%" align="center" | [[File:Fc9-type-11-icon.png]]
 
+
| width="90%" | HTML Page 4
<span style="font-weight: normal;"><u>CLK</u></span>
+
|-
 
+
| colspan="2" | Embedded HTML code used for page 4&nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::CLK''.
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
SPI Clock Pin CLK - The Clock signal is driven by the SPI master.
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 
+
|-
<span style="font-weight: normal;"><u>CS / SS</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_spi::SS''.
+
| width="90%" | Channel
 
+
|-
Chip Select / Slave Select Pin
+
| colspan="2" | SPI Channel selector&nbsp;
 
+
|-
Master Mode: General purpose output pin used to select the remote SPI device.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Prescale
Slave Mode: Hardware chip select pin input used to select the SPI device.
+
|-
 
+
| colspan="2" | Prescale option selector&nbsp;
<span style="font-weight: normal;"><u>Int Pin</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
This property is of type ''Single digital pin'' and can be referenced with the variable name ''int_pin''.
+
| width="90%" | MOSI
 
+
|-
Interrupt pin connection on Wiznet module
+
| colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Gateway0</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | MISO
This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway0''.
+
|-
 
+
| colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.&nbsp;
IP address of the gateway to the internet if applicable.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
<span style="font-weight: normal;"><u>Gateway1</u></span>
+
| width="90%" | CLK
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway1''.
+
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master.&nbsp;
 
+
|-
IP address of the gateway to the internet if applicable.
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | CS / SS
<span style="font-weight: normal;"><u>Gateway2</u></span>
+
|-
 
+
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device. &nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway2''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
IP address of the gateway to the internet if applicable.
+
| width="90%" | Int Pin
 
+
|-
<span style="font-weight: normal;"><u>Gateway3</u></span>
+
| colspan="2" | Interrupt pin connection on Wiznet module&nbsp;
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''gateway3''.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Gateway IP
IP address of the gateway to the internet if applicable.
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Subnet0</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Gateway0
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet0''.
+
|-
 
+
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
Subnet mask of the server - usually 255.255.255.0
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
<span style="font-weight: normal;"><u>Subnet1</u></span>
+
| width="90%" | Gateway1
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet1''.
+
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
 
+
|-
Subnet mask of the server - usually 255.255.255.0
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Gateway2
<span style="font-weight: normal;"><u>Subnet2</u></span>
+
|-
 
+
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet2''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Subnet mask of the server - usually 255.255.255.0
+
| width="90%" | Gateway3
 
+
|-
<span style="font-weight: normal;"><u>Subnet3</u></span>
+
| colspan="2" | IP address of the gateway to the internet if applicable.&nbsp;
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''subnet3''.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Subnet Mask
Subnet mask of the server - usually 255.255.255.0
+
|-
 
+
|-
<span style="font-weight: normal;"><u>IP0</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Subnet0
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip0''.
+
|-
 
+
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
IP address of the server - usually 192.168.0.x or 192.168.1.x
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
<span style="font-weight: normal;"><u>IP1</u></span>
+
| width="90%" | Subnet1
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip1''.
+
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
 
+
|-
IP address of the server - usually 192.168.0.x or 192.168.1.x
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Subnet2
<span style="font-weight: normal;"><u>IP2</u></span>
+
|-
 
+
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip2''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
IP address of the server - usually 192.168.0.x or 192.168.1.x
+
| width="90%" | Subnet3
 
+
|-
<span style="font-weight: normal;"><u>IP3</u></span>
+
| colspan="2" | Subnet mask of the server - usually 255.255.255.0&nbsp;
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''ip3''.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | IP Address
IP address of the server - usually 192.168.0.x or 192.168.1.x
+
|-
 
+
|-
<span style="font-weight: normal;"><u>MAC0</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | IP0
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac0''.
+
|-
 
+
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
MAC address of the server
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
<span style="font-weight: normal;"><u>MAC1</u></span>
+
| width="90%" | IP1
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac1''.
+
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
 
+
|-
MAC address of the server
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | IP2
<span style="font-weight: normal;"><u>MAC2</u></span>
+
|-
 
+
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac2''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
MAC address of the server
+
| width="90%" | IP3
 
+
|-
<span style="font-weight: normal;"><u>MAC3</u></span>
+
| colspan="2" | IP address of the server - usually 192.168.0.x or 192.168.1.x&nbsp;
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac3''.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | MAC Address
MAC address of the server
+
|-
 
+
|-
<span style="font-weight: normal;"><u>MAC4</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | MAC0
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac4''.
+
|-
 
+
| colspan="2" | MAC address of the server&nbsp;
MAC address of the server
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
<span style="font-weight: normal;"><u>MAC5</u></span>
+
| width="90%" | MAC1
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''mac5''.
+
| colspan="2" | MAC address of the server&nbsp;
 
+
|-
MAC address of the server
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | MAC2
<span style="font-weight: normal;"><u>Count</u></span>
+
|-
 
+
| colspan="2" | MAC address of the server&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Outgoing_Count''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Maximum number of outbound string substitutions
+
| width="90%" | MAC3
 
+
|-
<span style="font-weight: normal;"><u>Length 0</u></span>
+
| colspan="2" | MAC address of the server&nbsp;
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_0''.
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | MAC4
Number of bytes to reserve for data string.
+
|-
 
+
| colspan="2" | MAC address of the server&nbsp;
<span style="font-weight: normal;"><u>Length 1</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_1''.
+
| width="90%" | MAC5
 
+
|-
Number of bytes to reserve for data string.
+
| colspan="2" | MAC address of the server&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Length 2</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Substitutions
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Out_Len_2''.
+
|-
 
+
|-
Number of bytes to reserve for data string.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Outgoing
<span style="font-weight: normal;"><u>Count</u></span>
+
|-
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Incoming_Count''.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Count
Maximum number of inbound string substitutions
+
|-
 
+
| colspan="2" | Maximum number of outbound string substitutions&nbsp;
<span style="font-weight: normal;"><u>Length 0</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''In_Len_0''.
+
| width="90%" | Length 0
 
+
|-
Number of bytes to reserve for data string.
+
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Label</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Length 1
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
+
|-
 
+
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
Label used to help identify the component on the panel.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
<span style="font-weight: normal;"><u>Sim Type</u></span>
+
| width="90%" | Length 2
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''SimType''.
+
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
 
+
|-
Decides how to perform the simulation of the component.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Incoming
TCP IP - Communicates using the Windows TCP IP communications DLL
+
|-
 
+
|-
SPI / Injector - Communicates using the CAL SPI to allow the communications to be analysed and debugged.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Count
<span style="font-weight: normal;"><u>Scope Traces</u></span>
+
|-
 
+
| colspan="2" | Maximum number of inbound string substitutions&nbsp;
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi::ScopeTraces''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Selects if the scope traces are automatically generated or not
+
| width="90%" | Length 0
 
+
|-
<span style="font-weight: normal;"><u>Console Data</u></span>
+
| colspan="2" | Number of bytes to reserve for data string.&nbsp;
 
+
|-
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi::ConsoleData''.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
Selects if the console data is automatically generated or not
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Injector</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
+
| width="90%" | Label
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi::Injector''.
+
|-
 
+
| colspan="2" | Label used to help identify the component on the panel.&nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Sim Type
 
+
|-
<span style="font-weight: normal;"><u>Network Interface</u></span>
+
| colspan="2" | Decides how to perform the simulation of the component. TCP IP - Communicates using the Windows TCP IP communications DLL SPI / Injector - Communicates using the CAL SPI to allow the communications to be analysed and debugged.&nbsp;
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''TCP_Base::interface''.
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | TCP Simulation
List of network interfaces connected to the PC.
+
|-
 
+
|-
Sets which interface we are communicating via.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Network Interface
 +
|-
 +
| colspan="2" | List of network interfaces connected to the PC.  Sets which interface we are communicating via.&nbsp;
 +
|}

Latest revision as of 17:25, 9 November 2022

Author Matrix Ltd.
Version 1.0
Category Comms: Networking


Webserver component

Webserver component designed to work with the W5500 module from Wiznet, as use by the ETH WIZ Click Module. Provides a very simple interface to allow webpages to be hosted from hardware or simulation.

Component Pack

COMMSC

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png WM_TXMEM
 
Fc9-u8-icon.png - BYTE ch
 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png SetOutValue
Set the value of an outbound substitution string 
Fc9-u8-icon.png - BYTE index
 
Fc9-string-icon.png - STRING value
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Send_Embedded_HTML_Page4
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Send_Embedded_HTML_Page3
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Send_Embedded_HTML_Page2
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Send_Embedded_HTML_Page1
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetInValue
Returns the string value of a Request parameter 
Fc9-u8-icon.png - BYTE index
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png CreateServerSocket
Creates a listening socket on the selected channel and port ready to accept incoming web page requests. 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u16-icon.png - UINT Port
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png IncRxPtr
 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CheckSocketActivity
Checks for activity on the server socket and serves out the webpages to any requesting parties. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Resets and initialises the Internet E-Block. It sets up the gateway address, subnet mask, device IP address and device MAC address as defined in the properties of the Flowcode component. This macro must be called before any other TCP_IP component macros  
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png HTML Source
Fc9-type-14-icon.png Max Pages
Maximum number of pages we can serve using the embedded page type webserver. 
Fc9-type-10-icon.png Name Page 1
Name of HTML page 1 - index.htm is the default page that will be presented. 
Fc9-type-11-icon.png HTML Page 1
Embedded HTML code used for page 1 
Fc9-type-10-icon.png Name Page 2
Name of HTML page 2 
Fc9-type-11-icon.png HTML Page 2
Embedded HTML code used for page 2  
Fc9-type-10-icon.png Name Page 3
Name of HTML page 3 
Fc9-type-11-icon.png HTML Page 3
Embedded HTML code used for page 3 
Fc9-type-10-icon.png Name Page 4
Name of HTML page 4 
Fc9-type-11-icon.png HTML Page 4
Embedded HTML code used for page 4 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
SPI Channel selector 
Fc9-type-16-icon.png Prescale
Prescale option selector 
Fc9-type-5-icon.png MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
Fc9-type-5-icon.png MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
Fc9-type-5-icon.png CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Fc9-type-5-icon.png CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Fc9-type-5-icon.png Int Pin
Interrupt pin connection on Wiznet module 
Fc9-conn-icon.png Gateway IP
Fc9-type-14-icon.png Gateway0
IP address of the gateway to the internet if applicable. 
Fc9-type-14-icon.png Gateway1
IP address of the gateway to the internet if applicable. 
Fc9-type-14-icon.png Gateway2
IP address of the gateway to the internet if applicable. 
Fc9-type-14-icon.png Gateway3
IP address of the gateway to the internet if applicable. 
Fc9-conn-icon.png Subnet Mask
Fc9-type-14-icon.png Subnet0
Subnet mask of the server - usually 255.255.255.0 
Fc9-type-14-icon.png Subnet1
Subnet mask of the server - usually 255.255.255.0 
Fc9-type-14-icon.png Subnet2
Subnet mask of the server - usually 255.255.255.0 
Fc9-type-14-icon.png Subnet3
Subnet mask of the server - usually 255.255.255.0 
Fc9-conn-icon.png IP Address
Fc9-type-14-icon.png IP0
IP address of the server - usually 192.168.0.x or 192.168.1.x 
Fc9-type-14-icon.png IP1
IP address of the server - usually 192.168.0.x or 192.168.1.x 
Fc9-type-14-icon.png IP2
IP address of the server - usually 192.168.0.x or 192.168.1.x 
Fc9-type-14-icon.png IP3
IP address of the server - usually 192.168.0.x or 192.168.1.x 
Fc9-conn-icon.png MAC Address
Fc9-type-14-icon.png MAC0
MAC address of the server 
Fc9-type-14-icon.png MAC1
MAC address of the server 
Fc9-type-14-icon.png MAC2
MAC address of the server 
Fc9-type-14-icon.png MAC3
MAC address of the server 
Fc9-type-14-icon.png MAC4
MAC address of the server 
Fc9-type-14-icon.png MAC5
MAC address of the server 
Fc9-conn-icon.png Substitutions
Fc9-conn-icon.png Outgoing
Fc9-type-16-icon.png Count
Maximum number of outbound string substitutions 
Fc9-type-21-icon.png Length 0
Number of bytes to reserve for data string. 
Fc9-type-21-icon.png Length 1
Number of bytes to reserve for data string. 
Fc9-type-21-icon.png Length 2
Number of bytes to reserve for data string. 
Fc9-conn-icon.png Incoming
Fc9-type-16-icon.png Count
Maximum number of inbound string substitutions 
Fc9-type-21-icon.png Length 0
Number of bytes to reserve for data string. 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
Label used to help identify the component on the panel. 
Fc9-type-16-icon.png Sim Type
Decides how to perform the simulation of the component. TCP IP - Communicates using the Windows TCP IP communications DLL SPI / Injector - Communicates using the CAL SPI to allow the communications to be analysed and debugged. 
Fc9-conn-icon.png TCP Simulation
Fc9-type-16-icon.png Network Interface
List of network interfaces connected to the PC. Sets which interface we are communicating via.