I thought of three different ways to implement this:
create a class that takes in a TrignoClient
uses the TrignoClient to connect to sensors
implements its own start_stream, etc.
TrignoClient is still used to record data without timestamps
modify MultichannelBuffer to support skipping saving
pros
less likely that things go wrong
cons
additional complexity
modify existing TrignoClient to implement protocols
fill Packet time attribute by computing the time from self.start_time and self.emg_sample_rate
pros
cohesive design
cons
may be more difficult to implement correctly
use existing DelsysBuffer approach for all device managers
get timestamps using software timing when adding to the buffer
computed timestamps are not saved, do them in post processing
For this first attempt, I decided to go with the second option: modifying the existing TrignoClient to implement the protocols in bomi.device_managers.protocols.
I thought of three different ways to implement this:
For this first attempt, I decided to go with the second option: modifying the existing TrignoClient to implement the protocols in
bomi.device_managers.protocols
.Screenshot