Skip to content

.portnomenclature

Eloi Stree edited this page Dec 21, 2021 · 1 revision

This file allows to connect your hardware from serialport to booleans

You can fire a tutorial here: Arduino with OMI

To make it short, you can create a message like this #0011|48 on your hardware that you send on the serial port.
Then convert it to boolean with this file like such:

  • <digit index="0" label= "FootLeftTop" />
  • <digit index="1" label= "FootLeftDown" />
  • <digit index="2" label= "FootRightTop" />
  • <digit index="3" label= "FootRightDown" />
  • <analog index="0" label="LeftFootPression" from="5" to="9" />
  • <analog index="1" label="RightFootPression" from="5" to="9"/>

And set the port use with the following line

  • <PortConnection portId="20" patternName="Custom" />
    The port can change based on the operating system and the USB port use. Change it when needed.
<?xml version="1.0" encoding="utf-8"?>
<AnalogDigitalCompressConfig>
  <PortConnections>
    <PortConnection portId="20" patternName="Custom" />
  </PortConnections>
  <AnalogDigitalCompressPatterns>
     <AnalogDigitalCompressPattern name="Custom" docUrl="">
       <digit index="0" label= "FootLeftTop" />
       <digit index="1" label= "FootLeftDown" />
       <digit index="2" label= "FootRightTop" />
       <digit index="3" label= "FootRightDown" />
       <analog index="0" label="LeftFootPression" from="5" to="9" />
       <analog index="1" label="RightFootPression" from="5" to="9"/>
    </AnalogDigitalCompressPattern>
  </AnalogDigitalCompressPatterns>
</AnalogDigitalCompressConfig>

The file respect the following grammar:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="AnalogDigitalCompressConfig">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="PortConnections">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="PortConnection">
                <xs:complexType>
                  <xs:attribute name="portId" type="xs:unsignedInt" use="required" />
                  <xs:attribute name="patternName" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="AnalogDigitalCompressPatterns">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="AnalogDigitalCompressPattern">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="digital">
                      <xs:complexType>
                        <xs:attribute name="index" type="xs:unsignedInt" use="required" />
                        <xs:attribute name="label" type="xs:string" use="required" />
                        <xs:attribute name="inverse" type="xs:boolean" use="optional" />
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="analog">
                      <xs:complexType>
                        <xs:attribute name="index" type="xs:unsignedInt" use="required" />
                        <xs:attribute name="label" type="xs:string" use="required" />
                        <xs:attribute name="from" type="xs:short" use="required" />
                        <xs:attribute name="to" type="xs:short" use="required" />
                        <xs:attribute name="inverse" type="xs:boolean" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="name" type="xs:string" use="required" />
                  <xs:attribute name="docUrl" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
Clone this wiki locally