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

Manual merge of commits from OpenCarDev aasdk #23

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

matt2005
Copy link
Collaborator

Here are some changes that I've merged in the opencardev fork. I've manually mereged them with a branch that should be able to merge with opendsh.
@icecube45 you seem to know your way around aasdk better than most so if you can review these.

These have been authored by @sjdean.

  • Swap getSize() to getFrameSize() and add totalSize() for completeness.
  • Add SSL Error Logging
  • Switch decrypt() to read the number of bytes from the frame size.
  • Support FrameType descriptor
  • Rework Message Handling
  • Slight tweaks
  • Add isInterleaved boolean
  • If message is NULL and Frame Type is MIDDLE or LAST, then look for an existing message in buffer (if the message_ is null, then we need a FIRST or BULK frame)
  • If message is still NULL, then we will create a new message, but recognise it as a valid frame ONLY if this is a FIRST or BULK frame because we cannot start on a MIDDLE or LAST.
  • Rename recentFrameType to thisFrameType for more accuracy
  • Only Resolve the Frame if the frame is BULK or LAST and the frame is valid.
  • If the frame is interleaved, then we will use our interleavedPromise handler. Only resolve the main promise if the frame is not interleaved.
  • Also reset message once resolved.
  • Carry on reading if the original promise is not resolved (ie FIRST, MIDDLE, or Interleaved frame)
  • Add some counters for debugging purposes.
  • Reworked Message Handling
  • Have adjusted the buffer mechanism so instead of using the buffer to store a message in the event of an interleaved frame, we basically perform all work on the buffer (albeit we take the existing message for the channel id from the buffer for the frame we're working on and write the message to the buffer if the message isn't resolved).
  • Moved writing to buffer to receiveFramePayloadHandler() function if the message is BULK or LAST and therefore not resolved.
  • Simplified receiveFrameHeaderHandler() so that we automatically try to find a message from the buffer and then createa message as necessary depending on the frame type.
  • Excellent stability with no noticeable artefacts in audio after 1 hour.
  • Removed majority of debugging after achieving stability.

* Swap getSize() to getFrameSize() and add totalSize() for completeness.
* Add SSL Error Logging
* Switch decrypt() to read the number of bytes from the frame size.
* Support FrameType descriptor
* Rework Message Handling
@matt2005 matt2005 requested a review from icecube45 February 14, 2022 23:58
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 this pull request may close these issues.

1 participant