Index: SDDs/Export_Log.puml =================================================================== diff -u --- SDDs/Export_Log.puml (revision 0) +++ SDDs/Export_Log.puml (revision 0b50a72868a005f6ead4e0d0e1f647dfdc1f446e) @@ -0,0 +1,65 @@ +@startuml Export_Log + + participant OS as OS + participant Script as Script + participant USB as USB + participant SW as SW + participant UI as UI + actor USER as US + + 'Possible actions and interaction types + ' External on CANBus + ' TD -> SW: MSG: Message + ' SW -> TD: MSG: Message + + ' Internal to the application + ' XX -> YY: CMD: Command + ' XX -> XX: ACT: Action + + ' External on OS/FS + ' SW -> USB: ACT: Command + ' SW -> Script: ACT: Command + ' Script -> OS: CMD: Command + ' Script -> SW: MSG: Message + ' OS -> Script: MSG: Message + + ' US -> UI: User actions are: + ' ASK: Display a + ' ENT: User enters a value or string + ' TCH: User touches a button (RadioButton, CheckBox, ...) + ' SCL: User scrolls a flip-able area + + == Export Logs Selection == + group Export Logs Selection + US -> UI: TCH: Settings Menu + UI -> UI: ACT: Device Settings Screen + US -> UI: TCH: Export Log Button + UI -> UI: ACT: Export Log Settings Screen + US -> UI: TCH: Log Type ComboBox + US -> UI: SCL: User scrolls list and select log type + alt Select individual Files + US -> UI: SCL: User scrolls flip-able area for SD-Card file + US -> UI: TCH: User selects which file(s) to export + end + + US -> UI: TCH: Export Button + UI -> UI: ACT: Export Status Indicator (in progress) + UI -> SW: ACT: Export selected log type\n(Application, Service, Treatment) files + + alt Export Application, Service, Treatment Log(s) + SW -> USB: Copy file by file to external storage + SW -> SW: ACT: Log and display status of export result + end + end + + == Eject USB == + group Eject USB + US -> UI: TCH: Eject USB Button + UI -> SW: ACT: Request Unmount USB + SW -> Script: ACT: usb_unmount.sh ( ) + activate Script + Script -> OS: CMD: sudo umount "$USB_FOLDER" + Script -> SW: MSG: exit # + deactivate Script + end +@enduml Index: SDDs/Wifi.puml =================================================================== diff -u -r17dbe44100f8f696e81ee3eb2c85f38f5f96117c -r0b50a72868a005f6ead4e0d0e1f647dfdc1f446e --- SDDs/Wifi.puml (.../Wifi.puml) (revision 17dbe44100f8f696e81ee3eb2c85f38f5f96117c) +++ SDDs/Wifi.puml (.../Wifi.puml) (revision 0b50a72868a005f6ead4e0d0e1f647dfdc1f446e) @@ -1,109 +1,160 @@ @startuml Wifi - participant TD as TD + participant OS as OS + participant Script as Script participant SW as SW participant UI as UI - participant Script as Script - participant Operating_System as OS - control Wait_Retry as Wait_Retry actor USER as US - 'Possible actions and interaction tuypes + 'Possible actions and interaction types + ' External on CANBus ' TD -> SW: MSG: Message ' SW -> TD: MSG: Message - ' SW -> UI: CMD: command - ' UI -> SW: ACT: Action - ' UI -> UI: ACT: Action - ' SW -> Script: ACT: Action - ' Script -> OS: CMD: command + + ' Internal to the application + ' XX -> YY: CMD: Command + ' XX -> XX: ACT: Action + + ' External on OS/FS + ' SW -> Script: ACT: Command + ' Script -> OS: CMD: Command ' Script -> SW: MSG: Message ' OS -> Script: MSG: Message ' US -> UI: User actions are: + ' ASK: Display a ' ENT: User enters a value or string ' TCH: User touches a button (RadioButton, CheckBox, ...) - ' SCL: User scrolls a flipable area + ' SCL: User scrolls a flip-able area - == Normal Bootup == - TD -> SW: MSG: [x12: 3,1] \n OpMode - Standby Dat - SW -> UI: CMD: MainHome Screen - UI ->o Wait_Retry: ⟲: MainHome Screen - == Wi-Fi Settings Page == - US -> UI: TCH: Settings Menu - UI -> UI: ACT: Device Settings Screen - US -> UI: TCH: Wi-Fi Button - UI -> UI: ACT: Wi-Fi Settings Screen - UI -> SW: ACT: Request Wi-Fi Scan - SW -> Script: ACT: wifi_scan.sh - activate Script - Script -> OS: CMD: Send 'nmcli' command to get wifi networks - OS -> Script: MSG: Show list of Wi-Fi networks - Script -> SW: MSG: Return list of available Wi-Fi networks - deactivate Script - SW -> UI: ACT: Display available networks and highlight connected network - UI ->o Wait_Retry: ⟲: Wi-Fi Screen - alt Wi-Fi Scan - US -> UI: TCH: Scan Button + == Wi-Fi Scan == + group Wi-Fi Scan + US -> UI: TCH: Settings Menu + UI -> UI: ACT: Device Settings Screen + US -> UI: TCH: Wi-Fi Button + UI -> UI: ACT: Wi-Fi Settings Screen UI -> SW: ACT: Request Wi-Fi Scan - SW -> Script: ACT: wifi_scan.sh + SW -> Script: ACT: wifi_scan.sh ( ) activate Script - Script -> OS: CMD: Send 'nmcli' command to get wifi networks - OS -> Script: MSG: Show list of Wi-Fi networks - Script -> SW: MSG: Return list of available Wi-Fi networks + Script -> OS: CMD: sudo nmcli -t -f $COLUMNS dev wifi list --rescan yes \n\t| sed 's/:/,/g;s/\\,/:/g' \n\t| sort + OS -> Script: MSG: SSID list + Script -> SW: MSG: \ + \n - echo SSID list < \ + \n\tSSID \ + \n\tBSSID \ + \n\tFREQ \ + \n\tRATE \ + \n\tSIGNAL \ + \n\tSECURITY \ + \n\tWPA-FLAGS \ + \n\tRSN-FLAGS \ + \n\tIN-USE \ + \n > \ + \n - exit # deactivate Script - SW -> UI: ACT: Display available networks and highlight connected network - UI ->o Wait_Retry: ⟲: Wi-Fi Screen + alt successful ( exit == 0 ) + SW -> UI: ACT: SSID list information + UI -> UI: ACT: \ + \n - populate SSID list \ + \n - highlight connected \ + \n - disable unsupported + group Wi-Fi Information + SW --> SW: ... + end + else failed + SW -> UI: ACT: Empty SSID list + UI -> UI: ACT: SSID list Cleanup + UI -> US: ACT: Notify user end - alt Connect Wi-Fi - US -> UI: SCL: Scroll through available networks - US -> UI: TCH: Select desired network - US -> UI: ENT: Enter password - alt Confirm - US -> UI: TCH: Confirm Button - UI -> SW: ACT: Connect Wi-Fi by SSID and password - SW -> Script: ACT: wifi_connect.sh - activate Script - Script -> OS: CMD: Send 'nmcli' command with SSID and password - OS -> Script: MSG: Result of Wi-Fi connect command - deactivate Script - UI -> UI: ACT: Wi-Fi Settings Screen - UI -> SW: ACT: Request Wi-Fi Scan - SW -> Script: ACT: wifi_scan.sh - activate Script - Script -> OS: CMD: Send 'nmcli' command to get wifi networks - OS -> Script: MSG: Show list of Wi-Fi networks - Script -> SW: MSG: Return list of available Wi-Fi networks - deactivate Script - SW -> UI: ACT: Display available networks and highlight connected network - UI ->o Wait_Retry: ⟲: Wi-Fi Screen - alt Connection Successful - SW -> SW: ACT: Request connected Wi-Fi information - SW -> Script: ACT: wifi_info.sh - activate Script - Script -> OS: CMD: 'nmcli commands to retrieve desired parameters' - Script -> SW: MSG: Provide Wi-Fi info - deactivate Script - SW -> UI: CMD: Update all UI fields - UI ->o Wait_Retry: ⟲: Wi-Fi Screen - end - else Back - US -> UI: TCH: Back Button - UI ->o Wait_Retry: ⟲: Wi-Fi Screen + end + + == Wi-Fi Information == + group Wi-Fi Information + SW -> SW: ACT: Request connected Wi-Fi information + SW -> Script: ACT: wifi_info.sh ( ) + activate Script + Script -> OS: CMD: \ + \n\t SSID : sudo nmcli -t -f NAME connection show --active \ + \n\t IPMASK : sudo nmcli -t -g IP4.ADDRESS device show wlan0 \ + \n\t ADDR : echo $IPMASK | sed 's/\/.*//g' \ + \n\t MASK : sudo ipcalc -m "$(echo $IPMASK)" | sed "s/NETMASK=//g") \ + \n\t GATEWAY: sudo nmcli -t -g IP4.GATEWAY device show wlan0)" \ + \n\t DNS : sudo nmcli -t -g IP4.DNS device show wlan0 | sed "s/ //g" | sed 's/|/,/g' + OS -> Script: MSG: Connection Information + Script -> SW: MSG: \ + \n - echo < \ + \n\t SSID \ + \n\t ADDR \ + \n\t MASK \ + \n\t GATEWAY \ + \n\t DNS \ + \n > \ + \n - exit # + deactivate Script + alt successful ( exit == 0 ) + SW -> UI: CMD: Update Items + else failed + SW -> UI: ACT: Empty Items + UI -> US: ACT: Notify user + end + end + + == Wi-Fi Connection == + group Wi-Fi Connection + US -> UI: SCL: SSID list + US -> UI: TCH: SSID selection of Not-Connected + UI -> UI: ACT: Ask for password + US -> UI: ENT: Enter password + US -> UI: TCH: Confirm Button + UI -> SW: ACT: Connection request + SW -> Script: CMD: wifi_connect.sh ( SSID, password ) + activate Script + Script -> OS: CMD: sudo nmcli dev wifi \ + \n\t connect "$SSID_NAME" \ + \n\t password "$SSID_PASS" + OS -> Script: MSG: Command Result + Script -> SW: MSG: \ + \n - echo <> \ + \n - exit # + deactivate Script + alt successful ( exit == 0 ) + group Wi-Fi Information + SW --> SW: ... end - else Disconnect Wi-Fi - US -> UI: TCH: Select connected network - alt Confirm - US -> UI: TCH: Confirm Button - UI -> SW: ACT: Request disconnect Wi-Fi by SSID - SW -> Script: ACT: wifi_disconnect.sh - activate Script - Script -> OS: CMD: 'nmcli' command to disconnect from Wi-Fi network by SSID - OS -> Script: MSG: Result of Wi-Fi disconnect command - deactivate Script - SW -> UI: CMD: Clear all UI fields (IP, Gateway, Subnet, DNS, SSID) - else Back - US -> UI: TCH: Back Button - UI ->o Wait_Retry: ⟲: Wi-Fi Screen + UI -> UI: ACT: \ + \n - Highlight connected + else failed + UI -> UI: ACT: \ + \n - highlight removal + UI -> US: ACT: Notify user + end + end + + == Wi-Fi Disconnection == + group Wi-Fi Disconnection + US -> UI: TCH: SSID selection of Connected + UI -> US: ASK: Confirm the disconnection of the SSID + US -> UI: TCH: Confirm Button + UI -> SW: ACT: Request disconnection + SW -> Script: ACT: wifi_disconnect.sh ( SSID ) + activate Script + Script -> OS: CMD: sudo nmcli connection \ + \n\t delete "$SSID_NAME" + OS -> Script: MSG: Command Result + Script -> SW: MSG: \ + \n - echo <> \ + \n - exit # + deactivate Script + alt successful ( exit == 0 ) + group Wi-Fi Information + SW --> SW: ... end + UI -> UI: ACT: \ + \n - Highlight connected + else failed + UI -> UI: ACT: \ + \n - highlight removal + UI -> US: ACT: Notify user end + end @enduml