+
+struct OutgoingKiss {
+ kiss_frame: KissFrame,
+ sent: usize,
+}
+
+enum State {
+ /// Nothing happening.
+ Idle,
+
+ /// We received some stream data but missed the leading LSF so we are trying to assemble from LICH.
+ RxAcquiringStream(RxAcquiringStreamState),
+
+ /// We have acquired an identified stream transmission and are sending data payloads to the host.
+ RxStream(RxStreamState),
+
+ /// We are receiving a packet. All is well so far, and there is more data to come before we tell the host.
+ RxPacket(RxPacketState),
+ // TODO: TX
+}
+
+struct RxAcquiringStreamState {
+ /// Partial assembly of LSF by accumulating LICH fields.
+ lich: LichCollection,
+}
+
+struct RxStreamState {
+ /// Track identifying information for this transmission so we can tell if it changes.
+ lsf: LsfFrame,
+}
+
+struct RxPacketState {
+ /// Accumulation of packet data that we have received so far.
+ packet: [u8; 825],
+
+ /// Number of frames we have received. If we are stably in the RxPacket state,
+ /// this will be between 1 and 32 inclusive. The first frame gets us into the
+ /// rx state, and the maximum 33rd frame must end the transmission and state.
+ count: usize,
+}