Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast packet enum types #95

Merged
merged 5 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions EosLib/packet/packet.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import struct

from EosLib.device import Device
import EosLib.format.decode_factory
from EosLib.format.base_format import BaseFormat
from EosLib.format.definitions import Type

from EosLib.packet.transmit_header import TransmitHeader
from EosLib.packet.data_header import DataHeader
Expand Down Expand Up @@ -53,10 +55,10 @@ def __str__(self):
output_string += "No data header\n"
else:
output_string += f"Data Header:\n" \
f"\tSender: {self.data_header.sender.name}\n" \
f"\tData type: {self.data_header.data_type.name}\n" \
f"\tPriority: {self.data_header.priority.name}\n" \
f"\tDestination: {self.data_header.destination.name}\n" \
f"\tSender: {Device(self.data_header.sender).name}\n" \
f"\tData type: {Type(self.data_header.data_type).name}\n" \
f"\tPriority: {Priority(self.data_header.priority).name}\n" \
f"\tDestination: {Device(self.data_header.destination).name}\n" \
f"\tGenerate Time: {self.data_header.generate_time}\n"

if self.body is None:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages

setup(name='EosLib',
version='4.3.4',
version='4.3.5',
description='Library of shared code between EosPayload and EosGround',
author='Lightning From The Edge of Space',
author_email='[email protected]',
Expand Down