From 88553524a3ecd0e5278ed3103a72419186e9c448 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 20 Feb 2022 21:12:13 +0600 Subject: [PATCH] DbgMuxFrame: add tentative FlowControl message definition --- proto.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/proto.py b/proto.py index 50d0e9d..5766f00 100644 --- a/proto.py +++ b/proto.py @@ -39,7 +39,7 @@ class DbgMuxFrame: ConnTerminate = 0x6d, # 'm' ConnTerminated = 0x6e, # 'n' ConnData = 0x6f, # 'o' - # TODO: = 0x70, # 'p' + FlowControl = 0x70, # 'p' Ack = 0x71, # 'q' ) @@ -89,6 +89,12 @@ class DbgMuxFrame: 'Data' / GreedyBytes, ) + # MsgType.FlowControl structure + MsgFlowControl = Struct( + 'ConnRef' / Int16ul, + 'DataBlockLimit' / Int8ul, + ) + # Complete message definition Msg = Switch(this.MsgType, default=GreedyBytes, cases={ MsgType.Enquiry : Const(b''), @@ -101,5 +107,6 @@ class DbgMuxFrame: MsgType.ConnTerminate : MsgConnTerminate, MsgType.ConnTerminated : MsgConnTerminated, MsgType.ConnData : MsgConnData, + MsgType.FlowControl : MsgFlowControl, MsgType.Ack : Const(b''), })