<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="docbook.xsl" type="text/xsl" ?>
<book version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:ns4="http://www.w3.org/1998/Math/MathML" xmlns:ns3="http://www.w3.org/2000/svg"
      xmlns:ns="http://docbook.org/ns/docbook">
  <info>
    <title>Door Control Service Specification</title>
    <titleabbrev>DoorControl</titleabbrev>
    <releaseinfo>19.12</releaseinfo>
    <author>
      <orgname>ONVIF™</orgname>
      <uri>www.onvif.org</uri>
    </author>
    <pubdate>December 2019</pubdate>
    <mediaobject>
      <imageobject>
        <imagedata contentwidth="60mm" fileref="media/logo.png"/>
      </imageobject>
    </mediaobject>
    <copyright>
      <year>2008-2020</year>
      <holder>ONVIF™ All rights reserved.</holder>
    </copyright>
    <legalnotice>
      <para>Recipients of this document may copy, distribute, publish, or display this document so long as this copyright notice, license and disclaimer are retained with all copies of the document. No license is granted to modify this
      document.</para>
      <para>THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND THEIR AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
      PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE; OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</para>
      <para>IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT,
      WHETHER OR NOT (1) THE CORPORATION, MEMBERS OR THEIR AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR (2) SUCH DAMAGES WERE REASONABLY FORESEEABLE, AND ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT. 
      THE FOREGOING DISCLAIMER AND LIMITATION ON LIABILITY DO NOT APPLY TO, INVALIDATE, OR LIMIT REPRESENTATIONS AND WARRANTIES MADE BY THE MEMBERS AND THEIR RESPECTIVE AFFILIATES TO THE CORPORATION AND OTHER MEMBERS IN CERTAIN WRITTEN POLICIES OF
      THE CORPORATION.</para>
    </legalnotice>
    <revhistory>
      <revision>
        <revnumber>1.0</revnumber>
        <date>Apr-2013</date>
        <author>
          <personname>Yuri Timenkov</personname>
        </author>
        <revremark>First version</revremark>
      </revision>
      <revision>
        <revnumber>1.0.1</revnumber>
        <date>Aug-2013</date>
        <author>
          <personname>Hans Busch</personname>
        </author>
        <revremark>Change Request 1053</revremark>
      </revision>
      <revision>
        <revnumber>1.0.2</revnumber>
        <date>Jun-2014</date>
        <author>
          <personname>Michio Hirai</personname>
        </author>
        <revremark>Change Request 1368, 1369</revremark>
      </revision>
      <revision>
        <revnumber>17.12</revnumber>
        <date>Dec-2017</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 2172, 2173</revremark>
      </revision>
      <revision>
        <revnumber>18.06</revnumber>
        <date>Jun-2018</date>
        <author>
          <personname>Patrik Björling Rygert</personname>
        </author>
        <revremark>Added support for client-supplied tokens Added full management support for doors</revremark>
      </revision>
      <revision>
        <revnumber>18.12</revnumber>
        <date>Dec-2018</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 2397</revremark>
      </revision>
      <revision>
        <revnumber>19.12</revnumber>
        <date>Dec-2019</date>
        <author>
          <personname>Hiroyuki Sano</personname>
        </author>
        <revremark>Change Request 2480, 2635</revremark>
      </revision>
    </revhistory>
  </info>
  <preface>
    <title>Contributors</title>
    <informaltable>
      <tgroup cols="2">
        <colspec colname="c1" colwidth="54*"/>
        <colspec colname="c2" colwidth="46*"/>
        <tbody valign="top">
          <row>
            <entry align="left" valign="bottom"><para>ASSA ABLOY</para></entry>
            <entry align="left" valign="bottom"><para>Patrik Björling Rygert</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>ASSA ABLOY</para></entry>
            <entry align="left" valign="bottom"><para>Mattias Rengstedt</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Axis Communications AB</para></entry>
            <entry align="left" valign="bottom"><para>Johan Adolfsson</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Axis Communications AB </para></entry>
            <entry align="left" valign="bottom"><para>Marcus Johansson</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Axis Communications AB</para></entry>
            <entry align="left" valign="bottom"><para>Robert Rosengren</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Axis Communications AB</para></entry>
            <entry align="left" valign="bottom"><para>Derek Wang</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Axis Communications AB</para></entry>
            <entry align="left" valign="bottom"><para>Emil Selinder</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>AxxonSoft</para></entry>
            <entry align="left" valign="bottom"><para>Yuri Timenkov</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Bosch</para></entry>
            <entry align="left" valign="bottom"><para>Mohane Caliaperoumal</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Bosch</para></entry>
            <entry align="left" valign="bottom"><para>Dirk Schreiber</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Hirsch Electronics/ Identive Group</para></entry>
            <entry align="left" valign="bottom"><para>Rob Zivney</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Honeywell</para></entry>
            <entry align="left" valign="bottom"><para>Marine Drive</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Honeywell</para></entry>
            <entry align="left" valign="bottom"><para>Neelendra Bhandari</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Honeywell</para></entry>
            <entry align="left" valign="bottom"><para>Uvaraj Thangarajan</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Honeywell</para></entry>
            <entry align="left" valign="bottom"><para>Vinay Ghule</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>PACOM</para></entry>
            <entry align="left" valign="bottom"><para>Eugene Scully</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>PACOM</para></entry>
            <entry align="left" valign="bottom"><para>Steve Barton</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Schneider Electric</para></entry>
            <entry align="left" valign="bottom"><para>Mike Berube</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Siemens AG</para></entry>
            <entry align="left" valign="bottom"><para>Klaus Baumgartner</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Siemens AG</para></entry>
            <entry align="left" valign="bottom"><para>Suresh Raman</para></entry>
          </row>
          <row>
            <entry align="left" valign="bottom"><para>Siemens AG</para></entry>
            <entry align="left" valign="bottom"><para>Suresh Krishnamurthy</para></entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
  </preface>
  <chapter>
    <title>Scope</title>
    <section>
      <title>General</title>
      <para>This specification defines the web service interface for interaction with physical doors. This includes but is not limited to controlling them and monitoring their state.</para>
      <para>Web service usage and common ONVIF functionality are outside of the scope of this document. Please refer to [ONVIF Core Specification] for those details.</para>
    </section>
    <section>
      <title>Conventions</title>
      <para>The key words “shall”, “shall not”, “should”, “should not”, “may”, “need not”, “can”, “cannot” in this specification are to be interpreted as described in Annex H of [ISO/IEC Directives].</para>
    </section>
    <section>
      <title>Namespaces</title>
      <para>This document references the following namespaces:</para>
      <table>
        <title>Referenced namespaces (with prefix)</title>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="13*"/>
          <colspec colname="c2" colwidth="87*"/>
          <tbody valign="top">
            <row>
              <entry><para> <emphasis role="bold">Prefix</emphasis> </para></entry>
              <entry><para> <emphasis role="bold">Namespace URI</emphasis> </para></entry>
            </row>
            <row>
              <entry><para>env</para></entry>
              <entry><para> <link xlink:href="http://www.w3.org/2003/05/soap-envelope">http://www.w3.org/2003/05/soap-envelope</link> </para></entry>
            </row>
            <row>
              <entry><para>ter</para></entry>
              <entry><para> <link xlink:href="http://www.onvif.org/ver10/error">http://www.onvif.org/ver10/error</link> </para></entry>
            </row>
            <row>
              <entry><para>xs </para></entry>
              <entry><para> <link xlink:href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</link> </para></entry>
            </row>
            <row>
              <entry><para>tt</para></entry>
              <entry><para> <link xlink:href="http://www.onvif.org/ver10/schema">http://www.onvif.org/ver10/schema</link> </para></entry>
            </row>
            <row>
              <entry><para>pt</para></entry>
              <entry><para> <link xlink:href="http://www.onvif.org/ver10/pacs">http://www.onvif.org/ver10/pacs</link> </para></entry>
            </row>
            <row>
              <entry><para>tns1</para></entry>
              <entry><para> <link xlink:href="http://www.onvif.org/ver10/topics">http://www.onvif.org/ver10/topics</link> </para></entry>
            </row>
            <row>
              <entry><para>tmd</para></entry>
              <entry><para> <link xlink:href="http://www.onvif.org/ver10/deviceIO/wsdl">http://www.onvif.org/ver10/deviceIO/wsdl</link> </para></entry>
            </row>
            <row>
              <entry><para>tdc</para></entry>
              <entry><para> <link xlink:href="http://www.onvif.org/ver10/doorcontrol/wsdl">http://www.onvif.org/ver10/doorcontrol/wsdl</link> </para></entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </section>
  </chapter>
  <chapter>
    <title>Normative references</title>
    <para>The following documents, in whole or in part, are normatively referenced in this document and are indispensable for its application. For dated references, only the edition cited applies. For undated references, the latest edition of the
    referenced document (including any amendments) applies.</para>
    <para role="reference">ONVIF Core Specification </para>
    <para role="reference">&lt;<link xlink:href="http://www.onvif.org/specs/core/ONVIF-Core-Specification.pdf"/>&gt;</para>
    <para role="reference">ONVIF PACS Architecture and Design Considerations</para>
    <para role="reference">&lt;<link xlink:href="https://www.onvif.org/specs/wp/ONVIF-PACS-Architecture-and-Design-Considerations.pdf"/>&gt;</para>
    <para role="reference">ISO/IEC Directives, ISO/IEC Directives Part 2, Principles and
        rules for the structure and drafting of ISO and IEC documents, Edition 7.0, May
        2016
    </para>
    <para role="reference">&lt;<link xlink:href="http://www.iec.ch/members_experts/refdocs/iec/isoiecdir-2%7Bed7.0%7Den.pdf"/>&gt;</para>
  </chapter>
  <chapter>
    <title>Terms, definitions and abbreviations</title>
    <section>
      <title>Terms and definitions</title>
      <para>For the purposes of this document, the following terms and definitions apply.</para>
      <informaltable>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*"/>
          <colspec colname="c2" colwidth="78*"/>
          <tbody valign="top">
            <row>
              <entry><para> <emphasis role="bold">Barrier</emphasis> </para></entry>
              <entry><para>A barrier controls access for vehicles. Examples of barriers are booms, gates, rising curbs, bollards, etc. Barriers are used at parking places, gates of properties or military sites.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Credential</emphasis> </para></entry>
              <entry><para>A logical object holding related credential identifiers for a credential holder. E.g. if a PIN is associated with a specific credential number, then both of these identifiers are stored in one credential. Note that the PIN
              is normally not stored in the physical credential.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Credential Number</emphasis> </para></entry>
              <entry><para>A sequence of bytes uniquely identifying a credential at an access point.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Delay Time Before Relock</emphasis> </para></entry>
              <entry><para>A configuration parameter for a door. The time from when the door is physically opened until the latch goes back to locked state.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Door</emphasis> </para></entry>
              <entry><para>A physical door, barrier, turnstile, etc. which restricts access between two areas. A door is usually equipped with an electronic lock and a door monitor.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Door Alarm</emphasis> </para></entry>
              <entry><para>An abnormal state of the door where door is forced open or held open beyond the permitted time duration</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Door Lock</emphasis> </para></entry>
              <entry><para>A device that secures a door to prevent access, except when explicitly allowed by the access control system. Lock types include electromagnetic, electric strike, etc.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Door Mode</emphasis> </para></entry>
              <entry><para>Logical state of the door indicating whether the door is locked, unlocked, blocked, locked down or locked open etc.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Door Monitor</emphasis> </para></entry>
              <entry><para>Electrical component used to monitor the open or closed status of a door, or locked/unlocked status of a locking device, or the secure/unsecure status of an electromagnetic lock or armature plate.</para> <para>Also known as
              door contact sensor.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Door Type</emphasis> </para></entry>
              <entry><para>The type of door, e.g. mantrap, turnstile, revolving door, barrier or regular door.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Extended Open Time</emphasis> </para></entry>
              <entry><para>A configuration parameter for a door. Time added to Open Time to allow for individuals in need of longer time to pass through the door.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Extended Release Time</emphasis> </para></entry>
              <entry><para>A configuration parameter for a door. Time added to Release Time to allow for individuals in need of longer time to access the door.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Lock</emphasis> </para></entry>
              <entry><para>An operation after which a door is locked and alarm is unmasked.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Mantrap</emphasis> </para></entry>
              <entry><para>A mantrap is a combination of two interlocked doors and a small area between these doors. The mantrap has a restriction that the first door must be closed before the second door can be opened.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Momentary Access</emphasis> </para></entry>
              <entry><para>An operation which invokes the same logic as upon normal access being granted to a credential.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Open Time</emphasis> </para></entry>
              <entry><para>A configuration parameter for a door. The time from when the door is physically opened until the door starts warning about it being opened too long.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Pre-Alarm Time</emphasis> </para></entry>
              <entry><para>A configuration parameter for a door. The time from when the door starts warning about it being opened too long until an alarm state is generated.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Release Time</emphasis> </para></entry>
              <entry><para>A configuration parameter for a door. The time from when the latch is unlocked until it is relocked again (unless the door is physically opened).</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Revolving Door</emphasis> </para></entry>
              <entry><para>A revolving door is similar to a turnstile, but has a different form factor. Revolving doors may be used to prevent tailgating.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Tailgating</emphasis> </para></entry>
              <entry><para>Person or entity, passing through an access point without using credentials by following a person or entity for whom access has been granted.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Tamper Detector</emphasis> </para></entry>
              <entry><para>Mechanism commonly available for doors, access points and controllers to detect physical tamper</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Turnstile</emphasis> </para></entry>
              <entry><para>A turnstile is a special kind of door that allows only one person to pass at a time and prevents tailgating. Turnstiles can be setup to enforce one-way traffic of people.</para></entry>
            </row>
            <row>
              <entry><para> <emphasis role="bold">Unlock</emphasis> </para></entry>
              <entry><para>An operation to allow a door to be freely used for passage without any door alarms being triggered.</para></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
    <section>
      <title>Abbreviated terms</title>
      <informaltable>
        <tgroup cols="2">
          <colspec colname="c1" colwidth="22*"/>
          <colspec colname="c2" colwidth="78*"/>
          <tbody valign="top">
            <row>
              <entry><para> <emphasis role="bold">PACS</emphasis> </para></entry>
              <entry valign="middle"><para>Physical Access Control System</para></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>
  </chapter>
  <chapter>
    <title>Overview</title>
    <para>The door control service provides mechanisms for controlling physical door instances and monitoring their status.</para>
    <para>The term Door in this specification can refer to such physical objects as an automatic barrier or a door equipped with an electric lock. Turnstiles which can restrict access in either direction can be represented with a pair of doors.</para>
    <para>Please refer to the [ONVIF PACS Architecture and Design Considerations] for generic operation guidelines and design principles behind ONVIF PACS services family.</para>
    <para>The service includes the following operations:</para>
    <itemizedlist>
      <listitem>
        <para>Getting list of doors including their capabilities (e.g., supported operations).</para>
      </listitem>
      <listitem>
        <para>Getting actual state (e.g., open or closed, locked or unlocked, health status).</para>
      </listitem>
      <listitem>
        <para>Locking and unlocking.</para>
      </listitem>
      <listitem>
        <para>Blocking door in locked state such that it can’t be accessed.</para>
      </listitem>
      <listitem>
        <para>Holding door in either unlocked (locked open) or locked (locked down) state and releasing the hold.</para>
      </listitem>
      <listitem>
        <para>Momentary access.</para>
      </listitem>
      <listitem>
        <para>Double lock (also known as secure lock) for preventing night-time access.</para>
      </listitem>
    </itemizedlist>
    <para>The service also defines a number of events for real-time monitoring:</para>
    <itemizedlist>
      <listitem>
        <para>Door physical status change (e.g., open or closed).</para>
      </listitem>
      <listitem>
        <para>Lock physical state change (e.g., locked or unlocked).</para>
      </listitem>
      <listitem>
        <para>Operation mode change (e.g., blocked, locked down or locked open).</para>
      </listitem>
      <listitem>
        <para>Alarm (if door was forced open or was open for too long during momentary access).</para>
      </listitem>
      <listitem>
        <para>Tamper (an attempt to physically damage its components).</para>
      </listitem>
      <listitem>
        <para>Hardware malfunction.</para>
      </listitem>
    </itemizedlist>
  </chapter>
  <chapter>
    <title>Door control</title>
    <section>
      <title>General</title>
      <para>This service offers commands to retrieve status information and to control door instances of a device.</para>
    </section>
    <section>
      <title>Service capabilities</title>
      <section>
        <title>General</title>
        <para>An ONVIF compliant device shall provide service capabilities in two ways:</para>
        <orderedlist>
          <listitem>
            <para>With the GetServices method of Device service when IncludeCapability is true. Please refer to the [ONVIF Core Specification] for more details.</para>
          </listitem>
          <listitem>
            <para>With the GetServiceCapabilities method.</para>
          </listitem>
        </orderedlist>
      </section>
      <section>
        <title>Data structures</title>
        <section>
          <title>ServiceCapabilities</title>
          <para>ServiceCapabilities structure reflects optional functionality of a service. The information is static and does not change during device operation. The following capabilities are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">MaxLimit</emphasis></para>
              <para>The maximum number of entries returned by a single Get&lt;Entity&gt;List or Get&lt;Entity&gt; request. The device shall never return more than this number of entities in a single response.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">MaxDoors</emphasis></para>
              <para>Indicates the maximum number of doors supported by the device.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">ClientSuppliedTokenSupported</emphasis></para>
              <para>Indicates that the client is allowed to supply the token when creating doors. To enable the use of the command SetDoor, the value must be set to true.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">DoorManagementSupported</emphasis></para>
              <para>Indicates that the client can perform CRUD operations (create, read, update and delete) on doors. To enable the use of the commands GetDoors, GetDoorList, CreateDoor, ModifyDoor and DeleteDoor, the value must be set to
              true.</para>
            </listitem>
          </itemizedlist>
        </section>
      </section>
      <section>
        <title>GetServiceCapabilities</title>
        <para>This operation returns the capabilities of the door control service. A device shall support this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="text">This message is empty</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Capabilities [tdc:ServiceCapabilities]</para>
              <para role="text">Set of indicators for function groups as described above.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="text">None</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">PRE_AUTH</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Door information</title>
      <section>
        <title>General</title>
        <para>The following figure shows an overview of the related objects of a door:</para>
        <figure>
          <title>The related objects of a door</title>
          <mediaobject>
            <imageobject>
              <imagedata contentdepth="34.90mm" contentwidth="146.22mm" fileref="media/DoorControl/image2.svg"/>
            </imageobject>
          </mediaobject>
        </figure>
      </section>
      <section>
        <title>Data structures</title>
        <section>
          <title>DoorInfo</title>
          <para>The DoorInfo type represents a door as a physical object. The structure contains information and capabilities of a specific door instance. An ONVIF compliant device shall provide the following fields for each Door instance:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">token</emphasis></para>
              <para>A service-unique identifier of the door.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Name</emphasis></para>
              <para>A user readable name. It shall be up to 64 characters.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Capabilities</emphasis></para>
              <para>The capabilities of the door; is of type DoorCapabilities.</para>
            </listitem>
          </itemizedlist>
          <para>To provide more information, the device may include the following optional field:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Description</emphasis></para>
              <para>A user readable description. It shall be up to 1024 characters.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section>
          <title>Door</title>
          <para>The door structure shall include all properties of the DoorInfo structure and also a timings structure.</para>
          <para>The device shall provide the following fields for each door instance:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">DoorType</emphasis></para>
              <para>The type of door. The type is used by the device to understand the operational mode of the door. Door <phrase>types </phrase>starting with the prefix pt: are reserved to define ONVIF-specific types. For custom defined door types,
              free text can be used. The following types are defined by ONVIF:</para>
              <itemizedlist>
                <listitem>
                  <para>pt:Door A regular door</para>
                </listitem>
                <listitem>
                  <para>pt:Mantrap See Terms and Definitions</para>
                </listitem>
                <listitem>
                  <para>pt:Turnstile See Terms and Definitions</para>
                </listitem>
                <listitem>
                  <para>pt:RevolvingDoor See Terms and Definitions</para>
                </listitem>
                <listitem>
                  <para>pt:Barrier See Terms and Definitions</para>
                </listitem>
              </itemizedlist>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Timings</emphasis></para>
              <para>A structure defining times such as how long the door is unlocked when accessed, extended grant time, etc.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section xml:id="_Ref444782237">
          <title>Timings</title>
          <para>A structure defining times such as how long the door is unlocked when accessed, extended grant time, etc.</para>
          <para>The following diagram shows how the timings are used:</para>
          <figure>
            <title>Door timings</title>
            <mediaobject>
              <imageobject>
                <imagedata contentdepth="107.35mm" contentwidth="159.97mm" fileref="media/DoorControl/image3.png"/>
              </imageobject>
            </mediaobject>
          </figure>
          <para>The device shall provide the following fields for each timings instance:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">ReleaseTime</emphasis></para>
              <para>When access is granted (door mode becomes Accessed, see section <xref linkend="_Ref342319879"/>), the latch is unlocked. ReleaseTime is the time from when the latch is unlocked until it is relocked again (unless the door is
              physically opened).</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">OpenTime</emphasis></para>
              <para>The time from when the door is physically opened until the door is set in the DoorOpenTooLong alarm state (see section <xref linkend="_Ref442886378"/>).</para>
            </listitem>
          </itemizedlist>
          <para>To provide more information, the device may include the following optional fields:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">ExtendedReleaseTime</emphasis></para>
              <para>Some individuals need extra time to open the door before the latch relocks. If supported, ExtendedReleaseTime shall be added to ReleaseTime if UseExtendedTime is set to true in the AccessDoor command (see section <xref
              linkend="_Ref442886478"/>).</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">DelayTimeBeforeRelock</emphasis></para>
              <para>If the door is physically opened after access is granted, then DelayTimeBeforeRelock is the time from when the door is physically opened until the latch goes back to locked state.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">ExtendedOpenTime</emphasis></para>
              <para>Some individuals need extra time to pass through the door. If supported, ExtendedOpenTime shall be added to OpenTime if UseExtendedTime is set to true in the AccessDoor command (see section <xref linkend="_Ref442886478"/>).</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">PreAlarmTime</emphasis></para>
              <para>Before a DoorOpenTooLong alarm state is generated, a signal will sound to indicate that the door must be closed. PreAlarmTime defines how long before DoorOpenTooLong the warning signal shall sound.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section>
          <title>DoorCapabilities</title>
          <para>DoorCapabilities reflect optional functionality of a particular physical entity. Different door instances may have different set of capabilities. This information may change during device operation, e.g. if hardware settings are
          changed. The following capabilities are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Access</emphasis></para>
              <para>Indicates whether or not this Door instance supports AccessDoor command to perform momentary access.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">AccessTimingOverride</emphasis></para>
              <para>Indicates that this Door instance supports overriding configured timing in the AccessDoor command.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Lock</emphasis></para>
              <para>Indicates that this Door instance supports LockDoor command to lock the door.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Unlock</emphasis></para>
              <para>Indicates that this Door instance supports UnlockDoor command to unlock the door.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Block</emphasis></para>
              <para>Indicates that this Door instance supports BlockDoor command to block the door.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">DoubleLock</emphasis></para>
              <para>Indicates that this Door instance supports DoubleLockDoor command to lock multiple locks on the door.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">LockDown</emphasis></para>
              <para>Indicates that this Door instance supports LockDown (and LockDownRelease) commands to lock the door and put it in LockedDown mode.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">LockOpen</emphasis></para>
              <para>Indicates that this Door instance supports LockOpen (and LockOpenRelease) commands to unlock the door and put it in LockedOpen mode.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">DoorMonitor</emphasis></para>
              <para>Indicates that this Door instance has a DoorMonitor and supports the DoorPhysicalState event.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">LockMonitor</emphasis></para>
              <para>Indicates that this Door instance has a LockMonitor and supports the LockPhysicalState event.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">DoubleLockMonitor</emphasis></para>
              <para>Indicates that this Door instance has a DoubleLockMonitor and supports the DoubleLockPhysicalState event.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Alarm</emphasis></para>
              <para>Indicates that this Door instance supports door alarm and the DoorAlarm event.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Tamper</emphasis></para>
              <para>Indicates that this Door instance has a Tamper detector and supports the DoorTamper event.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Fault</emphasis></para>
              <para>Indicates that this Door instance supports door fault and the DoorFault event.</para>
            </listitem>
          </itemizedlist>
        </section>
      </section>
      <section>
        <title>GetDoorInfo</title>
        <para>This operation requests a list of DoorInfo items matching the given tokens.</para>
        <para>The device shall ignore tokens it cannot resolve and shall return an empty list if there are no items matching the specified tokens. The device shall not return a fault in this case.</para>
        <para>If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be returned.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token - unbounded [pt:ReferenceToken]</para>
              <para role="text">Tokens of DoorInfo items to get.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">DoorInfo - optional, unbounded [tdc:DoorInfo]</para>
              <para role="text">List of DoorInfo items.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender  ter:InvalidArgs   ter:TooManyItems</para>
              <para role="text">Too many items were requested, see MaxLimit capability.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetDoorInfoList</title>
        <para>This operation requests a list of all DoorInfo items provided by the device. A device shall support this command.</para>
        <para>A call to this method shall return a StartReference when not all data is returned and more data is available. The reference shall be valid for retrieving the next set of data. Please refer to section 4.8.3 in [ONVIF PACS Architecture
        and Design Considerations] for more details.</para>
        <para>The number of items returned shall not be greater than the Limit parameter.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Limit - optional [xs:int]</para>
              <para role="text">Maximum number of entries to return. If Limit is omitted or if the value of Limit is higher than what the device supports, then the device shall return its maximum amount of entries.</para>
              <para role="param">StartReference - optional [xs:string]</para>
              <para role="text">Start returning entries from this start reference. If not specified, entries shall start from the beginning of the dataset</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">NextStartReference - optional [xs:string]</para>
              <para role="text">StartReference to use in next call to get the following items. If absent, no more items to get.</para>
              <para role="param">DoorInfo optional, unbounded [tdc:DoorInfo]</para>
              <para role="text">List of door info items.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidStartReference</para>
              <para role="text">StartReference is invalid or has timed out.Client needs to start fetching from the beginning.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetDoors</title>
        <para>This operation <phrase>requests a list of </phrase>Door items matching the given tokens.</para>
        <para>The device shall ignore tokens it cannot resolve and shall return an empty list if there are no items matching specified tokens. The device shall not return a fault in this case.</para>
        <para>If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be returned.</para>
        <para>A device that signals support for the DoorManagementSupported capability shall implement this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token - unbounded [pt:ReferenceToken]</para>
              <para role="text">Tokens of Door items to get</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Door - optional, unbounded [tdc:Door]</para>
              <para role="text">List of Door items.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender  ter:InvalidArgs   ter:TooManyItems</para>
              <para role="text">Too many items were requested, see MaxLimit capability.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>GetDoorList</title>
        <para>This operation requests a list of all Door items provided by the device.</para>
        <para>A call to this method shall return a StartReference when not all data is returned and more data is available. The reference shall be valid for retrieving the next set of data. Please refer to section 4.8.3 in [ONVIF PACS Architecture
        and Design Considerations] for more details.</para>
        <para>The number of items returned shall not be greater than the Limit parameter.</para>
        <para>A device that signals support for the DoorManagementSupported capability shall implement this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Limit - optional [xs:int]</para>
              <para role="text">Maximum number of entries to return. If Limit is omitted or if the value of Limit is higher than what the device supports, then the device shall return its maximum amount of entries.</para>
              <para role="param">StartReference - optional [xs:string]</para>
              <para role="text">Start returning entries from this start reference. If not specified, entries shall start from the beginning of the dataset</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">NextStartReference - optional [xs:string]</para>
              <para role="text">StartReference to use in next call to get the following items. If absent, no more items to get.</para>
              <para role="param">Door optional, unbounded [tdc:Door]</para>
              <para role="text">List of doors.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidStartReference</para>
              <para role="text">StartReference is invalid or has timed out. Client needs to start fetching from the beginning.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>CreateDoor</title>
        <para>This operation creates the specified door in the device.</para>
        <para>The token field of the Door structure shall be empty and the device shall allocate a token for the door. The allocated token shall be returned in the response.</para>
        <para>If the client sends any value in the token field, the device shall return InvalidArgVal as a generic fault code.</para>
        <para>A device that signals support for the DoorManagementSupported capability shall implement this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Door [tdc:Door]</para>
              <para role="text">Door item to create</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of created door item</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Receiver - ter:CapabilityViolated - ter:MaxDoors</para>
              <para role="text">There is not enough space to add the new door, see the MaxDoors
                capability</para>
              <para role="param">env:Sender  ter:InvalidArgVal   ter:ReferenceNotFound</para>
              <para role="text">A referred entity token is not found (some devices may not validate referred entities).</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">WRITE_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>SetDoor</title>
        <para>This method is used to synchronize a door in a client with the device.</para>
        <para>If a door with the specified token does not exist in the device, the door is created. If a door with the specified token exists, then the door is modified.</para>
        <para>A call to this method takes a door structure as input parameter. The token field of the Door structure shall not be empty.</para>
        <para>A device that signals support for the ClientSuppliedTokenSupported capability shall implement this command.</para>
        <para>If no token was specified in the request, the device shall return InvalidArgs as a generic fault code.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Door [tdc:Door]</para>
              <para role="text">Door item to create or modify</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Receiver - ter:CapabilityViolated - ter:ClientSuppliedTokenSupported</para>
              <para role="text">The device does not support that the client supplies the token</para>
              <para role="param">env:Receiver - ter:CapabilityViolated - ter:MaxDoors</para>
              <para role="text">There is not enough space to add a new door, see the MaxDoors capability</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ReferenceNotFound</para>
              <para role="text">A referred entity token is not found (some devices may not validate referred entities).</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">WRITE_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>ModifyDoor</title>
        <para>This operation modifies the specified door.</para>
        <para>The token of the door to modify is specified in the token field of the Door structure and shall not be empty. All other fields in the structure shall overwrite the fields in the specified door.</para>
        <para>If no token was specified in the request, the device shall return InvalidArgs as a generic fault code.</para>
        <para>A device that signals support for the DoorManagementSupported capability shall implement this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Door [tdc:Door]</para>
              <para role="text">Door item to modify</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NotFound</para>
              <para role="text">Door token is not found.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ReferenceNotFound</para>
              <para role="text">A referred entity token is not found (some devices may not validate referred entities).</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">WRITE_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>DeleteDoor</title>
        <para>This operation deletes the specified door.</para>
        <para>If it is associated with one or more entities some devices may not be able to delete the door, and consequently a ReferenceInUse fault shall be generated.</para>
        <para>If no token was specified in the request, the device shall return InvalidArgs as a generic fault code.</para>
        <para>A device that signals support for the DoorManagementSupported capability shall implement this command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of Door item to delete.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This is an empty message.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:NotFound</para>
              <para role="text">Door token is not found.</para>
              <para role="param">env:Sender - ter:InvalidArgVal - ter:ReferenceInUse</para>
              <para role="text">Failed to delete, the door token is in use</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">WRITE_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Door status</title>
      <section>
        <title>General</title>
        <para>The state of the door may be affected by a number of operations that can be performed on it depending on its capabilities: LockDoor, UnlockDoor, AccessDoor, BlockDoor, DoubleLockDoor, LockDownDoor, LockDownReleaseDoor, LockOpenDoor and
        LockOpenReleaseDoor.</para>
      </section>
      <section>
        <title>Data Structures</title>
        <section>
          <title>DoorState</title>
          <para>The DoorState structure contains current aggregate runtime status of a door.</para>
          <para>The device shall provide the following fields:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">DoorMode</emphasis></para>
              <para>The logical operating mode of the door; it is of type DoorMode. An ONVIF compatible device shall report current operating mode in this field.</para>
            </listitem>
          </itemizedlist>
          <para>To provide more information, the device may include the following optional fields:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">DoorPhysicalState</emphasis></para>
              <para>Physical state of the Door; it is of type DoorPhysicalState. A device that signals support for DoorMonitor capability for a particular door instance shall provide this field.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">LockPhysicalState</emphasis></para>
              <para>Physical state of the Lock; it is of type LockPhysicalState. A device that signals support for LockMonitor capability for a particular door instance shall provide this field.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">DoubleLockPhysicalState</emphasis></para>
              <para>Physical state of the DoubleLock; it is of type LockPhysicalState. A device that signals support for DoubleLockMonitor capability for a particular door instance shall provide this field.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Alarm</emphasis></para>
              <para>Alarm state of the door; it is of type DoorAlarmState. A device that signals support for Alarm capability for a particular door instance shall provide this field.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Tamper</emphasis></para>
              <para>Tampering state of the door; it is of type DoorTamper. A device that signals support for Tamper capability for a particular door instance shall provide this field.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Fault</emphasis></para>
              <para>Fault information for door; it is of type DoorFault. A device that signals support for Fault capability for a particular door instance shall provide this field.</para>
            </listitem>
          </itemizedlist>
          <para>The following data types define states of DoorState elements.</para>
        </section>
        <section>
          <title>Enumeration: DoorPhysicalState</title>
          <para>The physical state of a door. The following values are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Unknown</emphasis></para>
              <para>Value is currently unknown (possibly due to initialization or monitors not giving a conclusive result).</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Open</emphasis></para>
              <para>Door is open.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Closed </emphasis></para>
              <para>Door is closed.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Fault </emphasis></para>
              <para>Door monitor fault is detected.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section>
          <title>Enumeration: LockPhysicalState</title>
          <para>The physical state of a Lock (including Double Lock). The following values are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Unknown</emphasis></para>
              <para>Value is currently not known.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Locked</emphasis></para>
              <para>Lock is activated.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Unlocked</emphasis></para>
              <para>Lock is not activated.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">Fault</emphasis></para>
              <para>Lock fault is detected.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section xml:id="_Ref442886378">
          <title>Enumeration: DoorAlarmState</title>
          <para>Describes the state of a door with regard to alarms. The following values are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Normal</emphasis></para>
              <para>No alarm.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">DoorForcedOpen</emphasis></para>
              <para>Door is forced open.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">DoorOpenTooLong</emphasis></para>
              <para>Door is held open too long.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section>
          <title>DoorTamper</title>
          <para>Tampering information for a door. The following fields are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Reason</emphasis></para>
              <para>Optional field; Details describing tampering state change (e.g., reason, place and time).</para>
            </listitem>
          </itemizedlist>
          <informaltable colsep="0" frame="none" rowsep="0">
            <tgroup cols="2">
              <colspec colname="c1" colwidth="10*"/>
              <colspec colname="c2" colwidth="90*"/>
              <tbody valign="top">
                <row>
                  <entry><para>NOTE:</para></entry>
                  <entry><para>All fields (including this one) which are designed to give end-user prompts can be localized to the customer’s native language.</para></entry>
                </row>
              </tbody>
            </tgroup>
          </informaltable>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">State</emphasis></para>
              <para>State of the tamper detector; it is of type DoorTamperState.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section>
          <title>Enumeration: DoorTamperState</title>
          <para>Describes the state of a Tamper detector. The following values are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Unknown</emphasis></para>
              <para>Value is currently not known.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">NotInTamper </emphasis></para>
              <para>No tampering is detected.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">TamperDetected</emphasis></para>
              <para>Tampering is detected.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section>
          <title>DoorFault</title>
          <para>Fault information for a door. This can be extended with optional attributes in the future. The following fields are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Reason</emphasis></para>
              <para>Optional reason for fault.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">State</emphasis></para>
              <para>Overall fault state for the door; it is of type DoorFaultState. If there are any faults, the value shall be: FaultDetected. Details of the detected fault shall be found in the Reason field, and/or the various DoorState fields
              and/or in extensions to this structure.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section>
          <title>Enumeration: DoorFaultState</title>
          <para>Describes the state of a door fault. The following values are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Unknown</emphasis></para>
              <para>Fault state is unknown.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">NotInFault</emphasis></para>
              <para>No fault is detected.</para>
            </listitem>
            <listitem>
              <para><emphasis role="bold">FaultDetected</emphasis></para>
              <para>Fault is detected.</para>
            </listitem>
          </itemizedlist>
        </section>
        <section xml:id="_Ref342319879">
          <title>Enumeration: DoorMode</title>
          <para>The DoorMode describes the mode of operation from a logical perspective. Setting a door mode reflects the intent to set a door in a physical state.</para>
          <para>The following values are available:</para>
          <itemizedlist>
            <listitem>
              <para><emphasis role="bold">Unknown </emphasis></para>
              <para>The mode of operation is unknown.</para>
            </listitem>
            <listitem xml:id="Locked">
              <para><emphasis role="bold">Locked</emphasis></para>
              <para><phrase>The intention is to set the door to a physical locked state. </phrase>In this mode the device shall provide momentary access using the AccessDoor method if supported by the door instance<phrase>.</phrase></para>
            </listitem>
            <listitem xml:id="Unlocked">
              <para><emphasis role="bold">Unlocked</emphasis></para>
              <para>The intention is to set the door to a physical unlocked state. Alarms related to door timing operations such as open too long or forced open are masked in this mode.</para>
            </listitem>
            <listitem xml:id="Accessed">
              <para><emphasis role="bold">Accessed</emphasis></para>
              <para>The intention is to momentarily set the door to a physical unlocked state. After a predefined time the device shall revert the door to its previous mode. Alarms related to timing operations such as door forced open are masked in
              this mode.</para>
            </listitem>
            <listitem xml:id="Blocked">
              <para><emphasis role="bold">Blocked </emphasis></para>
              <para>The intention is to set the door to a physical locked state and the device shall not allow AccessDoor requests, i.e. it is not possible for the door to go to the accessed mode. All other requests to change the door mode are
              allowed.</para>
            </listitem>
            <listitem xml:id="LockedDown">
              <para><emphasis role="bold">LockedDown</emphasis></para>
              <para>The intention is to set the door to a physical locked state and the device shall only allow the LockDownReleaseDoor request. All other requests to change the door mode are not allowed.</para>
            </listitem>
            <listitem xml:id="LockedOpen">
              <para><emphasis role="bold">LockedOpen</emphasis></para>
              <para>The intention is to set the door to a physical unlocked state and the device shall only allow the LockOpenReleaseDoor request. All other requests to change the door mode are not allowed.</para>
            </listitem>
            <listitem xml:id="DoubleLocked">
              <para><emphasis role="bold">DoubleLocked</emphasis></para>
              <para>The intention is to set the door with multiple locks to a physical double locked state. If the door does not support double locking the device shall treat this as a normal locked mode. When changing to an unlocked mode from the
              double locked mode, the physical state of the door may first go to locked state before unlocking.</para>
            </listitem>
          </itemizedlist>
        </section>
      </section>
      <section>
        <title>GetDoorState</title>
        <para>This operation requests the state of a door specified by the Token.</para>
        <para>A device implementing the door control service shall be capable of reporting the status of a door using a DoorState structure available from the GetDoorState command.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to get the state for.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="param">DoorState [tdc:DoorState]</para>
              <para role="text">The state of the door.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">READ_SYSTEM</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
    <section>
      <title>Door control commands</title>
      <section>
        <title>General</title>
        <para>The service control commands contain operations that allow modifying Door instances states and controlling Door instances of a device.</para>
      </section>
      <section xml:id="_Ref442886478">
        <title>AccessDoor</title>
        <para>This operation allows momentarily accessing a door. It invokes the functionality typically used when a card holder presents a card to a card reader at the door and is granted access.</para>
        <para>The DoorMode shall change to Accessed state. Please refer to <xref linkend="Accessed"/> mode in section <xref linkend="_Ref342319879"/> for more details.</para>
        <para>The door shall remain accessible for the defined time. When the time span elapses, the DoorMode shall change back to its previous state.</para>
        <para>If the request cannot be fulfilled, a Failure fault shall be returned.</para>
        <para>Please refer to section <xref linkend="_Ref342319879"/> for details about door mode restrictions.</para>
        <para>A device that signals support for Access capability for a particular Door instance shall support this method. A device that signals support for AccessTimingOverride capability for a particular Door instance shall also support the
        following optional timing parameters when performing AccessDoor command:</para>
        <itemizedlist>
          <listitem>
            <para>AccessTime Overrides ReleaseTime in section <xref linkend="_Ref444782237"/></para>
          </listitem>
          <listitem>
            <para>OpenTooLongTime Overrides OpenTime in section <xref linkend="_Ref444782237"/></para>
          </listitem>
          <listitem>
            <para>PreAlarmTime Overrides PreAlarmTime in section <xref linkend="_Ref444782237"/></para>
          </listitem>
        </itemizedlist>
        <para>The device shall take the best effort approach for parameters not supported, it must fallback to preconfigured time or limit the time to the closest supported time if the specified time is out of range.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
              <para role="param">UseExtendedTime - optional [xs:boolean]</para>
              <para role="text">Indicates that the configured extended time should be used.</para>
              <para role="param">AccessTime - optional [xs:duration]</para>
              <para role="text">Overrides ReleaseTime if specified.</para>
              <para role="param">OpenTooLongTime - optional [xs:duration]</para>
              <para role="text">Overrides OpenTime if specified.</para>
              <para role="param">PreAlarmTime - optional [xs:duration]</para>
              <para role="text">Overrides PreAlarmTime if specified.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to go to Accessed state and unlock the door.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section xml:id="_Ref342385808">
        <title>LockDoor</title>
        <para>This operation allows locking a door. The door mode shall change to Locked state. Please refer to Locked mode in section <xref linkend="_Ref342319879"/> for more details.</para>
        <para>A device that signals support for Lock capability for a particular Door instance shall <phrase>support this command.</phrase></para>
        <para>If the request cannot be fulfilled, a Failure fault shall be returned. Please refer to section <xref linkend="_Ref342319879"/> for more details about door mode restrictions.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to go to Locked state.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>UnlockDoor</title>
        <para>This operation allows unlocking a door. The door mode shall change to Unlocked state. Please refer to Unlocked mode in section <xref linkend="_Ref342319879"/> for more details.</para>
        <para>A device that signals support for Unlock capability for a particular Door instance shall support this command.</para>
        <para>If the request cannot be fulfilled, a Failure fault shall be returned. Please refer to section <xref linkend="_Ref342319879"/> for more details about door mode restrictions.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to go to Unlocked state.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>BlockDoor</title>
        <para>This operation allows blocking a door and preventing momentary access (AccessDoor command). The door mode shall change to Blocked state. Please refer to Blocked mode in section <xref linkend="_Ref342319879"/> for more details.</para>
        <para>A device that signals support for Block capability for a particular Door instance shall support this command.</para>
        <para>If the request cannot be fulfilled, a Failure fault shall be returned. Please refer to section <xref linkend="_Ref342319879"/> for more details about Door Modes restrictions.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to go to Blocked state.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>LockDownDoor</title>
        <para>This operation allows locking and preventing other actions until a LockDownRelease command is invoked. The DoorMode shall change to LockedDown state. Please refer to LockedDown mode in section <xref linkend="_Ref342319879"/> for more
        details.</para>
        <para>The device shall ignore other door control commands until a LockDownRelease command is performed.</para>
        <para>A device that signals support for LockDown capability for a particular Door instance shall support this command.</para>
        <para>If a device supports DoubleLock capability for a particular Door instance, that operation may be engaged as well.</para>
        <para>If the request cannot be fulfilled, a Failure fault shall be returned. Please refer to section <xref linkend="_Ref342319879"/> for more details about door mode restrictions.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to go to LockDown state.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>LockDownReleaseDoor</title>
        <para>This operation allows releasing the LockedDown state of a door. The door mode shall change back to its previous/next state. It is not defined what the previous/next state shall be, but typically the Locked state. A device that signals
        support for LockDown capability for a particular Door instance shall support this command.</para>
        <para>This method shall only succeed if the current door mode is LockedDown.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to leave LockedDown state.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>LockOpenDoor</title>
        <para>This operation allows unlocking a door and preventing other actions until the LockOpenRelease method is invoked. The door mode shall change to LockedOpen state. Please refer to LockedOpen mode in section <xref linkend="_Ref342319879"/> for
        more details.</para>
        <para>The device shall ignore other door control commands until a LockOpenRelease command is performed.</para>
        <para>A device that signals support for LockOpen capability for a particular Door instance shall support this command.</para>
        <para>If the request cannot be fulfilled, a Failure fault shall be returned. Please refer to section <xref linkend="_Ref342319879"/> for more details about Door Modes restrictions.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to go to LockOpen state.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>LockOpenReleaseDoor</title>
        <para>This operation allows releasing the LockedOpen state of a door. The door mode shall change state from the LockedOpen state back to its previous/next state. It is not defined what the previous/next state shall be, but typically the
        Unlocked state. A device that signals support for LockOpen capability for a particular Door instance shall support this command.</para>
        <para>This method shall only succeed if the current DoorMode is LockedOpen.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to leave LockedOpen state.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
      <section>
        <title>DoubleLockDoor</title>
        <para>This operation is used for securely locking a door. A call to this method shall change door mode state to DoubleLocked. Please refer to DoubleLocked mode in section <xref linkend="_Ref342319879"/> for more details.</para>
        <para>A device that signals support for DoubleLock capability for a particular Door instance shall support this command. Otherwise this method can be performed as a standard Lock operation (see section <xref linkend="_Ref342385808"/><xref
        linkend="_Ref342385808"/>).</para>
        <para>If the door has an extra lock, it shall be locked as well.</para>
        <para>If the request cannot be fulfilled, a Failure fault shall be returned.</para>
        <variablelist role="op">
          <varlistentry>
            <term>request</term>
            <listitem>
              <para role="param">Token [pt:ReferenceToken]</para>
              <para role="text">Token of the Door instance to control.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>response</term>
            <listitem>
              <para role="text">This message is empty.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>faults</term>
            <listitem>
              <para role="param">env:Sender - ter:InvalidArgs - ter:NotFound</para>
              <para role="text">The specified token is not found.</para>
              <para role="param">env:Receiver - ter:Action - ter:Failure</para>
              <para role="text">Failed to go to DoubleLocked state.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>access class</term>
            <listitem>
              <para role="access">ACTUATE</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </section>
    </section>
  </chapter>
  <chapter>
    <title>Notification Topics</title>
    <section>
      <title>General</title>
      <para>This section defines notification topics specific to door control service.</para>
      <para>Please refer to [ONVIF PACS Architecture and Design Considerations] for generic operation guidelines and design principles behind ONVIF PACS services family.</para>
    </section>
    <section>
      <title>Status changes</title>
      <para>Whenever a door mode is changed, the device shall provide the following event:</para>
      <para>Topic: tns1:Door/State/DoorMode</para>
      <programlisting>
&lt;tt:MessageDescription IsProperty="true"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
  &lt;tt:Data&gt;
    &lt;tt:SimpleItemDescription Name="State" Type="tdc:DoorMode"/&gt;
  &lt;/tt:Data&gt;
&lt;/tt:MessageDescription&gt;
        </programlisting>
    <para> A device that signals support for DoorMonitor capability for a particular door instance
        shall provide the following event whenever the physical state of this door is changed: </para>
      <para>Topic: tns1:Door/State/DoorPhysicalState </para>
      <programlisting>&lt;tt:MessageDescription IsProperty="true"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
  &lt;tt:Data&gt;
    &lt;tt:SimpleItemDescription Name="State" Type="tdc:DoorPhysicalState"/&gt;
  &lt;/tt:Data&gt;
&lt;/tt:MessageDescription&gt;</programlisting>
      <para>A device that signals support for LockMonitor capability for a particular door instance shall provide the following event whenever the physical state of this door's lock is changed:</para>
      <para>Topic: tns1:Door/State/LockPhysicalState</para>
      <programlisting>&lt;tt:MessageDescription IsProperty="true"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
  &lt;tt:Data&gt;
    &lt;tt:SimpleItemDescription Name="State" Type="tdc:LockPhysicalState"/&gt;
  &lt;/tt:Data&gt;
&lt;/tt:MessageDescription&gt;</programlisting>
      <para> A device that signals support for DoubleLockMonitor capability for a particular door
        instance shall provide the following event whenever the physical state of this door's secure
        lock is changed: </para>
      <para>Topic: tns1:Door/State/DoubleLockPhysicalState</para>
      <programlisting>&lt;tt:MessageDescription IsProperty="true"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
  &lt;tt:Data&gt;
    &lt;tt:SimpleItemDescription Name="State" Type="tdc:LockPhysicalState"/&gt;
  &lt;/tt:Data&gt;
&lt;/tt:MessageDescription&gt;</programlisting>
      <para>A device that signals support for Alarm capability for a particular door instance shall
        provide the following event whenever the alarm state of this door is changed: </para>
      <para>Topic: tns1:Door/State/DoorAlarm</para>
      <programlisting>&lt;tt:MessageDescription IsProperty="true"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
  &lt;tt:Data&gt;
    &lt;tt:SimpleItemDescription Name="State" Type="tdc:DoorTamperState"/&gt;
  &lt;/tt:Data&gt;
&lt;/tt:MessageDescription&gt;
</programlisting>
      <para>A device that signals support for Tamper capability for a particular door instance shall provide the following event whenever the tamper state of this door is changed:</para>
      <para>Topic: tns1:Door/State/DoorTamper</para>
      <programlisting>&lt;tt:MessageDescription IsProperty="true"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
  &lt;tt:Data&gt;
    &lt;tt:SimpleItemDescription Name="State" Type="tdc:DoorTamperState"/&gt;
  &lt;/tt:Data&gt;
&lt;/tt:MessageDescription&gt;</programlisting>
      <para>A device that signals support for Fault capability for a particular door instance shall
        provide the following event whenever the fault state of this door is changed: </para>
      <para>Topic: tns1:Door/State/DoorFault</para>
      <programlisting>&lt;tt:MessageDescription IsProperty="true"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
  &lt;tt:Data&gt;
    &lt;tt:SimpleItemDescription Name="State" Type="tdc:DoorFaultState"/&gt;
    &lt;tt:SimpleItemDescription Name="Reason" Type="xs:string"/&gt;
  &lt;/tt:Data&gt;
&lt;/tt:MessageDescription&gt;</programlisting>
      <para>The Reason element may be empty or absent. The device may also skip it unless the fault state is FaultDetected.</para>
    </section>
    <section xml:id="Configuration_change_monitoring">
      <title>Configuration changes</title>
      <section>
        <title>Door</title>
        <para>Whenever configuration data for a door is changed or a door is added, the device shall provide the following event:</para>
        <para>Topic: tns1:Configuration/Door/Changed</para>
        <programlisting>&lt;tt:MessageDescription IsProperty="false"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
&lt;/tt:MessageDescription&gt;</programlisting>
        <para> Whenever a door is removed, the device shall provide the following event: </para>
        <para>Topic: tns1:Configuration/Door/Removed</para>
        <programlisting>&lt;tt:MessageDescription IsProperty="false"&gt;
  &lt;tt:Source&gt;
    &lt;tt:SimpleItemDescription Name="DoorToken" Type="pt:ReferenceToken"/&gt;
  &lt;/tt:Source&gt;
&lt;/tt:MessageDescription&gt;</programlisting>
      </section>
    </section>
  </chapter>
  <appendix role="revhistory">
    <title>Revision History</title>
    <para/>
  </appendix>
</book>
