Difference between revisions of "Component: Webserver (GENERIC - Flash / File) (Comms: Networking)"
Line 5: | Line 5: | ||
|- | |- | ||
| width="20%" style="color:gray;" | Version | | width="20%" style="color:gray;" | Version | ||
− | | 1. | + | | 1.7 |
|- | |- | ||
| width="20%" style="color:gray;" | Category | | width="20%" style="color:gray;" | Category | ||
Line 108: | Line 108: | ||
{{Zip|WebserverFiles.zip|Webserver Files}} | {{Zip|WebserverFiles.zip|Webserver Files}} | ||
+ | |||
+ | |||
Line 319: | Line 321: | ||
| width="90%" | RX Buffer Size | | width="90%" | RX Buffer Size | ||
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Number of received bytes to buffer used to process URL and incoming parameters. |
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
+ | | width="90%" | Timeout | ||
+ | |- | ||
+ | | colspan="2" | Number of milliseconds to wait when performing the CheckSocketActivity macro. | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
Line 335: | Line 342: | ||
| colspan="2" | Sets the method for streaming data, we can either host it loacally using a property or refer to external files. | | colspan="2" | Sets the method for streaming data, we can either host it loacally using a property or refer to external files. | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:Fc9-type- | + | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] |
− | | width="90%" | | + | | width="90%" | Customise Header |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Use Callback | ||
+ | |- | ||
+ | | colspan="2" | If set to 'yes', a macro called 'HtmlCallback' with 4 parameters is required: * name - STRING[32] - the name of the web page * params - STRING[128] - a string of parameters sent to the webpage * idx - UINT - an increasing number * html - byref STRING[256] - the returned html to send The return type should be a BOOL and the macro should return true if this is the last callback iteration and the response is complete. This callback macro is repeatedly called with an increasing value of 'idx' when a page request is detected. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | HTML Pages | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] |
Latest revision as of 10:26, 20 October 2023
Author | Matrix Ltd. |
Version | 1.7 |
Category | Comms: Networking |
Contents
Webserver (GENERIC - Flash / File) component
Webserver component designed to work with Network Comms abstraction layer. Provides a very simple interface to allow webpages to be hosted from hardware or simulation. Webpages can be embedded into ROM or can be pulled directly from a local file or a SD card via the File component. The File mode allows for images and other media to be served to the web client.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_WebServer.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_WebServer.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Webserver Embedded Files
A simple example demonstrating how to host a website with fixed HTTP content including dynamic sections that can be passed in and out of Flowcode SCADA.
For example a dynamic section could be used to display a variable value on a webpage such as a temperature or used to control Flowcode e.g. turn on an output.
Webserver Dynamic Files
Flowcode Embedded
A simple example demonstrating how to host a website with dynamic content based on external files including dynamic sections that can be passed in and out of an embedded system using an SD card and an ESP8266 module.
For example a dynamic section could be used to display a variable value on a webpage such as a temperature or used to control Flowcode e.g. turn on an output.
Flowcode App Developer
A simple example demonstrating how to host a website with dynamic content based on external files including dynamic sections that can be passed in and out of Flowcode App Developer.
For example a dynamic section could be used to display a variable value on a webpage such as a temperature or used to control Flowcode e.g. turn on an output.
Macro reference
CheckSocketActivity
CreateServerSocket
GetInValue
![]() |
GetInValue |
Returns the string value of a Request parameter | |
![]() |
Index |
Incoming string Index Range: 0 to Incoming Count - 1 | |
![]() |
Return |
GetInValueFloat
![]() |
GetInValueFloat |
Returns the float value of an incoming Request parameter | |
![]() |
Index |
Range: 0 to IncomingCount - 1 | |
![]() |
Return |
GetInValueLong
![]() |
GetInValueLong |
Returns the integer value of an incoming Request parameter | |
![]() |
Index |
Range: 0 to IncomingCount - 1 | |
![]() |
Return |
Initialise
![]() |
Initialise |
Resets and initialises the Web Server component. | |
![]() |
Return |
SetOutValue
![]() |
SetOutValue |
Set the value of an outbound substitution string | |
![]() |
Index |
Incoming string Index Range: 0 to Outgoing Count - 1 | |
![]() |
Value |
![]() |
Return |
SetOutValueFloat
SetOutValueLong