Skip to content

Harmonize message class #350

@felixdivo

Description

@felixdivo

There are a number of problems with the message object and the file IO:

  • make __eq__() take into account all fields except timestamp; added channel and error_state_indicator
  • should the timestamp really be excluded?
  • added channel, bitrate_switch and error_state_indicator to __str__()
  • __init__() is now properly documented
  • added a check param to __init__() that then checks the input, and only then
  • Writing and then reading a message does not reproduce the same message again; this will be surprising to new users. This is rather a problem of the IO module and the only partial CAN FD support. ⇒ added warning to docs
  • Should we add a deprecation notice to Message.id_type?
  • add __bytes__ support
  • use __slots__ for faster attribute access & space savings in memory
  • adjusted/extended logformat_test.py
  • add tests

In general: Surprises are bad (when programming). So I suppose we change some of the above.

Note: I am currently working on these on the change-messages branch an track my work here.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions