forked from bobjacobsen/python-openlcb
-
Notifications
You must be signed in to change notification settings - Fork 0
DRAFT: Delegate state to link and flow to port (do not merge here, but to upstream) #8
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
Draft
Poikilos
wants to merge
120
commits into
main
Choose a base branch
from
delegate-state-to-link-and-flow-to-port
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6,616
−1,387
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t correctly in flush (Fix a breakage from my utf8 PR). Enforce str all the way. Improve comments.
…in endElement). Add to sys.path only if can be done accurately.
…es localNodeID instead of farNodeID).
… on example_cdi_access.py) to diagnose bobjacobsen#62.
… level manually set to logging.INFO or more verbose). Switch create a logger (instead of using logging directly) to make the source of messages clear, that being canlink.py in this case. Add & improve docstrings.
… nodeIdToAlias to populate: Fix bobjacobsen#62). Stream XML continuously (use parser.feed) so CDI branches trigger callbacks as they download.
… [value>255] bytearray error).
…s start of next). Comment questionable check until question in issue bobjacobsen#63 is answered.
…rrent reservation process (collision handler runs it again) unless no collision (fix bobjacobsen#62) as per section 6.2.1 of CAN Frame Tansfer Standard. Fix type for CanLink.State values (some were tuples due to trailing comma, now all are ints--still would compare if the value was always set and compared from the Statet(Enum) subclass, but not technically correct) (related to issue bobjacobsen#62). Add a related docstring.
…Permitted before sending messages (related to issue bobjacobsen#62). Use only one receive thread in cdihandler to avoid missing packets (and rename CDIHandler to PortHandler so as to allow handling different types of messages and memos in future versions). Rename "add" and "pop" to "start" and "end" for clarity. Isolate CDI-specific data by adding Mode to PortHandler (based on what data string was requested and not yet terminated). Add formatted_ex for logging.
…om network or is internal).
(needs confirmation) and bobjacobsen#71. Helps validate pull request bobjacobsen#67.
…et on two different threads!
fbb7313 to
f6c6361
Compare
…se Pythonic underscore convention for private methods.
…"fill*" for clarity.
…er state change and Message).
…rocessor, make it a subclass, and separate format (XML) from space (CDI or FDI).
…and thereby implement accurate reporting regardless of using CLI or GUI). Improve some docstrings.
… alias (TODO: ensure this is correct).
2b735cf to
dc7960e
Compare
…mit CID/RID/AMD while not Permitted (requires: Set state before sending AME, also fixed).
…f not Permitted, as per Standard; Test exact length of data when matching AME as per Standard. Move decodeControlFrameFormat to CanFrame as static method for modularity (no CanLink instance is required). Add noise rejection (move old handleData code to handleDataOptimized) (fix bobjacobsen#82 and fix bobjacobsen#83 before committing). Add reusable from*_hex_bytes functions. Make handleData and CanFrame constructor messages more explicit. Fix bobjacobsen#86: Add minimumState option to CanFrame so transition to Inhibited can send AMR after CIDs are queued but not sent, since enqueuing since enqueuing changes CanLink state immediately. Fix bobjacobsen#77: Always increment nextInternallyAssignedNodeID when used. Add explicit blockedReason function for tracing.
…d. Add more type hints (Including: set originalMTI to Union[int, None] instead of using hasattr; mark PIP methods as @staticmethod to match usage). Fix: Make Scanner.EOF int so doesn't overlap utf-8 & find works. Remove lint or add appropriate ignores.
…ine, and this makes related tests pass).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not merge here, see upstream: https://github.com/bobjacobsen/python-openlcb/pull