General

This is a simple and unfinished documentaion of the Remote-Master Protocol functions and variables.

German Protocol endpoints avalible here

The Protocol Templates are Build with HTML and CSS in this Documentation we are not explaining these concepts here. This documentation is only for the Remote master app specfic functions.

For learning more about HTML and CSS you can visit:

Attributes like loop or if can probably be used in every HTML tag. (only some have been tested).

Devices

Installations

Objects

Locations

Riskassessment

Syntax Description Example
['riskAssessment'] can be use to check if avalible data['riskAssessment'] != null
['riskAssessment']['errorRate'] error rate that was put into the template data['riskAssessment']['errorRate']
['riskAssessment']['basics'] basics of risk assessment data['riskAssessment']['basics']
['riskAssessment']['marks']['0']['7'] Is the mark for very low hazard for devices data['riskAssessment']['marks']['0']['7']
['riskAssessment']['marks']['1']['6'] Is the mark for low hazard for installation data['riskAssessment']['marks']['1']['6']
['riskAssessment']['marks']['2']['5'] Is the mark for reduced hazard for objects data['riskAssessment']['marks']['2']['5']

devices marks

installations marks

objects marks

Loops

Loops add processing time to the PDF creation.

You have to Loop thru arrays. See section Protocol variables for types.

Node Loops

There are two types of node Loops:

nodes

Loops over nodes that haven been testet.

loop="n of data['nodes']"

Note: If a timeframe is selected only nodes that have been tested in this timeframe are Looped

allNodes

Loops over all nodes

loop="n of data['allNodes']"

Images

Example:

<div loop="n of data['allNodes']">
  <div loop="img of data['n']['node']['images']">
    <img style="width: 200px;" src="{{data['img']}}" />
  </div>
</div>

How to use

if

Is true if a variable is not 0

if="vars['var1'] != 0

This is only true if var1 is not equal to 0 and var2 is 0

if="vars['var1'] != 0 && vars['var2] == 0

This is true if var1 is equal to 5 or var2 is equal to false

if="vars['var1'] == 5 || vars['var2] == 'false' or if="vars['var1'] == 5 || vars['var2] == false

For Strings vars['var1'] != 'Mangel'

Varibles

Variables are declared inside brackets like this {{data["customer"]["name"]}} or {{data['customer']['301']}}

You can make your create your own Varibles for example inside a div:

<div type="int" expr="vars['counterFDev'] = 0"></div>

Types

If you want to save for example this 3.764930242 number than you have to choose how accurate you want it to be.

Note: It does not round the number it only cuts number off.

type=”int” will result in 3 type=”double” will result in 3.764930242 type=”double-2” will result in 3.76 type=”double-3” will result in 3.764

Count

You can use variables to count someting:

<div type="int" expr="vars['nodesCount'] = vars['nodesCount'] + 1"></div>

To output the variable use {{vars['nodesCount']}}

Calculate

With varibles you can calculate for example percentages

<div type="double-2" expr="vars['var1'] = (vars['var2'] * 100) / vars['var3']"></div>

CSS

Tables

To prevent Table cells from breaking over 2 pages

break-inside: avoid;

Makes 2 Borders into one

border-collapse: collapse;

IOS

In IOS it is nessary to add print-color-adjust: exact in the style(for example in the html style) to have colors. This does not apply to font color.

Protocol variables

currentUser (Map)

currentCompany (Map)

group (Map)

customer (Map)

currentTime (Map)

locationHeader (Map)

nodes (Array)

nextTest (Map)

lastTest (Map)

status (String),

testers (Array)

technicians (Array)

firstTestDate (Map)

lastTestDate (Map)

nextTestDateDT (Map)