Repository navigation
DEV-1305: C# HIL in-stream, start-on-connected, sampling-rate and app-thread items - #222
Merged
Merged
Conversation
…-thread items Four items the Java and shimmer-logandstream HILs already have an equivalent of: - stream.in_stream: reads the battery and the SD directory while streaming, three times each on its own and then twice both at once, as the Java HIL's inStream does. Fails on a reply that does not arrive within 3 s (5 s overlapping), a battery outside 3.0-4.5 V, or the stream checks. - link.start_on_connected: configures the unit on one link, then on a second starts streaming as soon as the API reports Connected, while Connect() is still reading the configuration, as an app reacting to the state change would (the Java HIL's DEV-1275 check). Fails if the API never streams, a call fails, the API reads the configuration wrongly, or the stream fails the checks. - config.sampling_rate: writes 51.2, 256 and 512 Hz in turn, streams 5 s at each and judges each against its own rate, then writes the suite's rate back, as the shimmer-logandstream HIL does. - stream.app_threads: streams 20 s while three app threads read the battery, read the SD directory and query the API's state in loops, as the Java HIL's queueStress does. Fails on a 10 s stall, a call that throws, no reply of either kind, or the stream checks; unanswered requests are counted. Link.Open takes an action to run when the API first reports Connected, and Record a rate to judge the stream against. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
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.
DEV-1305. The C#, Java and shimmer-logandstream HILs check the same firmware on the same bench, but each grew its own items, so a defect one finds can go unchecked in another API. This adds the four items the C# HIL lacked that one of the other two already runs. Companion PRs add the Java and shimmer-logandstream gaps: ShimmerResearch/Shimmer-Java-Android-API#336 and ShimmerResearch/shimmer-host-core#10.
New items
stream.in_streaminStreamdoes.link.start_on_connectedConnect()is still reading the configuration, as an app reacting to the state change would. The Java HIL checks this on every connect (DEV-1275).Connect()fails, the API reads the configuration wrongly, or the stream fails the checksconfig.sampling_ratestream.app_threadsqueueStressdoes.Supporting changes:
Link.Opentakes an action to run when the API first reports Connected.Link.Recordtakes the rate to judge a stream against.On the bench
The four items ran over Classic and BLE on a Shimmer3R (LogAndStream 1.1.22) and a Shimmer3 (LogAndStream 1.1.7, RN4678), with master's API.
stream.in_streamlink.start_on_connectedconfig.sampling_ratestream.app_threadsStarting on Connected is safe in this API. The start went in 1.2-1.4 s before
Connect()returned, with one reply to the connect sequence still to come. The stream came up whole every time, and the API's configuration was intact. So the C# API doesn't have the problem the Java HIL's DEV-1275 check catches.Calls from app threads held up. During
stream.app_threads, the API answered 40 battery reads, about 32 directory reads and about 850 state queries in 20 s, with no stall. Over both transports, the Shimmer3R missed one directory reply out of 32.The Shimmer3 loses samples over Classic at 512 Hz on its own side. The 46 missing samples came in five clean bursts of 3-15 samples, with nothing misaligned. The C# API isn't the cause. The other two APIs see the same on this unit at 512 Hz: 0.20 % in a 5 s Java stream, and 2-3 % from shimmer-logandstream. The Shimmer3R loses nothing at 512 Hz in any of the three.
The directory read back empty on both units. That is the reply the firmware sends when the unit isn't logging. It arrived, which is what the item checks.
🤖 Generated with Claude Code