<?xml version="1.0" encoding="utf-8"?>
<protocol name="Arkmed" caption="Arkmed" module="Arkmed" driver="Async"
  redundancy="arkmed" priority="0"
  IPaddress="127.0.0.1" port="2406"
  portNumber="1" baudRate="57600" dataBits="8" parity="2" stopBits="0"
  portCfg="0" timeoutCfg="0"
  direction="0" linkAddressLength="1"
  timeShiftS="0" timeShiftW="0" startDelay="0" runDelay="0" maxFrameSize="228" overLapped="0" ugSystem="0"
  t0="3000" t1="1000"
  t2="0" t3="0" 
  t4="0" t5="1000"
  t6="0"        
  t10="0" t11="0" t12="0"
  t13="0" t14="0">
  <properties title="number,caption,name" format="%s, %s (%s)"
    rdx="line(index=number,name=name,type=module,driver=driver,redLine=priority,IPaddress=IPaddress,port=port,
	portLocal=portLocal,portNumber=portNumber,baudRate=baudRate,dataBits=dataBits,parity=parity,stopBits=stopBits,
	  portCfg=portCfg,timeoutCfg=timeoutCfg,
      direction=direction,linkAddressLength=linkAddressLength,
      timeShiftS=timeShiftS,timeShiftW=timeShiftW,startDelay=startDelay,runDelay=runDelay,maxFrameSize=maxFrameSize,overLapped=overLapped,
      t0=t0,t1=t1,t2=t2,t3=t3,t4=t4,t5=t5,t6=t6,t10=t10,t11=t11,t12=t12,t13=t13,t14=t14,ugSystem=ugSystem)">
    <property name="name" caption="Протокол"
      type="text"	editing="false" visible="false" key="false"/>
    <property name="caption" caption="Наименование"
      type="text"	editing="true" visible="true" key="false"/>
    <property name="module" caption="Модуль"
          type="text"	editing="true" visible="true" key="false">
      <enum item="Arkmed" caption="Arkmed"/>
    </property>
    <property name="driver" caption="Драйвер"
      type="text"	editing="false" visible="true" key="false">
      <enum item="Async" caption="COM-порт (Serial)"/>
    </property>
    <property name="redundancy" caption="Резервирование"
   	  type="text"	editing="false" visible="false" key="false"/>
    <property name="priority" caption="Приоритет"
      type="int"	editing="true" visible="true" key="false">
      <range min="0" max="100"/>
    </property>
    <property name="IPaddress" caption="IP-адрес"
      type="text"	editing="false" visible="false" key="false"/>
    <property name="port" caption="Порт абонента"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="portLocal" caption="Порт драйвера"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="portNumber" caption="COM-порт"
      type="int"	editing="true" visible="true" key="false"/>
    <property name="baudRate" caption="Скорость"
      type="int"	editing="false" visible="true" key="false">
      <enum item="57600" caption="57600"/>
    </property>
    <property name="dataBits" caption="Длина слова"
      type="int"	editing="false" visible="true" key="false">
      <enum item="8" caption="8*"/>
    </property>
    <property name="parity" caption="Паритет"
      type="int"	editing="false" visible="true" key="false">
      <enum item="2" caption="2-EVENPARITY*"/>
    </property>
    <property name="stopBits" caption="Количество стоп-бит"
      type="int"	editing="false" visible="true" key="false">
      <enum item="0" caption="0-ONESTOPBIT*"/>
    </property>
    <property name="portCfg" caption="Удаленное конфигурирование (TCP-порт)"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="timeoutCfg" caption="Удаленное конфигурирование (таймаут, сек)"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="direction" caption="Физическое направление передачи"
      type="int"	editing="false" visible="false" key="false">
      <enum item="0" caption="0 (от B к A)"/>
      <enum item="1" caption="1 (от A к B)"/>
    </property>
    <property name="linkAddressLength" caption="Длина поля адреса канала"
      type="int"  editing="false" visible="false"  key="false"/>
    <property name="timeShiftS" caption="Сдвиг летнего времени(s)"
      type="int"	editing="true" visible="true" key="false"/>
    <property name="timeShiftW" caption="Сдвиг зимнего времени(s)"
      type="int"	editing="true" visible="true" key="false"/>
    <property name="maxFrameSize" caption="Максимальная длина пакета данных"
      type="int" editing="true" visible="false" key="false"/>
    <property name="overLapped" caption="Режим драйвера"
      type="bool" editing="false" visible="false" key="false"/>
    <property name="runDelay" caption="Задержка опроса при чтении данных (ms)"
      type="int" editing="true" visible="false" key="false"/>
    <property name="t0" caption="Период попыток открытия порта (ms)"
      type="int" editing="true" visible="true" key="false"/>
    <property name="t1" caption="Таймаут ожидания ответа (ms)"
      type="int" editing="true" visible="true" key="false"/>
    <property name="t2" caption="Таймаут проверки соединения в балансном режиме (ms)"
      type="int" editing="false" visible="false" key="false"/>
    <property name="t3" caption="Таймаут ожидания ответа в балансном режиме (ms)"
      type="int" editing="false" visible="false" key="false"/>
    <property name="t4" caption="Период синхронизации часов КП (ms)"
      type="int"	editing="true" visible="true" key="false"/>
    <property name="t5" caption="Период общего опроса (ms)"
      type="int"	editing="true" visible="false" key="false"/>
    <property name="t6" caption="Таймаут передачи тестового APDU при резервировании (t6,ms)"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="t10" caption="ТУ. Таймаут внутреннего протокола (ms)"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="t11" caption="Таймаут подтверждения ТУ (ms)"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="t12" caption="Таймаут синхронизации времени (ms)"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="t13" caption="Таймаут обмена по TCP/IP (ms)"
      type="int"	editing="false" visible="false" key="false"/>
    <property name="t14" caption="Таймаут ожидания не в overlaped режиме (ms)"
      type="int" editing="false" visible="false" key="false"/>
    <property name="ugSystem" caption="Синхронизация времени ведомым"
      type="bool"	editing="true" visible="false" key="false"/>
  </properties>
  <remoteunit asduAddressLength="1" NoLength="2" cotLength="1" linkAddress="0" asduAddress="0" modeGI="0" timeSync="0" repeat="3" caption="Устройство">
    <properties title="caption" format="%s">
      <property name="caption" caption="Наименование" type="text"	editing="true" visible="true" key="false"/>
      <property name="asduAddressLength" caption="Размер общего адреса ASDU" type="int"	editing="false" visible="false" key="false"/>
      <property name="cotLength" caption="Длина поля причины передачи" type="int"	editing="false" visible="false" key="false"/>
      <property name="NoLength" caption="Длина адреса объекта информации" type="int"	editing="false" visible="false" key="false"/>
      <property name="linkAddress" caption="Адрес канала" type="int"	editing="true" visible="true" key="true"/>
      <property name="asduAddress" caption="Общий адрес ASDU" type="int"	editing="false" visible="false" key="false"/>
      <property name="modeGI" caption="Режим щита" type="int"	editing="true" visible="true" key="false">
        <enum item="1" caption="1, светлый"/>
        <enum item="2" caption="2, полусветлый вкл"/>
        <enum item="3" caption="3, полусветлый откл"/>
        <enum item="4" caption="4, норм. состояние"/>
      </property>
      <property name="timeSync" caption="Синхронизация времени" type="int"	editing="false" visible="false" key="false">
        <enum item="0" caption="0, отсутствует"/>
        <enum item="1" caption="1, локальное время"/>
        <enum item="2" caption="2, UTC время"/>
      </property>
      <property name="repeat" caption="Количество повторных запросов" type="int" editing="true" visible="true" key="false"/>
    </properties>
    <source caption="" type="0" channel="1" no="0" desc="Master принимает значение">
      <properties title="no,caption" format="%s, %s"
     	  rdx="rtu(asduAddressLength=remoteunit.asduAddressLength, cotLength=remoteunit.cotLength,NoLength=remoteunit.NoLength,linkAddress=remoteunit.linkAddress,asduAddress=remoteunit.asduAddress,modeGI=remoteunit.modeGI,timeSync=remoteunit.timeSync,repeat=remoteunit.repeat,type=type,channel=channel,no=no,id=id,state=state,oldData=oldData,flashing=flashing,nState=nState)">
        <property name="caption" caption="Наименование" type="text"	editing="true" visible="true" key="false"/>
        <property name="type" caption="Код индикатора" type="int"	editing="true" visible="true" key="false">
          <enum item="1" caption="1, ТС"/>
          <enum item="11" caption="11, ТИ38-4С"/>
        </property>
        <property name="channel" caption="№ выхода в БУП" type="int" editing="true" visible="true" key="true" rep="%d"/>
        <property name="no" caption="№ выхода на БУИ / адрес индикатора ТИ" type="int" editing="true" visible="true" key="true" rep="%d"/>
        <property name="id" caption="Идентификатор" type="int" editing="true" visible="true" key="false" rep="%d"/>
        <property name="state" caption="Байт состояния" type="int"	editing="true" visible="true" key="false">
          <enum item="1" caption="зеленый / красный"/>
          <enum item="2" caption="красный / зеленый"/>
        </property>
        <property name="flashing" caption="Отображение изменения состояния" type="bool"	editing="true" visible="true" key="false"/>
        <property name="oldData" caption="Отображение недостоверности" type="bool"	editing="true" visible="true" key="false"/>
        <property name="nState" caption="Нормальное состояние" type="int" editing="true" visible="true" key="false">
          <enum item="1" caption="Вкл"/>
          <enum item="2" caption="Откл"/>
        </property>
      </properties>
    </source>
    <pass caption="" type="1" channel="1" no="0">
      <properties title="no,caption" format="%s, %s "
       	rdx="crt(asduAddressLength=remoteunit.asduAddressLength, cotLength=remoteunit.cotLength,NoLength=remoteunit.NoLength,linkAddress=remoteunit.linkAddress,asduAddress=remoteunit.asduAddress,modeGI=remoteunit.modeGI,timeSync=remoteunit.timeSync,repeat=remoteunit.repeat,type=type,channel=channel,no=no,id=id,state=state,oldData=oldData,flashing=flashing,nState=nState)">
        <property name="caption" caption="Наименование" type="text"	editing="true" visible="true" key="false"/>
        <property name="type" caption="Код индикатора" type="int"	editing="true" visible="true" key="false">
          <enum item="1" caption="1, ТС"/>
          <enum item="9" caption="9, ТИ38(25)-5С"/>
          <enum item="11" caption="11, ТИ38-4С"/>
          <enum item="12" caption="12, ТИ38-3С"/>
          <enum item="14" caption="14, ТС с поворотным ключом"/>
          <enum item="29" caption="29, Звуковая сигнализация"/>
          <enum item="200" caption="200, Тест"/>
          <enum item="128" caption="128, Уровень яркости"/>
          <enum item="218" caption="218, Очистить память"/>
          <enum item="251" caption="251, Обновить индикацию"/>
          <enum item="252" caption="252, Квитировать"/>
          <enum item="253" caption="253, Режим щита"/>
          <enum item="254" caption="254, Контроль линии"/>
        </property>
        <property name="channel" caption="№ выхода в БУП" type="int" editing="true" visible="true" key="true" rep="%d"/>
        <property name="no" caption="№ выхода на БУИ / адрес индикатора ТИ" type="int" editing="true" visible="true" key="true" rep="%d"/>
        <property name="id" caption="Идентификатор" type="int" editing="true" visible="true" key="false" rep="%d"/>
        <property name="state" caption="Байт состояния" type="int" editing="true" visible="true" key="false">
          <enum item="1" caption="зеленый / красный"/>
          <enum item="2" caption="красный / зеленый"/>
          <enum item="3" caption="одноцветный зеленый"/>
          <enum item="4" caption="одноцветный красный"/>
        </property>
        <property name="flashing" caption="Отображение изменения состояния" type="bool"	editing="true" visible="true" key="false"/>
        <property name="oldData" caption="Отображение недостоверности" type="bool"	editing="true" visible="true" key="false"/>
        <property name="nState" caption="Нормальное состояние" type="int" editing="true" visible="true" key="false">
          <enum item="1" caption="Вкл"/>
          <enum item="2" caption="Откл"/>
        </property>
      </properties>
    </pass>
    <controlsource caption="" type="45" channel="1" no="0">
      <properties title="no,caption" format="%s, %s"
     	  rdx="rtu(asduAddressLength=remoteunit.asduAddressLength, cotLength=remoteunit.cotLength,NoLength=remoteunit.NoLength,linkAddress=remoteunit.linkAddress,asduAddress=remoteunit.asduAddress,modeGI=remoteunit.modeGI,timeSync=remoteunit.timeSync,repeat=remoteunit.repeat,type=type,channel=channel,no=no,id=id,state=state,oldData=oldData,flashing=flashing,nState=nState)">
        <property name="caption" caption="Наименование" type="text"	editing="true" visible="true" key="false"/>
        <property name="type" caption="Код индикатора" type="int"	editing="true" visible="true" key="false">
          <enum item="218" caption="218, Очистить память"/>
        </property>
        <property name="channel" caption="№ выхода в БУП" type="int" editing="true" visible="true" key="true" rep="%d"/>
        <property name="no" caption="№ выхода на БУИ / адрес индикатора ТИ" type="int" editing="true" visible="true" key="true" rep="%d"/>
        <property name="id" caption="Идентификатор" type="int" editing="true" visible="true" key="false" rep="%d"/>
        <property name="state" caption="Байт состояния" type="int"	editing="true" visible="true" key="false">
          <enum item="1" caption="зеленый / красный"/>
          <enum item="2" caption="красный / зеленый"/>
        </property>
        <property name="flashing" caption="Отображение изменения состояния" type="bool"	editing="true" visible="true" key="false"/>
        <property name="oldData" caption="Отображение недостоверности" type="bool"	editing="true" visible="true" key="false"/>
        <property name="nState" caption="Нормальное состояние" type="int" editing="true" visible="true" key="false">
          <enum item="1" caption="Вкл"/>
          <enum item="2" caption="Откл"/>
        </property>
      </properties>
    </controlsource>
    <controlpass caption="" type="45" channel="1" no="0" desc="Master посылает команду">
      <properties title="no,caption" format="%s, %s "
       	rdx="crt(asduAddressLength=remoteunit.asduAddressLength, cotLength=remoteunit.cotLength,NoLength=remoteunit.NoLength,linkAddress=remoteunit.linkAddress,asduAddress=remoteunit.asduAddress,modeGI=remoteunit.modeGI,timeSync=remoteunit.timeSync,repeat=remoteunit.repeat,type=type,channel=channel,no=no,id=id,state=state,oldData=oldData,flashing=flashing,nState=nState)">
        <property name="caption" caption="Наименование" type="text" editing="true" visible="true" key="false"/>
        <property name="type" caption="Код индикатора" type="int"	editing="true" visible="true" key="false">
          <enum item="218" caption="218, Очистить память"/>
        </property>
        <property name="channel" caption="№ выхода в БУП" type="int" editing="true" visible="true" key="true" rep="%d"/>
        <property name="no" caption="№ выхода на БУИ / адрес индикатора ТИ" type="int" editing="true" visible="true" key="true" rep="%d"/>
        <property name="id" caption="Идентификатор" type="int" editing="true" visible="true" key="false" rep="%d"/>
        <property name="state" caption="Байт состояния" type="int"	editing="true" visible="true" key="false">
          <enum item="1" caption="зеленый / красный"/>
          <enum item="2" caption="красный / зеленый"/>
        </property>
        <property name="flashing" caption="Отображение изменения состояния" type="bool"	editing="true" visible="true" key="false"/>
        <property name="oldData" caption="Отображение недостоверности" type="bool"	editing="true" visible="true" key="false"/>
        <property name="nState" caption="Нормальное состояние" type="int" editing="true" visible="true" key="false">
          <enum item="1" caption="Вкл"/>
          <enum item="2" caption="Откл"/>
        </property>
      </properties>
    </controlpass>
  </remoteunit>
  <linestate linkAddress="0" mode="0" repeat="0" caption="Состояние линии (работает/нет)">
    <source type="1" channel="138" no="1" caption="Состояние линии"/>
  </linestate>
  <linestatus linkAddress="0" mode="0" repeat="0" caption="Статус резервирования (основной/резервный)">
    <source type="1" channel="138" no="2" caption="Статус резервирования"/>
  </linestatus>
  <redundancy linkAddress="0" mode="0" repeat="0" caption="Управление резервированием">
    <source type="1" channel="139" no="1"/>
    <pass type="1" channel="139" no="1"/>
  </redundancy>
</protocol>
