<?xml version="1.0" encoding="utf-8"?>
<messy version="2">
  <!--
    For each station, the used devices have to be defined like following:
    - if there is one MesSy for one station, only the ipAddress has to be defined; if deviceId and slot is not defined, "1" will be taken as default
    - if there is one MesSy for several stations, the slot has to be defined in addition to the ipAddress
      e.g. one MesSy for four stations with eight stations in total will result in:
        station 1: slot="1" ipAddress="192.168.222.1"
        station 2: slot="2" ipAddress="192.168.222.1"
        station 3: slot="3" ipAddress="192.168.222.1"
        station 4: slot="4" ipAddress="192.168.222.1"
        station 5: slot="1" ipAddress="192.168.222.2"
        station 6: slot="2" ipAddress="192.168.222.2"
        station 7: slot="3" ipAddress="192.168.222.2"
        station 8: slot="4" ipAddress="192.168.222.2"
    - if there are two MesSys for one station, the deviceId has to be defined in addtion to the ipAddress
      e.g. two MesSys for one station with two stations in total
        station 1: deviceId="1" ipAddress="192.168.222.1"
                  deviceId="2" ipAddress="192.168.222.11"
        station 2: deviceId="1" ipAddress="192.168.222.2"
                  deviceId="2" ipAddress="192.168.222.12"
    - if there are e.g. three MesSys used for two stations, the deviceId and slot has to be defined in addition to the ipAddress
        station 1: deviceId="1" slot="1" ipAddress="192.168.222.1"
                  deviceId="2" slot="1" ipAddress="192.168.222.11"
        station 2: deviceId="1" slot="1" ipAddress="192.168.222.2"
                  deviceId="2" slot="2" ipAddress="192.168.222.11"  <- same ip address as device 2 from station 1, therefore the second slot must be used
    !!! a slot and ipAddress combination has to be unique !!!
  -->

  <!-- simple station configuration 2 DUT's on one MesSy -->
  <stations>
    <station index="1"><device slot="1" ipAddress="192.168.222.1" /></station>
    <station index="2"><device slot="2" ipAddress="192.168.222.1" /></station>
  </stations>

  <!--
    To be able to assign the signals to the stations, each signal must have a connector with a deviceId + slot combination, that matches a defined
    device for each station. Furthermore, it is not allowed to define connectors which will match more than on device for a station.
    Example:
     - station 1 to 4 have each two devices, where the second device is used by two stations
         - station 1: deviceId="1" slot="1" ipAddress="192.168.222.1 and deviceId="2" slot="1" ipAddress="192.168.222.11
         - station 2: deviceId="1" slot="1" ipAddress="192.168.222.2 and deviceId="2" slot="2" ipAddress="192.168.222.11
         - station 3: deviceId="1" slot="1" ipAddress="192.168.222.3 and deviceId="2" slot="1" ipAddress="192.168.222.12
         - station 4: deviceId="1" slot="1" ipAddress="192.168.222.4 and deviceId="2" slot="2" ipAddress="192.168.222.12
     - if the signal is on the first device, only one connector may be defined, because deviceId="1" slot="1" will match with a device on all stations
     - if the signal is on the second device, two connectors have to be defined; deviceId="2" slot="1" will match with a device on station 1 and 3; deviceId="2" slot="2" will match with a device on station 2 and 3
  -->

  <modules>
    <module name="ANALOG">
      <item name="U_24V">
        <connector slot="1" name="SingIn_81" resourcesharing="1" />
        <connector slot="2" name="SingIn_81" resourcesharing="1" />
      </item>
      <item name="U_UBATT">
        <connector slot="1" name="SingIn_82" resourcesharing="1" />
        <connector slot="2" name="SingIn_82" resourcesharing="1" />
      </item>
      <item name="U_BATT_FUSED">
        <connector slot="1" name="SingIn_1" />
        <connector slot="2" name="SingIn_64" />
      </item>
      <item name="U_BATT_CMM">
        <connector slot="1" name="SingIn_2" />
        <connector slot="2" name="SingIn_65" />
      </item>
      <item name="U_Kl_30">
        <connector slot="1" name="SingIn_3" />
        <connector slot="2" name="SingIn_66" />
      </item>
      <item name="U_Kl_15">
        <connector slot="1" name="SingIn_4" />
        <connector slot="2" name="SingIn_67" />
      </item>
      <item name="I_Kl_15">
        <connector slot="1" name="DiffIn_1" />
        <connector slot="2" name="DiffIn_17" />
      </item>
  </module>

    <module name="RELAY">
      <item name="DIGITAL_INPUT_1">
        <connector slot="1" name="REL_1" />
        <connector slot="2" name="REL_33" />
      </item>
      <item name="LOAD_1">
        <connector slot="1" name="REL_25" />
        <connector slot="2" name="REL_57" />
      </item>
      <item name="Morse">
        <connector slot="1" name="REL_26" />
        <connector slot="2" name="REL_58" />
      </item>
    </module>

    <module name="FET">
      <item name="Kl_30">
        <connector slot="1" name="FET_1" />
        <connector slot="2" name="FET_13" />
      </item>
      <item name="KL_15">
        <connector slot="1" name="FET_2" />
        <connector slot="2" name="FET_14" />
      </item>
    </module>

    <module name="TRIGGER">
      <item name="CMM_ON">
        <connector slot="1" name="TRIG_07" direction="out" defaultState="off" />
        <connector slot="2" name="TRIG_08" direction="out" defaultState="off" />
      </item>
      <item name="TRIG1">
        <connector slot="1" name="TRIG_01" direction="out" defaultState="on" />
        <connector slot="2" name="TRIG_04" direction="out" defaultState="on" />
      </item>
      <item name="TRIG2">
        <connector slot="1" name="TRIG_02" direction="out" defaultState="on" />
        <connector slot="2" name="TRIG_05" direction="out" defaultState="on" />
      </item>
      <item name="TRIG3">
        <connector slot="1" name="TRIG_03" direction="out" defaultState="on" />
        <connector slot="2" name="TRIG_06" direction="out" defaultState="on" />
      </item>
    </module>

    <module name="OPENCOLLECTOR">
      <item name="GREEN">
        <connector slot="1" name="OPEN_COLL_16" />
        <connector slot="2" name="OPEN_COLL_14" />
      </item>
      <item name="RED">
        <connector slot="1" name="OPEN_COLL_15" />
        <connector slot="2" name="OPEN_COLL_13" />
      </item>
    </module>

    <module name="CAN">
      <item name="CAN">
        <connector slot="1" name="CAN_3B" resourcesharing="1" />
        <connector slot="2" name="CAN_4B" resourcesharing="1" />
      </item>
      <item name="CAN_Repeater">
        <connector slot="1" name="CAN_4B" resourcesharing="1" />
        <connector slot="2" name="CAN_3B" resourcesharing="1" />
      </item>
    </module>

    <module name="SERIAL">
      <item name="LIN">
        <connector slot="1" name="SERIAL_1A" resourcesharing="1" />
        <connector slot="2" name="SERIAL_1B" resourcesharing="1" />
      </item>
      <item name="LIN_Repeater">
        <connector slot="1" name="SERIAL_1B" resourcesharing="1" />
        <connector slot="2" name="SERIAL_1A" resourcesharing="1" />
      </item>
    </module>

    <module name="CMM">
      <item name ="CMM" onOffSwitch="CMM_ON">
        <connector slot = "1" name = "CAN_5B" resourcesharing="1"/>
        <connector slot = "2" name = "CAN_5B" resourcesharing="1"/>
      </item>
    </module>

  </modules>
</messy>