AcraNetwork 1.2.6__tar.gz → 1.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter7/__init__.py +28 -28
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/__version__.py +2 -1
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork.egg-info/PKG-INFO +1 -1
- {acranetwork-1.2.6 → acranetwork-1.2.7}/PKG-INFO +1 -1
- acranetwork-1.2.7/setup.py +38 -0
- acranetwork-1.2.6/setup.py +0 -16
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IENA.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter10/Chapter10UDP.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter10/FileParser.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter10/__init__.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/ARINC429.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/Analog.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/CAN.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/ComputerData.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/MILSTD1553.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/PCM.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/TimeDataFormat.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/UART.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/Video.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter11/__init__.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter7/Golay.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/Chapter7/golay_c.c +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/IRIG106/__init__.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/MPEG/ADTS.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/MPEG/H264.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/MPEG/PES.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/MPEG/PMT.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/MPEG/STANAG4609.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/MPEG/__init__.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/MPEGTS.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/McastSocket.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/NPD.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/ParserAligned.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/Pcap.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/SamDec008.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/SimpleEthernet.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/__init__.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/iNET.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/iNetX.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/nanotime.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork/ptptime.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork.egg-info/SOURCES.txt +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork.egg-info/dependency_links.txt +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/AcraNetwork.egg-info/top_level.txt +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/LICENSE +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/MANIFEST.in +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/README.md +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/examples/adau_to_ch10.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/examples/ch10_recorder.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/examples/ch10_to_pcap.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/examples/pkg_gen.ini +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/examples/tx_iena_udp.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/examples/tx_inetx_udp.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/examples/validate_ch10.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/examples/validate_pcap.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/setup.cfg +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/__init__.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_afdx.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_ch10.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_ch7.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_golay.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_iena.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_inet.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_inetx.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_misc.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_mpegts.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_npd.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_paligned.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_pcap.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_ptptime.py +0 -0
- {acranetwork-1.2.6 → acranetwork-1.2.7}/test/test_simpleethernet.py +0 -0
|
@@ -405,32 +405,32 @@ class PTFR(object):
|
|
|
405
405
|
is_llp = self.llp
|
|
406
406
|
|
|
407
407
|
if is_llp:
|
|
408
|
-
ch7_logger.debug("LLP flag set. First packet should be LLP")
|
|
408
|
+
# ch7_logger.debug("LLP flag set. First packet should be LLP")
|
|
409
409
|
buf = self.payload
|
|
410
410
|
elif remainder is None and self.ptdp_offset > 0 and self.ptdp_offset < 0x7FF:
|
|
411
411
|
buf = self.payload[self.ptdp_offset :]
|
|
412
|
-
ch7_logger.debug(
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
)
|
|
412
|
+
# ch7_logger.debug(
|
|
413
|
+
# "Start of analysis. Could be in the middle of a packet offset={} buffer length={}".format(
|
|
414
|
+
# self.ptdp_offset, len(buf)
|
|
415
|
+
# )
|
|
416
|
+
# )
|
|
417
417
|
elif remainder == bytes() and self.ptdp_offset > 0 and self.ptdp_offset < 0x7FF:
|
|
418
418
|
buf = self.payload[self.ptdp_offset :]
|
|
419
|
-
ch7_logger.debug(
|
|
420
|
-
|
|
421
|
-
)
|
|
419
|
+
# ch7_logger.debug(
|
|
420
|
+
# "No remainder from previous packet, offset={} buffer length={}".format(self.ptdp_offset, len(buf))
|
|
421
|
+
# )
|
|
422
422
|
elif remainder is None:
|
|
423
423
|
buf = self.payload
|
|
424
|
-
ch7_logger.debug(
|
|
425
|
-
|
|
426
|
-
)
|
|
424
|
+
# ch7_logger.debug(
|
|
425
|
+
# "Buffer length={}. Ignoring offset={} Remainder undefined".format(len(buf), self.ptdp_offset)
|
|
426
|
+
# )
|
|
427
427
|
else:
|
|
428
428
|
buf = remainder + self.payload
|
|
429
|
-
ch7_logger.debug(
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
)
|
|
429
|
+
# ch7_logger.debug(
|
|
430
|
+
# "Buffer length={}. Ignoring offset={} Remainder length={}".format(
|
|
431
|
+
# len(buf), self.ptdp_offset, len(remainder)
|
|
432
|
+
# )
|
|
433
|
+
# )
|
|
434
434
|
|
|
435
435
|
do_offset_check = True
|
|
436
436
|
if is_llp:
|
|
@@ -445,7 +445,7 @@ class PTFR(object):
|
|
|
445
445
|
offset_check_count = 0
|
|
446
446
|
|
|
447
447
|
while aligned:
|
|
448
|
-
ch7_logger.debug(f"Starting to check buf of lenght={len(buf)}")
|
|
448
|
+
# ch7_logger.debug(f"Starting to check buf of lenght={len(buf)}")
|
|
449
449
|
p = PTDP(self._golay)
|
|
450
450
|
try:
|
|
451
451
|
buf = p.unpack(buf)
|
|
@@ -460,19 +460,19 @@ class PTFR(object):
|
|
|
460
460
|
yield (None, None, e)
|
|
461
461
|
except PTDPRemainingData as e:
|
|
462
462
|
aligned = False
|
|
463
|
-
ch7_logger.debug(
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
)
|
|
468
|
-
if not is_llp and byte_offset > 0 and do_offset_check:
|
|
469
|
-
|
|
463
|
+
# ch7_logger.debug(
|
|
464
|
+
# "Failed to unpack buffer of length {}bytes. Message={} Offset={}".format(
|
|
465
|
+
# len(buf), e, self.ptdp_offset
|
|
466
|
+
# )
|
|
467
|
+
# )
|
|
468
|
+
# if not is_llp and byte_offset > 0 and do_offset_check:
|
|
469
|
+
# self.check_offsets(byte_offset)
|
|
470
470
|
|
|
471
471
|
yield (None, buf, e)
|
|
472
472
|
else:
|
|
473
473
|
if not is_llp and do_offset_check and byte_offset >= 0:
|
|
474
474
|
# ch7_logger.debug(f"do_offset_check={do_offset_check} byte_offset={byte_offset}")
|
|
475
|
-
self.check_offsets(byte_offset)
|
|
475
|
+
# self.check_offsets(byte_offset)
|
|
476
476
|
do_offset_check = False
|
|
477
477
|
offset_check_count += 1
|
|
478
478
|
elif not is_llp and not do_offset_check and offset_check_count < 1:
|
|
@@ -492,7 +492,7 @@ class PTFR(object):
|
|
|
492
492
|
(next_llp,) = struct.unpack_from(">B", buf)
|
|
493
493
|
# Check if the next PTDP is low latency before yielding
|
|
494
494
|
if next_llp == 0xFF:
|
|
495
|
-
ch7_logger.debug("Next packet is LLP")
|
|
495
|
+
# ch7_logger.debug("Next packet is LLP")
|
|
496
496
|
is_llp = True
|
|
497
497
|
buf = buf[1:]
|
|
498
498
|
byte_offset += len(p) + 1
|
|
@@ -500,7 +500,7 @@ class PTFR(object):
|
|
|
500
500
|
is_llp = False
|
|
501
501
|
# if ((remainder == bytes()) or first_PTFR) and self.ptdp_offset > 0:
|
|
502
502
|
if ((remainder == bytes()) and self.ptdp_offset > 0) or first_PTFR:
|
|
503
|
-
ch7_logger.debug("LLP Packets extracted, jumping to offset")
|
|
503
|
+
# ch7_logger.debug("LLP Packets extracted, jumping to offset")
|
|
504
504
|
buf = self.payload[self.ptdp_offset :]
|
|
505
505
|
do_offset_check = False
|
|
506
506
|
byte_offset = self.ptdp_offset
|
|
@@ -111,4 +111,5 @@
|
|
|
111
111
|
# 1.2.4 - Removed exit in the ch7
|
|
112
112
|
# 1.2.5 - Added C implementation of Golay. Also improved the existing python impl
|
|
113
113
|
# 1.2.6 - Further optimisation of the C Golay implementation
|
|
114
|
-
|
|
114
|
+
# 1.2.7 - Chagned setup so as not to break if extension cannot be compiled
|
|
115
|
+
__version__ = "1.2.7"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from setuptools import setup, Extension
|
|
2
|
+
from setuptools.command.build_ext import build_ext
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OptionalBuildExt(build_ext):
|
|
6
|
+
"""Allow C extension building to fail without aborting the install."""
|
|
7
|
+
|
|
8
|
+
def run(self):
|
|
9
|
+
try:
|
|
10
|
+
super().run()
|
|
11
|
+
except Exception:
|
|
12
|
+
print("C extension build failed, using Python fallback.")
|
|
13
|
+
|
|
14
|
+
def build_extension(self, ext):
|
|
15
|
+
try:
|
|
16
|
+
super().build_extension(ext)
|
|
17
|
+
except Exception:
|
|
18
|
+
print(f"Building extension {ext.name} failed, skipping.")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
ext_modules = []
|
|
22
|
+
try:
|
|
23
|
+
ext_modules.append(
|
|
24
|
+
Extension(
|
|
25
|
+
"AcraNetwork.IRIG106.Chapter7.golay_c",
|
|
26
|
+
["AcraNetwork/IRIG106/Chapter7/golay_c.c"],
|
|
27
|
+
language="c",
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
except Exception:
|
|
31
|
+
pass # Ignore if setup fails to define extension
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Load configuration from setup.cfg
|
|
35
|
+
setup(
|
|
36
|
+
ext_modules=ext_modules,
|
|
37
|
+
cmdclass={"build_ext": OptionalBuildExt},
|
|
38
|
+
)
|
acranetwork-1.2.6/setup.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from setuptools import setup, Extension
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
# Define the C extension
|
|
5
|
-
golay_extension = Extension(
|
|
6
|
-
"AcraNetwork.IRIG106.Chapter7.golay_c",
|
|
7
|
-
sources=["AcraNetwork/IRIG106/Chapter7/golay_c.c"],
|
|
8
|
-
include_dirs=[],
|
|
9
|
-
extra_compile_args=[],
|
|
10
|
-
language="c",
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
# Load configuration from setup.cfg
|
|
14
|
-
setup(
|
|
15
|
-
ext_modules=[golay_extension],
|
|
16
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|