From b3a44f0c48e8a0c2ac1be94efc21b6628aa4f654 Mon Sep 17 00:00:00 2001 From: Kuba Kleczkowski Date: Fri, 2 Apr 2021 12:50:19 +0200 Subject: [PATCH] [EGD-6422] Add cellular phone mode documentation Add breif documentation of handling phone modes is service cellular. --- .../service-cellular/doc/README.md | 23 ++++++ .../service-cellular/doc/phone_modes.puml | 65 ++++++++++++++++ .../service-cellular/doc/phone_modes.svg | 75 +++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 module-services/service-cellular/doc/phone_modes.puml create mode 100644 module-services/service-cellular/doc/phone_modes.svg diff --git a/module-services/service-cellular/doc/README.md b/module-services/service-cellular/doc/README.md index 13ff477c21e5f79a4987bd5dcd0060709d78078f..3bce28d305e0390a353ea7743ba260f887abb06b 100644 --- a/module-services/service-cellular/doc/README.md +++ b/module-services/service-cellular/doc/README.md @@ -49,3 +49,26 @@ GSM Module Enables Host to Exit from Power Saving Mode * CPU sentinel block frequency decreasing below 132 MHz * The wake-up described in the point above takes place +## Phone modes in cellular + +Conditions for cellular to switch the phone mode +* Phone mode changes on event provided by 'phoneModeObserver' + +Connected mode +* no actions are needed to meet the Connected mode criteria, calls and messages are allowed + +Do not Disturb +* incoming calls are rejected +* outgoing calls, incoming and outgoing messages are allowed + +Offline mode +* modem is disconnected from the GSM network, both calls and messages are rejected + +| | Connected | Do not Disturb | Offline | +| ----------- | --------- | -------------- | ------- | +|Incoming calls| Allowed | Rejected | Not allowed | +|Outgoing calls| Allowed | Allowed | Not allowed | +|Incoming messages| Allowed | Allowed | Not allowed | +|Outgoing messages| Allowed | Allowed | Not allowed | + +![](phone_modes.svg) \ No newline at end of file diff --git a/module-services/service-cellular/doc/phone_modes.puml b/module-services/service-cellular/doc/phone_modes.puml new file mode 100644 index 0000000000000000000000000000000000000000..3fdda7ecc95554cd420255fecd978881e2656aed --- /dev/null +++ b/module-services/service-cellular/doc/phone_modes.puml @@ -0,0 +1,65 @@ +@startuml + +participant "Incoming call URC" as urc +participant "Call request" as call +participant "Messages DB" as message +participant "Service cellular" as cellular +participant "Service cellular notification " as notification + +== Connected mode == + + activate urc + activate cellular + urc -> cellular : Ring urc / Clip urc + cellular -> cellular : identifyNotification + cellular -> cellular : CellularRingNotification | CellularCallerIdNotification + cellular -> notification :CellularCallerIdMessage | CellularIncominCallMessage + + urc -> cellular : Cmti urc + cellular -> cellular : identifyNotification + cellular -> cellular : receiveSms + cellular -> message : add record + deactivate urc + + activate message + message -> cellular : new queeued + cellular -> cellular : CellularSendSMSMessage + cellular -> message : update record + deactivate message + + activate call + call -> cellular : CellularCallRequestMessage + cellular -> cellular : handleCellularCallRequestMessage + cellular -> notification : CellularRingingMessage + deactivate call + + +== Do not Disturb mode == + + activate urc + + urc -> cellular : Ring urc / Clip urc + cellular -> cellular : identifyNotification + cellular -> cellular : CellularRingNotification | CellularCallerIdNotification + cellular -> cellular : hangUpCall + + urc -> cellular : Cmti urc + cellular -> cellular : identifyNotification + cellular -> cellular : receiveSms + cellular -> message : add record + deactivate urc + + activate message + message -> cellular : new queeued + cellular -> cellular : CellularSendSMSMessage + cellular -> message : update record + deactivate message + + activate call + call -> cellular : CellularCallRequestMessage + cellular -> cellular : handleCellularCallRequestMessage + cellular -> notification : CellularRingingMessage + deactivate call + deactivate cellular + +@enduml diff --git a/module-services/service-cellular/doc/phone_modes.svg b/module-services/service-cellular/doc/phone_modes.svg new file mode 100644 index 0000000000000000000000000000000000000000..989fd738e34a5a5a85eba092db2da8a36aceca04 --- /dev/null +++ b/module-services/service-cellular/doc/phone_modes.svg @@ -0,0 +1,75 @@ +Incoming call URCIncoming call URCCall requestCall requestMessages DBMessages DBService cellularService cellularService cellular notificationService cellular notificationConnected modeRing urc / Clip urcidentifyNotificationCellularRingNotification | CellularCallerIdNotificationCellularCallerIdMessage | CellularIncominCallMessageCmti urcidentifyNotificationreceiveSmsadd recordnew queeuedCellularSendSMSMessageupdate recordCellularCallRequestMessagehandleCellularCallRequestMessageCellularRingingMessageDo not Disturb modeRing urc / Clip urcidentifyNotificationCellularRingNotification | CellularCallerIdNotificationhangUpCallCmti urcidentifyNotificationreceiveSmsadd recordnew queeuedCellularSendSMSMessageupdate recordCellularCallRequestMessagehandleCellularCallRequestMessageCellularRingingMessage \ No newline at end of file