This PR is built on top of @ykyohei's branch to add packet drop book-keeping to the HWP encoder agent. The purpose of this is to add encoder packet versioning to remove tight coupling requirements between socs and sobonelib. Additionally, some changes were made to the way dropped packets were counted in order to get it to work on my test setup.
change parse_counter_info so that it takes a packet version, so it can still parse older versions of encoder packets
Change the object in the counter_queue from an unnamed tuple of values to the EncoderPacket dataclass. This allows us to be more flexible in what data is parsed from the incoming packet, and makes it so code does not rely on hardcoded tuple indexes.
Adds version info, and sample count to encoder data packets. Removes hardcoded counter lengths and packet sizes.
In addition to publishing raw counters, this tracks the number of dropped edges, encoder packets, and encoder buffer resets (from the beaglebone PRU) so we can more easily track in grafana when there are data drops, and where they are occurring. This is required because computing diffs to find dropped samples in grafana can be finicky
Motivation and Context
This was required for getting packet drop testing working on my local beaglebone setup. Backwards compatibility stuff is so that we don't accidentally break other HWP systems on socs update.
How Has This Been Tested?
This has been tested on my local beaglebone with a fixed "HWP frequency"
This PR is built on top of @ykyohei's branch to add packet drop book-keeping to the HWP encoder agent. The purpose of this is to add encoder packet versioning to remove tight coupling requirements between socs and sobonelib. Additionally, some changes were made to the way dropped packets were counted in order to get it to work on my test setup.
These changes correspond to this commit in the sobonelib branch: https://github.com/simonsobs/sobonelib/commit/aeb7e8523b2851e2de3b187ab770dfb936b1a01a
Description
This PR does makes the following changes:
parse_counter_info
so that it takes a packet version, so it can still parse older versions of encoder packetscounter_queue
from an unnamed tuple of values to theEncoderPacket
dataclass. This allows us to be more flexible in what data is parsed from the incoming packet, and makes it so code does not rely on hardcoded tuple indexes.Motivation and Context
This was required for getting packet drop testing working on my local beaglebone setup. Backwards compatibility stuff is so that we don't accidentally break other HWP systems on socs update.
How Has This Been Tested?
This has been tested on my local beaglebone with a fixed "HWP frequency"