Пример #1
0
 def writeErectDomainRequest(self, stream: BytesIO, pdu: MCSErectDomainRequestPDU):
     """
     Encode a Erect Domain Request PDU
     :param stream: The destination stream to write into.
     :param pdu: the PDU to encode.
     """
     stream.write(per.writeInteger(pdu.subHeight))
     stream.write(per.writeInteger(pdu.subInterval))
     stream.write(pdu.payload)
Пример #2
0
    def writeConferenceCreateResponse(self, stream: BytesIO, pdu: GCCConferenceCreateResponsePDU):
        """
        Write a GCCConferenceCreateResponsePDU to a stream.
        :param stream: byte stream to put the ConferenceCreateResponse data in.
        :param pdu: the PDU to write.
        """

        stream.write(Uint16BE.pack(GCCParser.NODE_ID - 1001))
        stream.write(per.writeInteger(1))
        stream.write(per.writeEnumeration(0))
        stream.write(per.writeNumberOfSet(1))
        stream.write(per.writeChoice(0xc0))
        stream.write(per.writeOctetStream(GCCParser.H221_SERVER_KEY, 4))
        stream.write(per.writeOctetStream(pdu.payload))
Пример #3
0
    def writeConferenceCreateResponse(self, stream, pdu):
        """
        Read a GCCConferenceCreateResponsePDU and put its raw data into stream
        :param stream: byte stream to put the ConferenceCreateResponse data in
        :type stream: BytesIO
        :type pdu: GCCConferenceCreateResponsePDU
        """

        stream.write(Uint16BE.pack(GCCParser.NODE_ID - 1001))
        stream.write(per.writeInteger(1))
        stream.write(per.writeEnumeration(0))
        stream.write(per.writeNumberOfSet(1))
        stream.write(per.writeChoice(0xc0))
        stream.write(per.writeOctetStream(GCCParser.H221_SERVER_KEY, 4))
        stream.write(per.writeOctetStream(pdu.payload))