Component: Webserver (EB023 v1) (E-blocks 1)
Author | Matrix TSL |
Version | 2.0 (Release) |
Category | E-blocks 1 |
Contents
Webserver (EB023 v1) component
Webserver component designed to work with the NM7010A module from Wiznet, as used in the version 1 EB023 E-block. Provides a very simple interface to allow webpages to be hosted from hardware or simulation.
Examples
No additional examples
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 channels allowed
I2C Address
This property is of type Fixed list of ints and can be referenced with the variable name MAC_WR_ADDR.
I2C address of the module - bit 0
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
Channel
This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c::CHANNEL.
Channel selection
Baud Select
This property is of type Fixed list of ints and can be referenced with the variable name cal_i2c::BAUD_LIST.
Baud rate option selector
Baud Rate
This property is of type Signed integer and can be referenced with the variable name cal_i2c::BAUD.
Baud rate to be used
Stop Delay
This property is of type True or false and can be referenced with the variable name cal_i2c::StopDel.
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not
a 10ms delay between an I2C stop event and the next I2C start event.
Most modern microcontrollers will not have a problem so this property can be disabled to speed up the
I2C communications.
SDA
This property is of type Single digital pin and can be referenced with the variable name cal_i2c::SDA.
Pin used for SDA (data signal)
SCL
This property is of type Single digital pin and can be referenced with the variable name cal_i2c::SCL.
Pin used for SCL (clock signal)
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
Count
This property is of type Fixed list of ints and can be referenced with the variable name Outgoing_Count.
Maximum number of outbound string substitutions
Length 0
This property is of type Unsigned integer and can be referenced with the variable name Out_Len_0.
Number of bytes to reserve for data string.
Length 1
This property is of type Unsigned integer and can be referenced with the variable name Out_Len_1.
Number of bytes to reserve for data string.
Length 2
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.
Count
This property is of type Fixed list of ints and can be referenced with the variable name Incoming_Count.
Maximum number of inbound string substitutions
Length 0
This property is of type Unsigned integer and can be referenced with the variable name In_Len_0.
Number of bytes to reserve for data string.