Skip to content

Commit

Permalink
Application layer refactored.
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueAndi committed Dec 30, 2024
1 parent 0f588f4 commit de5481d
Show file tree
Hide file tree
Showing 46 changed files with 102 additions and 52 deletions.
7 changes: 4 additions & 3 deletions config/mcu.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ platform_packages =
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#release/v2.x
framework = arduino
build_flags =
-I./src/Common
-I./src/ButtonHandler
-I./src/DisplayMgr
-I./src/General
-I./src/Generated
-I./src/Gfx
-I./src/Hal
-I./src/Performance
-I./src/Plugin
-I./src/StateMachine
-I./src/SystemState
-I./src/Update
-I./src/Web
-I./src/Web/WsCommand
Expand Down
5 changes: 3 additions & 2 deletions doc/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* [Purpose](#purpose)
* [Scope](#scope)
* [Context](#context)
* [Deployment](#deployment)
* [Task Deployment](#task-deployment)
* [Layers](#layers)
* [Application](#application)
* [Services](#services)
Expand Down Expand Up @@ -43,7 +43,8 @@ PIXELIX as a system is not complete alone. It interacts with other neighbor syst

![context-diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/Pixelix/master/doc/architecture/uml/context.wsd)

# Deployment
# Task Deployment
The diagram shows the task deployment on the esp32 dual core derivates.

![deployment-diagram](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/Pixelix/master/doc/architecture/uml/deployment.wsd)

Expand Down
60 changes: 41 additions & 19 deletions doc/architecture/uml/app_layer.wsd
Original file line number Diff line number Diff line change
@@ -1,31 +1,53 @@
@startuml app_layer

skinparam component {
BackgroundColor<<Arduino>> Lightgreen
BackgroundColor<<Future>> White
}

package "Application" as app {

component "StateMachine" as stateMachine
component "DisplayMgr" as displayMgr
component "UpdateMgr" as updateMgr
component "main" as main <<program-entry>>

package "StateMachine" as stateMachinePckg {
component "StateMachine" as stateMachine
}

package "General" as generalPckg {
component "MiniTerminal" as miniTerminal
component "MemoryMonitor" as memoryMonitor
}

package "ButtonHandler" as buttonHandlerPckg {
component "ButtonHandler" as buttonHandler
}

package "DisplayMgr" as displayMgrPckg {
component "DisplayMgr" as displayMgr
}

package Plugin
package "Plugin" as pluginPckg {
component "PluginMgr" as pluginMgr
}

package "SystemState" as systemStatePckg {
component "APState" as apState
component "ConnectedState" as connectedState
component "ConnectingState" as connectingState
component "ErrorState" as errorState
component "IdleState" as idleState
component "InitState" as initState
component "RestartState" as restartState
}

package "State" as state {
component "APState"
component "ConnectedState"
component "ConnectingState"
component "ErrorState"
component "IdleState"
component "InitState"
component "RestartState"
package "Update" as updatePckg {
component "UpdateMgr" as updateMgr
}

stateMachine ...> state
main --> stateMachine
main --> miniTerminal
main ---> buttonHandler
main --> memoryMonitor
stateMachine o---> systemStatePckg

displayMgr ..> Plugin
initState ...> updateMgr: <<use>>
connectedState ...> updateMgr: <<use>>
restartState ...> updateMgr: <<use>>
}

@enduml
44 changes: 35 additions & 9 deletions doc/doxygen/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,55 @@
Full RGB LED matrix, based on an ESP32 and WS2812B LEDs.
<hr>

@defgroup gfx Graphics functions
The graphics functions containing all kind of widgets and the main display manager,
as well as the LED matrix controller.
@defgroup APP_LAYER Application layer
The application layer.
@{
@}

@defgroup SERVICE_LAYER Service layer
The service layer.
@{
@}

@defgroup hal Hardware abstraction
The hardware abstraction makes it easier to use internal and external peripherals.
@defgroup HA_LAYER Hardware abstraction layer
The hardware abstraction layer.
@{
@}

@defgroup statemachine Statemachine

@defgroup STATE_MACHINE Statemachine
@ingroup APP_LAYER
Generic state machine.
@{
@}

@defgroup sys_states System states
@defgroup SYS_STATES System states
@ingroup APP_LAYER
The system states.
@{
@}

@defgroup update Update routines
The over-the-air update rountes.
@defgroup DISPLAY_MGR Display manager
@ingroup APP_LAYER
The display manager.
@{
@}

@defgroup BUTTON_HANDLER Button handler
@ingroup APP_LAYER
The button handler.
@{
@}

@defgroup UPDATE Update routines
@ingroup APP_LAYER
The over-the-air update routines.
@{
@}

@defgroup gfx Graphics functions
The graphics functions containing all kind of widgets and the main display manager,
as well as the LED matrix controller.
@{
@}

Expand Down
2 changes: 1 addition & 1 deletion lib/StateMachine/src/StateMachine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Abstract state machine
* @author Andreas Merkle <[email protected]>
*
* @addtogroup statemachine
* @addtogroup STATE_MACHINE
*
* @{
*/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Button actions
* @author Andreas Merkle <[email protected]>
*
* @addtogroup app
* @addtogroup BUTTON_HANDLER
*
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Button handler
* @author Andreas Merkle <[email protected]>
*
* @addtogroup app
* @addtogroup BUTTON_HANDLER
*
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief One button controller
* @author Andreas Merkle <[email protected]>
*
* @addtogroup app
* @addtogroup BUTTON_HANDLER
*
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Three button controller
* @author Andreas Merkle <[email protected]>
*
* @addtogroup app
* @addtogroup BUTTON_HANDLER
*
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Two button controller
* @author Andreas Merkle <[email protected]>
*
* @addtogroup app
* @addtogroup BUTTON_HANDLER
*
* @{
*/
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Gfx/AmbientLight.h → src/DisplayMgr/AmbientLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Ambient light functions
* @author Andreas Merkle <[email protected]>
*
* @addtogroup gfx
* @addtogroup DISPLAY_MGR
*
* @{
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Brightness controller
* @author Andreas Merkle <[email protected]>
*
* @addtogroup gfx
* @addtogroup DISPLAY_MGR
*
* @{
*/
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Gfx/DisplayMgr.h → src/DisplayMgr/DisplayMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Display manager
* @author Andreas Merkle <[email protected]>
*
* @addtogroup gfx
* @addtogroup DISPLAY_MGR
*
* @{
*/
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Gfx/Slot.h → src/DisplayMgr/Slot.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Slot
* @author Andreas Merkle <[email protected]>
*
* @addtogroup gfx
* @addtogroup DISPLAY_MGR
*
* @{
*/
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Gfx/SlotList.h → src/DisplayMgr/SlotList.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Slot list
* @author Andreas Merkle <[email protected]>
*
* @addtogroup gfx
* @addtogroup DISPLAY_MGR
*
* @{
*/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/StateMachine/APState.h → src/SystemState/APState.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief System state: AP
* @author Andreas Merkle <[email protected]>
*
* @addtogroup sys_states
* @addtogroup SYS_STATES
*
* @{
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief System state: Connected
* @author Andreas Merkle <[email protected]>
*
* @addtogroup sys_states
* @addtogroup SYS_STATES
*
* @{
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief System state: Connecting
* @author Andreas Merkle <[email protected]>
*
* @addtogroup sys_states
* @addtogroup SYS_STATES
*
* @{
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief System state: Error
* @author Andreas Merkle <[email protected]>
*
* @addtogroup sys_states
* @addtogroup SYS_STATES
*
* @{
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief System state: Idle
* @author Andreas Merkle <[email protected]>
*
* @addtogroup sys_states
* @addtogroup SYS_STATES
*
* @{
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief System state: Init
* @author Andreas Merkle <[email protected]>
*
* @addtogroup sys_states
* @addtogroup SYS_STATES
*
* @{
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief System state: Restart
* @author Andreas Merkle <[email protected]>
*
* @addtogroup sys_states
* @addtogroup SYS_STATES
*
* @{
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Update/UpdateMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @brief Update manager
* @author Andreas Merkle <[email protected]>
*
* @addtogroup update
* @addtogroup UPDATE
*
* @{
*/
Expand Down

0 comments on commit de5481d

Please sign in to comment.