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

Restructure Packet #28

Open
kipe opened this issue Feb 18, 2016 · 3 comments
Open

Restructure Packet #28

kipe opened this issue Feb 18, 2016 · 3 comments

Comments

@kipe
Copy link
Owner

kipe commented Feb 18, 2016

As discussed in #14.

@kipe wrote:

Might need to change the Packet.data to Packet.message and create a new Packet.data to reflect the actual, documented data? This would be a very major change, which I'm a bit reluctant to do. On the other hand, it would be fairly easy to do at this point and way more logical (for example, Packet.optional_data, Packet.sender etc already point to the correct data)...

@romor wrote:

Packet could then only consist of Packet.message while data, rorg, status,... could all be properties just accessing the corresponding entry in Packet.message. Alternatively it could be the other way round such that Packet holds data, rorg, status, ... and Packet.message could just be generated from the other variables. The seconds looks more reasonable to me.

Not sure which way this should be handled, as it's largely dependent on whether we're sending or receiving the message...

@TheMeaningfulEngineer
Copy link

Packet.data doesn't reflect the data prom the documentation?
I did behave that way so far with the BS4 packets I tested

@kipe
Copy link
Owner Author

kipe commented Feb 19, 2016

Well, it does and it doesn't. Packet.data includes the whole data, including stuff like RORG, Sender ID etc, which are not included in EEP.
The idea of this issue is to separate the message to Packet.data, Packet.optional_data, Packet.sender, all of which correspond to the logical parts of the documentation.

@stv0g
Copy link
Contributor

stv0g commented Mar 3, 2019

I am trying to understand how we could decouple Packet.build() and Packet.parse_msg() as they are different for ESP2 (see #72). I guess this would be also related to this issue..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants