# HG changeset patch # User Edouard Tisserant # Date 1626185601 -7200 # Node ID 8e81e4ce9bc6eaf967cdf3e1ef1199720ab4be2d # Parent c696ecf5173abb0b112dff09afdaacf8e7c956ef SVGHMI: set some boundaries for watchdog timings and max connection count. diff -r c696ecf5173a -r 8e81e4ce9bc6 svghmi/svghmi.py --- a/svghmi/svghmi.py Tue Jul 13 16:12:15 2021 +0200 +++ b/svghmi/svghmi.py Tue Jul 13 16:13:21 2021 +0200 @@ -290,13 +290,33 @@ <xsd:attribute name="OnStart" type="xsd:string" use="optional" default="chromium {url}"/> <xsd:attribute name="OnStop" type="xsd:string" use="optional" default="echo 'please close chromium window at {url}'"/> <xsd:attribute name="EnableWatchdog" type="xsd:boolean" use="optional" default="false"/> - <xsd:attribute name="OnWatchdog" type="xsd:string" use="optional" default="chromium {url}"/> - <xsd:attribute name="WatchdogInitial" type="xsd:integer" use="optional" default="30"/> - <xsd:attribute name="WatchdogInterval" type="xsd:integer" use="optional" default="5"/> + <xsd:attribute name="WatchdogInitial" use="optional" default="30"> + <xsd:simpleType> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="2"/> + <xsd:maxInclusive value="600"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="WatchdogInterval" use="optional" default="5"> + <xsd:simpleType> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="2"/> + <xsd:maxInclusive value="60"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> <xsd:attribute name="Port" type="xsd:integer" use="optional" default="8008"/> <xsd:attribute name="Interface" type="xsd:string" use="optional" default="localhost"/> <xsd:attribute name="Path" type="xsd:string" use="optional" default="{name}"/> - <xsd:attribute name="MaxConnections" type="xsd:integer" use="optional" default="16"/> + <xsd:attribute name="MaxConnections" use="optional" default="16"> + <xsd:simpleType> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="1"/> + <xsd:maxInclusive value="1024"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> </xsd:complexType> </xsd:element> </xsd:schema>