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

Packet state handling fails to properly initialize "dntoeu" values #194

Closed
MJJoyce opened this issue Mar 5, 2021 · 0 comments · Fixed by #195
Closed

Packet state handling fails to properly initialize "dntoeu" values #194

MJJoyce opened this issue Mar 5, 2021 · 0 comments · Fixed by #195

Comments

@MJJoyce
Copy link
Member

MJJoyce commented Mar 5, 2021

The current handling in get_packet_delta doesn't cache the dntoeu values for a given field.

        # get converted fields / complex fields
        packet_states[pkt_defn.name]['dntoeu'] = {}
        dntoeus = {}
        for f in pkt_defn.fields:
            if f.dntoeu is not None or f.enum is not None or f.type.name in dtype.ComplexTypeMap.keys():
                try:
                    val = getattr(ait_pkt, f.name)
                except ValueError:
                    if isinstance(f.type, dtype.CmdType):
                        val = "Unidentified Cmd"
                    else:
                        val = getattr(ait_pkt.raw, f.name)

                if isinstance(val, cmd.CmdDefn) or isinstance(val, evr.EVRDefn):
                    val = val.name

                dntoeus[f.name] = 

The dntoeu values are extracted and saved in dntoeus but packet_states isn't updated. It looks like this is causing the frontend to not get a proper set of dntoeu values on its initial request from the server. If these fields' raw values don't change then they get left as only raw values.

MJJoyce added a commit that referenced this issue Mar 5, 2021
Packet diff handling when previously unseen packet was received failed
to properly initialized the `dntoeu` values for that packet. This meant
that UI clients would be unable to view the "human readable" versions of
fields in the GUI for any field that updated infrequently. This updates
the new packet type handling to properly update the `dntoeu` values as
well.

Resolve #194
MJJoyce added a commit that referenced this issue Mar 10, 2021
Packet diff handling when previously unseen packet was received failed
to properly initialized the `dntoeu` values for that packet. This meant
that UI clients would be unable to view the "human readable" versions of
fields in the GUI for any field that updated infrequently. This updates
the new packet type handling to properly update the `dntoeu` values as
well.

Resolve #194
MJJoyce added a commit that referenced this issue Mar 10, 2021
Issue #194 - Fix improperly initialized 'dntoeu' packet states
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant