Webtags/Parameters: Difference between revisions

3,004 bytes removed ,  12:20, 1 October 2022
m
no edit summary
(Created page with "This page is the new ''Webtags Parameters'' page. This page is part of a complete rewrite of the ''Webtags'' page. This page is Work in Progress until this message is deleted...")
 
mNo edit summary
Line 10: Line 10:


<hr/>
<hr/>
{{Template:Version badge Mx}}{{Version badge 1}}This Wiki page applies to both flavours of Cumulus currently available.
= Introduction =


=Introduction=
Put simply, using a Webtag is described on the [[Webtags#Using_Webtags|Webtag]] page. Only the GET API interface can't use parameters. All the other possibilities use the general Webtag format:


Put simply, a [[Webtags|Cumulus tag]] is included to indicate where Cumulus should insert values when it [[Customised_templates#What_is_meant_by_.27Cumulus_processes_templates.27|processes the command/file]] that quotes the tags.
  <#tag_name [optional input selection parameters] [optional output modification parameters]>


The general format for every Cumulus tag is: <code><#tag_name [optional input selection parameters] [optional output modification parameters]></code>
In the following the input and output parameters are described.


This page is about those (generally optional) parameters used for modifying Cumulus tags.
# An input parameter is used where the same tag name can represent a value for a number of different past time instants. Each of those past time instants is represented by a different value for the input parameter. So a combination of a tag name and input modification parameter lets CumulusMX select the value you want to see. Whether a particular tag name can use input modification parameters will be shown in the Full list of Webtags.
 
# An output parameter is used when a particular tag name can be fed through a process that alters how the output is shown:
# An input parameter is used where the same tag name can represent a value for a number of different past time instants.  
#* Each of those past time instants is represented by a different value for the input parameter.  
#* So a combination of a tag name and input modification parameter lets Cumulus select the value you want to see.  
#* Whether a particular tag name can use input modification parameters will depend on both which tag name has been chosen, and which Cumulus release you are using.
# An output parameter is used when a particular tag name can be fed through a process that alters how the output is shown
#* Tag names representing integer values cannot have their output format modified
#* Tag names representing integer values cannot have their output format modified
#* Internally Cumulus handles numbers in binary, for numbers that have an integer and a decimal part, there is no exact conversion between the way the decimal part of a number is stored in binary, and the way the decimal part (after the decimal comma/point) appears on output. Therefore, non-integer numbers have to be rounded, and there are some output parameters that modify the output:
#* Tag names representing floats or doubles can have modifications :
#*# You can modify the number of decimal places shown for some tag names
#*# modification of the number of decimal places shown after processing
#*# With Cumulus MX, you can modify whether number is output with a decimal comma, or a decimal point
#*# modification of the decimal separator (comma or point)
#* Tag names representing time intervals, clock times, [[meterological day|dates]] or representing both time/date for an extreme record, may have a fixed format that cannot be changed, or may be able to be processed through a date-time routine that changes how either time or date or both are output
#* Tag names representing time intervals, clock times, [[meterological day|dates]] or representing both time/date for an extreme record may have the format changed
 
 
All this parameter information was originally on [[Webtags]] page, but has been moved to this separate page as part of an attempt to make the Wiki easier to read by shortening pages.
 
 
=Legacy software=
 
The legacy Cumulus 1 software can only use tag names, and whatever parameters are permitted, within a file.  Steve Loft used  [[Cumulus template file|'''Cumulus Template File''']] for a file that used tags:
* The legacy Cumulus 1 software, and MX releases up to release 3.9.7 - build 3107, provided a selection of template files (see [[Customised templates]] that produced 'standard' web pages, see [[Cumulus.ini_(Cumulus_1)#Section:_FTP_site|"IncludeSTD" here]].
* A Cumulus user could specify an alternative [[Customised_templates#HTML_5_-_a_very_quick_guide_to_structure|web page]],
* A Cumulus user could transfer data to a web server using a [[Php_webtags#Option_3:_JavaScript_Object_Notation|JavaScript Object Notation (.json) file]]
* A Cumulus user could transfer data to a web server using a  [[Feels_Like#HTML_code_to_translate_web_tags_to_JavaScript_variables_.28as_modified_for_additional_parameters.29|JavaScript file]],
* A Cumulus user could transfer data to a web server using a  [[PHP]] script file, or
* A Cumulus user could transfer data to a web server using a  [[Xml_webtags|eXtensible Mark-up Language (XML)]] file.
 
For information on how to process, and upload, non-standard files, see [[Cumulus.ini_(Cumulus_1)#Section:_FTP_site|"ExtraProcessxx"]].
 
 
=Cumulus MX software=
 
MX can process template files, using [[Cumulus.ini#Extra_Web_Files|Extra web file settings]], but tag names (and input/output parameters as permitted) can also be used in:
* standard [[websitedataT.json]] template file, or a tailored file that is processed into same destination file
* on demand using [[Cumulus_MX_Local_API|Cumulus MX Local API]]
* standard or custom interval use of [[Cumulus.ini#Optional_Structured_Query_Language_Settings|"My SQL Connector"]]
* Customised [[Cumulus.ini_(MX_3.0.0_to_3.7.0)#MQTT|MQTT]] commands


=Rules=
= Rules =


Tag names and parameters must obey certain rules.
Tag names and parameters must obey certain rules.


== Case sensitivity ==


== Case sensitivity for tag names ==
The ''tag_name'' in the general format above is case sensitive, so please type the tag name exactly as shown in lists of tag names. The [[Webtags#The_local_List|local list]] is a useful reference here.
 
The tag_name in the general format above is case sensitive, so please type the tag name exactly as shown in lists of tag names.
 
== Case sensitivity for parameters ==


The optional input modification parameters always use lower case, so please type them exactly as shown in the [[#Input modification Parameters|section below]].
The ''optional input modification parameters'' always use lower case, so please type them exactly as shown in the [[#Input modification Parameters|section below]].


The content of optional output parameters are mostly case insensitive when used in legacy Cumulus 1 (a few are case sensitive as explained in [[#For the legacy software]]. For Cumulus 2 and later, so this includes MX, the output parameters are case sensitive and also dependent on what other output formatters are being used if any, so please read the sections on output parameters and study the examples in the tables carefully.
The content of ''optional output parameters'' are case sensitive and also dependent on what other output formatters are being used if any, so please read the sections on output parameters and study the examples in the tables carefully.


== Tag names and Parameters available==
= Tag names and Parameters available =


=== Input modification Parameters ===
=== Input modification Parameters ===