-
Notifications
You must be signed in to change notification settings - Fork 7
Refactor modules #68
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
Refactor modules #68
Conversation
I think I borked this PR by merging your Packet/PacketData unification PR. Sorry about that. This is going to be a pain if we're changing code inside the modules. After my MIL-1750A PR I'm done for a while. Can we merge that, rebase this, and then merge it? |
@greglucas I'll approve this as soon as you can resolve the rebase. |
cdfc846
to
3560c55
Compare
@medley56, this should be good to go with a rebase now and I can do large find/replace to move things around pretty easily if we want to change any namespaces. My two questions for name changes (better suggestions welcome too!):
|
@greglucas I like |
matches -> comparisons packets -> parseables
_supported_encodings = ['IEEE-754', 'MIL-1750A'] | ||
|
||
def __init__(self, size_in_bits: int, encoding: str = 'IEEE-754', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these string restrictions are incorrect. They should be 'IEEE754' and 'MILSTD_1750A', rather than 'IEEE-754' and 'MIL-1750A'. Here's the enumerated value list for FloatEncodingType
from lines 3886-3895 of the XTCE schema document:
<simpleType name="FloatEncodingType">
<restriction base="string">
<enumeration value="IEEE754_1985"/>
<enumeration value="IEEE754"/>
<enumeration value="MILSTD_1750A"/>
<enumeration value="DEC"/>
<enumeration value="IBM"/>
<enumeration value="TI"/>
</restriction>
</simpleType>
The above also agrees with the list in section 4.3.2.2.5.7.1 of the element description document.
This is a major refactor, breaking the xtcedef.py module into separate entities.
I went with:
Parameter
(only one) andParameterTypes
)I'm happy to move things around more/less too, just let me know your preferences. There is some fighting going on with circular imports depending on how we structure this, so we do need to make sure not to couple the modules too closely.
closes #34
Checklist