Table 1.
Summary of the DML grammar.
| Type | Statement | Description | |
|---|---|---|---|
| Resource declaration | @ResourceName:”ResourceURI” | Declaring a resource newly created. Generally, this is a virtual resource which will be assigned by an aggregation result of real resources. | |
| Resource reference | “ResourceURI,Input Type, [PropertyURI]” | Define a variable by referencing a resource, ResourceURI is the URI of resource, input type indicates the type of data, including digital and analog. If the data source is entity level, PropertyURI indicates a property of this entity. | |
| Resource validity time | [YYYY-MM-DD]T[hh:mm:ss]Z | The lifetime of resources. | |
| Aggregation time period | [DD/hh/mm/ss]:time value | Four level time granularities of aggregation: day level, minute level, hour level and second level. | |
| Aggregation operation | [min/max/ave/med/cur] | Operation of aggregation: minimum, maximum, average, median and latest value. | |
| Math operations | operations | +, -, *, /, %, ^, sqrt(x) | Add, Subtract, Multiply, Divide, Modulo, Exponent, Square root |
| Trigonometric Functions | sin(x), cos(x), tan(x) | Sine, Cosine, Tangent | |
| Inverse Trigonometric | asin(x), cos(x), atan(x) | Arcsine, Arccosine, Arctangent | |
| Exponentials | exp(x), sinh(x), cosh(x) | Exponential Function (e^x), Hyperbolic Sine, Hyperbolic Cosine | |
| Logarithms | ln(x), log2(x) log(x) | Natural (Log Base e), Binary (Log Base 2), Common (Log Base 10) | |
| Rounding | ceil(x), floor(x) | Ceiling, Floor | |
| Switch count | Switch() | Count the switching number of digital resource. | |
| Prefixes and suffix | “prefix:[prefix]” “suffix:[ suffix]” | Attach the prefix or suffix of data, for example the unit of data can be a suffix. | |
| Formatting | “format:[decimal places]” | This operation formats the end result by rounding the result to a specified number of digits. | |