Before coding, let’s decide on the Software Architecture. Based on my previous decision, I’m going to have two main parts:
- Main Application
- Movement Server
- Movement Interface - to communicate between them (e.g. CAN library)
Each part will have a high-level and a low-level logic. I will use two terms, movement - for transportation in space, and motion - for any other physical activities. In total, we will have:
- Motion Controller
- Motion Driver
- Movement Controller
- Movement Driver
To break the direct dependency, Controller→Driver let’s use a Hardware Abstraction Layer Interface, so we will have a dependency on a stable interface rather than on a driver that can be changed in the future:
Controller→HAL←Driver
By doing so, we isolate the high-level logic of hardware changes.
Let's introduce two more terms:
- Software - logic, depending on a use case, a practical application.
- Firmware - logic, depending on the used hardware
The resulting architecture looks this way:
The next steps will be:
- Find/Develop appropriate interfaces
- Implement HAL mocks
- Implement the Software
- Find appropriate drivers
- Implement HAL
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.