Closed Julusian closed 9 months ago
Attention: 2 lines
in your changes are missing coverage. Please review.
Comparison is base (
9f87cc1
) 86.29% compared to head (fc1256e
) 86.38%. Report is 1 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
src/atem.ts | 95.00% | 1 Missing :warning: |
src/lib/atemSocket.ts | 94.73% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
feature
When sending commands to the atem, it is only possible to send one per packet.
The
sendCommands
method is now exposed, allowing for sending multiple commands in one packet. Each call to the method will result in packets being sent, no buffering/debouncing is performed between calls. Commands are packed into packets in order, up to a defined byte limit per packet.The maximum packet size is defined based on the
packetMtu
property supplied to the constructor. Care should be taken when setting this, as any upload transfers do not fully respect this value and will result in packets failing to send.This partially covers https://github.com/nrkno/sofie-atem-connection/issues/140, but only solves the case of constructing the commands manually (or with
atem-state
), not usage through the methods provided on theAtem
class.A friendlier batching api can be built on top of this work by someone later.
I have tested this against a Constellation 2ME HD by sending a pair of
MixEffectKeyDVECommand
commands multiple time at once, enough so that it spans multiple packets. The packets were acked, indicating that they were transmitted and received successfully.