Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: sesame stack which does not execute in interrupt context (#514)
* Add infra/stream/AtomicByteDeque * Add infra/event/AtomicTriggerScheduler * hal/interfaces/SerialCommunication: Add BufferedSerialCommunication and BufferedSerialCommunicationOnUnbuffered * services/util: Change MessageCommunicationCobs and MessageCommunicationWindowed to get them off interrupts * infra/stream/AtomicByteDeque: Add missing include * services/echo_console/Main: Use BufferedSerialCommunication * Resolve SonarQube warnings * services/util/MessageCommunication: Remove MessageCommunicationReceiveOnInterruptObserver * infra/util/BoundedDeque: Make insert/erase at begin() efficient * services/util/MessageCommunicationCobs: Refactor * services/util: Add TracingMessageCommunicationWindowed * infra/util/BoundedDeque: Make behaviour more logical when inserting on an empty deque * Apply clang-format * Add SESAME documentation * Sesame.adoc: Small improvement on Message packet * services/util/MessageCommunicationCobs: Send starting delimiter only on first packet * services/util/MessageCommunicationWindowed: Only send release window packets when window size is available * Update services/util/test/TestMessageCommunicationWindowed.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * services/util/MessageCommunicationWindowed: initResponse and releaseWindow now consume window size * services/util/MessageCommunicationWindowed: Consume actual COBS size * services/util/MessageCommunication: Refactor sizes * services/util: Rename MessageCommunication to Sesame * services/util: Rename MessageCommunication to Sesame * services/util/SesameWindowed: Compute max message size such that two messages fit in the cobs layer * services/util/SesameWindowed: Compute max message size such that two messages fit in the cobs layer * services/util: Rename MessageCommunication to Sesame * infra/util/BoundedString: Add non-const StdStringAsByteRange * services/util/SesameWindowed: Correctly administrate released window sizes * services/util/SesameWindowed: Don't advertise larger MaxSendMessageSize than the peer can handle * Revert "infra/util/BoundedString: Add non-const StdStringAsByteRange" This reverts commit 79a7b1a. * services/util/test/TestSesameWindowed: Try to unbreak SonarQube * infra/event/AtomicTriggerScheduler: First copy action before resetting scheduled * services/util/TracingSesameWindowed: Adding tracing for sending packets * infra/util/BoundedDeque: correctly modify start * infra/util/BoundedDeque: correctly modify start * services/util/SesameCobs: Handle new message during SendMessageStreamAvailable * services/uti/SesameWindowed: Fix moment of releasing sending * services/echo_console/Console: Concatenate incoming data * services/util/SesameWindowed: Trace SettingOperational * services/util/SesameWindowed: Avoid underflow * services/util/SesameCobs: Don't recursively call DataReceived * services/echo_console/Main: Fix usage of substr * services/echo_console/Main: Fix usage of substr * documents/.../Sesame.adoc: Fix endianness * services/util/SesameWindowed: Refactor * services/util/EchoInstantiation: Use BufferedSerialCommunication iin EchoForwardedToSerial * infra/util/BoundedVector: Fix cases where move_up results in uninitialized memory * Move TracingSesameWindowed from services/util to services/tracer to break a dependency cycle * services/util/SesameSecured: Don't mark destructor as override * services/echo_console/Console: Fix for Concatenate incoming data * services/util/Sesame: Add controlled stopping * protobuf/echo/TracingEcho: Generalize TracingEchoOnStreamsDescendant from TracingEchoOnConnection, add TracingEchoOnSesame * protobuf/echo/TracingEcho: Correctly set serializer * protobuf/echo/TracingEcho: Mark overridden functions as override * services/tracer/Tracer: Extract TracerToStream from Tracer, add TracerToDelegate and TracerColoured * protobuf/echo/TracingEcho: Fix direction of < and > * Use TracerToStream instead of Tracer in tests and applications * protobuf/echo/TracingEcho: Handle tracing of messages split over multiple packets * Sesame.adoc: Add sequence diagram * services/tracer/Tracer: Add resetColour * protobuf/echo/TracingEcho: Fix tracing of forwarded messages * protobuf/echo/TracingEcho: Apply clang-format * protobuf/echo: When a message is split over multiple packets, and when an iniitalize is received in between those packets, the rest of the message is not sent * services/util/Sesame: Add Reset() * services/util/EchoOnSesame: Add Reset() * services/util/SesameWindowed: Fix tracing otherAvailableWindow in Initialized messages * services/util/EchoOnSesame: Reset initialized * Update hal/interfaces/SerialCommunication.hpp * services/network_instantiations/NetworkAdapter: Add ConnectionFactoryWithNameResolver * protobuf/echo/TracingEcho: fix check on contents type * services/network/EchoOnConnection: Only forward AckReceived if still attached * services/network/WebSocketServerConnectionObserver: On AckReceived, when erasing data from the receive buffer also reset the receive stream * services/network_instantiations/NetworkAdapter: Add ExecuteUntil and NetworkActivity * services/network/WebSocketClientConnectionObserver: Remove unused parameter * services/network/TracingEchoOnConnection: Fix merge error * protobuf/protoc_echo_plugin/ProtoCEchoPlugin: Generate field sizes * protobuf/protoc_echo_plugin/ProtoCEchoPlugin: Make field sizes constexpr * fix echo console * Make requests more robust * Add CancelRequestSend to EchoMock * Reinstate MessageCommunication for backwards compatibility * Fix services/util/EchoInstantiation * Process Sonar findings * feat: add echo instantiation functions (#682) * services/util/EchoInstantiation: Add TracingEchoOnUart * Add infra/timer/Waiting * Add OpenEcho * Exclude uart instantiation from embedded builds * services/network_intantiations/EchoInstantiation: Add OpenTracingEcho * protobuf/echo/Echo.cpp: Refactor so that services not registered still get logged if their tracer is registered * services/network/test/TestHttpClient: Remove ambiguity * services/echo_console/Main: Remove ambiguity * protobuf/echo/Echo: Refactor readers * services/util/test/TestEchoOnSesame: Update test * protobuf/echo/test_doubles/EchoSingleLoopback: Keep data alive until it is read * protobuf/echo/TracingEcho: fix skipping messages that are too long * protobuf/echo/TracingEcho: fix skipping messages that are too long * protobuf/echo/TracingEcho: Fix tracing of messages for unknown services * Process review comments * Remove commented out code * Replace UartWindows/UartUnix by UartGeneric * Replace UartWindows/UartUnix by UartGeneric --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Arun Magi <[email protected]>
- Loading branch information