Encode a Channel Join Confirm PDU :param stream: The destination stream to write into. :param pdu: the confirmation PDU.
(self, stream: BytesIO, pdu: MCSChannelJoinConfirmPDU)
| 362 | stream.write(pdu.payload) |
| 363 | |
| 364 | def writeChannelJoinConfirm(self, stream: BytesIO, pdu: MCSChannelJoinConfirmPDU): |
| 365 | """ |
| 366 | Encode a Channel Join Confirm PDU |
| 367 | :param stream: The destination stream to write into. |
| 368 | :param pdu: the confirmation PDU. |
| 369 | """ |
| 370 | stream.write(per.writeEnumeration(pdu.result)) |
| 371 | stream.write(Uint16BE.pack(pdu.initiator - MCSChannelID.USERCHANNEL_BASE)) |
| 372 | stream.write(Uint16BE.pack(pdu.requested)) |
| 373 | |
| 374 | if pdu.channelID is not None: |
| 375 | stream.write(Uint16BE.pack(pdu.channelID)) |
| 376 | stream.write(pdu.payload) |
| 377 | |
| 378 | def writeDataPDU(self, stream: BytesIO, pdu: Union[MCSSendDataRequestPDU, MCSSendDataIndicationPDU]): |
| 379 | """ |