espressif / esp-protocols

Collection of ESP-IDF components related to networking protocols
198 stars 135 forks source link

Need a Diagram for CMUX States (IDFGH-10545) #318

Closed diplfranzhoepfinger closed 1 year ago

diplfranzhoepfinger commented 1 year ago

Answers checklist.

General issue report

I want to sketch together a mermaid Diagram about the CMUX States:

No CMUX:

flowchart TB
COMMAND_MODE <--> DATA_MODE

Auto CMUX:

flowchart TB
COMMAND_MODE <--> CMUX_MODE

Manual CMUX with 1 Command and 1 Data Channel:

flowchart TB
COMMAND_MODE --> CMUX_MANUAL_MODE
CMUX_MANUAL_MODE --> CMUX_MANUAL_DATA
CMUX_MANUAL_DATA --> CMUX_MANUAL_SWAP
CMUX_MANUAL_SWAP --> CMUX_MANUAL_COMMAND
CMUX_MANUAL_COMMAND --> CMUX_MANUAL_DATA
CMUX_MANUAL_COMMAND --> CMUX_MANUAL_EXIT
CMUX_MANUAL_EXIT --> COMMAND_MODE

Manual CMUX with 2 Command Channels:

flowchart TB
COMMAND_MODE --> CMUX_MANUAL_MODE
CMUX_MANUAL_MODE--> CMUX_MANUAL_EXIT
CMUX_MANUAL_MODE --> CMUX_MANUAL_SWAP
CMUX_MANUAL_SWAP  --> CMUX_MANUAL_SWAP
CMUX_MANUAL_SWAP  --> CMUX_MANUAL_EXIT
CMUX_MANUAL_EXIT --> COMMAND_MODE
diplfranzhoepfinger commented 1 year ago

@david-cermak can you check this 4 Diagramms, 

and comment them. 

my goal is to add also Descriptions of what this state means. 

like "2 Command Channels now" 

and so on ... 

after this is correct, we should take it to the Documentation.

david-cermak commented 1 year ago

Thanks for sketching these diagrams! They look correct to me!

Besides adding them to the docs, we could also "add" them to unit tests, i.e. add new unit tests exercising these transitions.

diplfranzhoepfinger commented 1 year ago

yes, agree !

diplfranzhoepfinger commented 1 year ago

So, 

in addition to this we will need Diagrams what to do when. 

Example my Problem recently:

E (00:01:16.622) cmux_example: Cannot get IP within specified timeout... exiting

how to overcome e.g. such a Problem.

if it happens in Field, WHAT Steps to do to "later" try again getting a IP.