quatanium / python-onvif

ONVIF Client Implementation in Python
MIT License
470 stars 319 forks source link

WSDL for deviceIO SendReceiveSerialCommand missing the 'Token' element #104

Open plesanc-dt opened 3 years ago

plesanc-dt commented 3 years ago

Hey guys,

The sendReceiveSerialCommand function of the deviceIO service is unusable because the 'Token' element is missing in the wsdl for the deviceIO service. Can you guys please add this? Currently it looks like this

<xs:element name="SendReceiveSerialCommand">
    <xs:annotation>
        <xs:documentation>Transmitting arbitrary data to the connected serial device and then receiving its response data.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:sequence>
            <xs:element name="SerialData" type="tmd:SerialData" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>The serial port data.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="TimeOut" type="xs:duration" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>Indicates that the command should be responded back within the specified period of time.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="DataLength" type="xs:integer" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>This element may be put in the case that data length returned from the connected serial device is already determined as some fixed bytes length. It indicates the length of received data which can be regarded as available.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="Delimiter" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>This element may be put in the case that the delimiter codes returned from the connected serial device is already known. It indicates the termination data sequence of the responded data. In case the string has more than one character a device shall interpret the whole string as a single delimiter. Furthermore a device shall return the delimiter character(s) to the client.</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>

But it should be like this

<xs:element name="SendReceiveSerialCommand">
    <xs:annotation>
        <xs:documentation>Transmitting arbitrary data to the connected serial device and then receiving its response data.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:sequence>
            <xs:element name="Token" type="tt:ReferenceToken" minOccurs="0">
                <xs:annotation>
                            <xs:documentation>The physical serial port reference to be used when this request is invoked.</xs:documentation>
                    </xs:annotation>
                </xs:element>
            <xs:element name="SerialData" type="tmd:SerialData" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>The serial port data.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="TimeOut" type="xs:duration" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>Indicates that the command should be responded back within the specified period of time.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="DataLength" type="xs:integer" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>This element may be put in the case that data length returned from the connected serial device is already determined as some fixed bytes length. It indicates the length of received data which can be regarded as available.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="Delimiter" type="xs:string" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>This element may be put in the case that the delimiter codes returned from the connected serial device is already known. It indicates the termination data sequence of the responded data. In case the string has more than one character a device shall interpret the whole string as a single delimiter. Furthermore a device shall return the delimiter character(s) to the client.</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>

I am willing to contribute if I am able to also