Component: Webserver (WIZ810MJ) (Comms: Networking)
Author | Matrix Ltd. |
Version | 1.5 (Release) |
Category | Comms: Networking |
Contents
Webserver (WIZ810MJ) component
Webserver component designed to work with the WIZ810MJ module from Wiznet, as used in the version 2 EB023 E-block and MIAC System Industrial Addon. Provides a very simple interface to allow webpages to be hosted from hardware or simulation.
Examples
Please note that due to limitations with use if RAM storage on some processors you will need to ensure that each line of the page text (HTML) is quite short, usually below 100 characters. Otherwise this can cause an error such as “Error: No remaining RAM block (on target) big enough for:”
Additional examples can be found in the “Apps and Bundles” section of this Wiki:
Wireless LAN Application Guide
Downloadable macro reference
SetOutValue
Set the value of an outbound substitution string
Parameters
- BYTE index
- <- STRING value
- This parameter may be returned back to the caller
Return value
- This call does not return a value
GetInValue
Returns the string value of a Request parameter
Parameters
- BYTE index
Return value
CreateServerSocket
Creates a listening socket on the selected channel and port ready to accept incoming web page requests.
Parameters
- BYTE Channel
- BYTE Port_Hi
- BYTE Port_Lo
Return value
CheckSocketActivity
Checks for activity on the server socket and serves out the webpages to any requesting parties.
Parameters
- This macro has no parameters
Return value
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
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Label
This property is of type Line of text and can be referenced with the variable name label.
Label used to help identify the component on the panel.
Max Channels
This property is of type Signed integer and can be referenced with the variable name max_channels.
Max number of concurrent connections allowed
HTML Source
This property is of type Fixed list of ints and can be referenced with the variable name html_source.
Sets the method for streaming data, we can either host it loacally using a property or refer to external files.
Max Pages
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.
Name Page 1
This property is of type Line of text and can be referenced with the variable name name1.
Name of HTML page 1 - index.htm is the default page that will be presented.
HTML Page 1
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
Name Page 2
This property is of type Line of text and can be referenced with the variable name name2.
Name of HTML page 2
HTML Page 2
This property is of type Multiple lines of text and can be referenced with the variable name html2.
Embedded HTML code used for page 2
Name Page 3
This property is of type Line of text and can be referenced with the variable name name3.
Name of HTML page 3
HTML Page 3
This property is of type Multiple lines of text and can be referenced with the variable name html3.
Embedded HTML code used for page 3
Name Page 4
This property is of type Line of text and can be referenced with the variable name name4.
Name of HTML page 4
HTML Page 4
This property is of type Multiple lines of text and can be referenced with the variable name html4.
Embedded HTML code used for page 4
SPI Channel
This property is of type Fixed list of ints and can be referenced with the variable name channel.
SPI channel selection
MOSI Pin
This property is of type Single digital pin and can be referenced with the variable name MOSI_pin.
SPI data out, serial data in pin connection on Wiznet module
MISO Pin
This property is of type Single digital pin and can be referenced with the variable name MISO_pin.
SPI data in, serial data out pin connection on Wiznet module
CLK Pin
This property is of type Single digital pin and can be referenced with the variable name CLK_pin.
SPI clock pin connection on Wiznet module
CS Pin
This property is of type Single digital pin and can be referenced with the variable name CS_pin.
SPI chip select pin connection on Wiznet module
Int Pin
This property is of type Single digital pin and can be referenced with the variable name int_pin.
Interrupt pin connection on Wiznet module
Gateway0
This property is of type Signed integer and can be referenced with the variable name gateway0.
IP address of the gateway to the internet if applicable.
Gateway1
This property is of type Signed integer and can be referenced with the variable name gateway1.
IP address of the gateway to the internet if applicable.
Gateway2
This property is of type Signed integer and can be referenced with the variable name gateway2.
IP address of the gateway to the internet if applicable.
Gateway3
This property is of type Signed integer and can be referenced with the variable name gateway3.
IP address of the gateway to the internet if applicable.
Subnet0
This property is of type Signed integer and can be referenced with the variable name subnet0.
Subnet mask of the server - usually 255.255.255.0
Subnet1
This property is of type Signed integer and can be referenced with the variable name subnet1.
Subnet mask of the server - usually 255.255.255.0
Subnet2
This property is of type Signed integer and can be referenced with the variable name subnet2.
Subnet mask of the server - usually 255.255.255.0
Subnet3
This property is of type Signed integer and can be referenced with the variable name subnet3.
Subnet mask of the server - usually 255.255.255.0
IP0
This property is of type Signed integer and can be referenced with the variable name ip0.
IP address of the server - usually 192.168.0.x or 192.168.1.x
IP1
This property is of type Signed integer and can be referenced with the variable name ip1.
IP address of the server - usually 192.168.0.x or 192.168.1.x
IP2
This property is of type Signed integer and can be referenced with the variable name ip2.
IP address of the server - usually 192.168.0.x or 192.168.1.x
IP3
This property is of type Signed integer and can be referenced with the variable name ip3.
IP address of the server - usually 192.168.0.x or 192.168.1.x
MAC0
This property is of type Signed integer and can be referenced with the variable name mac0.
MAC address of the server
MAC1
This property is of type Signed integer and can be referenced with the variable name mac1.
MAC address of the server
MAC2
This property is of type Signed integer and can be referenced with the variable name mac2.
MAC address of the server
MAC3
This property is of type Signed integer and can be referenced with the variable name mac3.
MAC address of the server
MAC4
This property is of type Signed integer and can be referenced with the variable name mac4.
MAC address of the server
MAC5
This property is of type Signed integer and can be referenced with the variable name mac5.
MAC address of the server