Chapter 10 Documentation¶
Chapter10 is the recording standard of IRIG106. The full standard is defined in http://www.irig106.org/docs/106-11/chapter10.pdf
IRIG106.Chapter10.Chapter10UDP.unpack() method which converts it into an Chapter10 object
The payload of the UDP wrapper contains a Data Format packet (described in 10.6.1 of the spec) which is handled by the
Chapter10 object Chapter10.Chapter10
Examples and details are available below
Chapter10UDP Objects¶
- class AcraNetwork.IRIG106.Chapter10.Chapter10UDP.Chapter10UDP¶
Class to encapsulate Chapter10 payload in UDP packets
Capture a UDP packet and unpack the payload as an Chapter 10 UDP packet. The payload can then be passed to Chapter10 class
There are two types of packets, segmented and full.
>>> import AcraNetwork.Pcap as pcap >>> p = pcap.Pcap("test/ch10_uart2.pcap") >>> data = p[3].payload[0x2A:] >>> n = Chapter10UDP() >>> n.unpack(data) True >>> print(f"{n.format}. Seq={n.sequence}") 1. Seq=3
- pack()¶
Pack the Chapter10UDP object into a binary buffer
- Return type:
bytes
- unpack(buffer)¶
Unpack a string buffer into an Chapter10UDP object
- Parameters:
buffer (bytes) – A string buffer representing an Chapter10UDP packet
- Return type:
None
- TYPE_FULL = 0¶
Full Chapter 10 packets type field constant. Assign to
Chapter10UDP.type
- TYPE_SEG = 1¶
Segmented Chapter 10 packets type field constant. Assign to
Chapter10UDP.type
- channelID¶
Segmented Packets Only. Channel ID of the data in the RCC 106 Chapter 10 packet
- channelsequence¶
Segmented Packets Only,
- offset_pkt_start¶
Format 3 Offset to packet start in bytes
- packetsize¶
Format 2 Packet size
- segmentoffset¶
Segmented Packets Only. The 32-bit Segmented Packets Only, Position of the data in the RCC 106 Chapter 10 packet.
- sequence¶
UDP Sequence number
- sourceid¶
Format 3 Source ID
- sourceid_len¶
Format 3 Source ID length
- type¶
Type of message , Full or Segmented
- version¶
Version
FileParser Objects¶
- class AcraNetwork.IRIG106.Chapter10.FileParser.FileParser(filename, mode='rb')¶
Parse a Chapter10 file. Open the file and iterate through it
>>> fp = FileParser("_dummy.ch10", mode="wb") >>> with fp as ch10file: ... ch10file.write(bytes(10))