IODWriteMultiple response
| 671 | |
| 672 | |
| 673 | class IODWriteMultipleRes(Block): |
| 674 | """IODWriteMultiple response""" |
| 675 | fields_desc = [ |
| 676 | BlockHeader, |
| 677 | ShortField("seqNum", 0), |
| 678 | UUIDField("ARUUID", None), |
| 679 | XIntField("API", 0xffffffff), |
| 680 | XShortField("slotNumber", 0xffff), |
| 681 | XShortField("subslotNumber", 0xffff), |
| 682 | StrFixedLenField("padding", "", length=2), |
| 683 | XShortEnumField("index", 0, IOD_WRITE_REQ_INDEX), |
| 684 | FieldLenField("recordDataLength", None, fmt="I", length_of="blocks"), |
| 685 | XShortField("additionalValue1", 0), |
| 686 | XShortField("additionalValue2", 0), |
| 687 | IntEnumField("status", 0, ["OK"]), |
| 688 | StrFixedLenField("RWPadding", "", length=16), |
| 689 | FieldListField("blocks", [], PacketField("", None, IODWriteRes), |
| 690 | length_from=lambda pkt: pkt.recordDataLength) |
| 691 | ] |
| 692 | # default values |
| 693 | block_type = 0x8008 |
| 694 | index = 0xe040 |
| 695 | |
| 696 | def post_build(self, p, pay): |
| 697 | # patch the update of block_length, as requests field must not be |
| 698 | # included. block_length is always 60 |
| 699 | if self.block_length is None: |
| 700 | p = p[:2] + struct.pack("!H", 60) + p[4:] |
| 701 | |
| 702 | return Packet.post_build(self, p, pay) |
| 703 | |
| 704 | |
| 705 | # I&M0 |
no test coverage detected
searching dependent graphs…