Our firmware follows a convention that the folder path for each file should match its namespace structure. For example, the classes in Pufferfish/Driver/BreathingCircuit/Alarms.h are all in the Pufferfish::Driver::BreathingCircuit namespace. However, the files in Pufferfish/HAL predate this convention. They should all be updated to follow this convention, and class names should be updated to remove redundant words. For example, with the files related to AnalogInput:
Pufferfish/HAL/Interfaces/AnalogInput.h should declare its classes in the Pufferfish::HAL::Interfaces namespace, rather than the Pufferfish::HAL namespace
Pufferfish/HAL/Mock/MockAnalogInput.h should be renamed to Pufferfish/HAL/Mock/AnalogInput.h, and it should declare its classes in the Pufferfish::HAL::Mock namespace, rather than the Pufferfish::HAL namespace. The Pufferfish::HAL::Mock::MockAnalogInput class (which will inherit from Pufferfish::HAL::Interfaces::AnalogInput) should be renamed to Pufferfish::HAL::Mock::AnalogInput.
Pufferfish/HAL/STM32/HALAnalogInput.h should be renamed to Pufferfish/HAL/STM32/AnalogInput.h, and it should declare its classes in the Pufferfish::HAL::STM32 namespace, rather than the Pufferfish::HAL namespace. The Pufferfish::HAL::STM32::HALAnalogInput class (which will inherit from Pufferfish::HAL::Interfaces::AnalogInput) should be renamed to Pufferfish::HAL::STM32::AnalogInput.
Finally, we should delete the Pufferfish/HAL/HAL.h file, as half of it is redundant with Pufferfish/HAL/STM32/HAL.h, and the remaining includes (which are #includes of interface files) should all be specified individually in any dependent files on an as-needed basis.
@rohanpurohit Since this is purely a renaming task and it'll give exposure to all of the HAL classes, this could be a good first task for Raavi to do together with you (I'm not sure Raavi has accepted the invitation I sent her to our Github team, she needs to do it from her email before we can assign her issues; once she does, can you add her as an assignee?), as a "hello world" of making some changes, building and testing in STM32Cube IDE, and using our Github Actions infrastructure.
Our firmware follows a convention that the folder path for each file should match its namespace structure. For example, the classes in Pufferfish/Driver/BreathingCircuit/Alarms.h are all in the
Pufferfish::Driver::BreathingCircuit
namespace. However, the files in Pufferfish/HAL predate this convention. They should all be updated to follow this convention, and class names should be updated to remove redundant words. For example, with the files related to AnalogInput:Pufferfish::HAL::Interfaces
namespace, rather than thePufferfish::HAL
namespacePufferfish::HAL::Mock
namespace, rather than thePufferfish::HAL
namespace. ThePufferfish::HAL::Mock::MockAnalogInput
class (which will inherit fromPufferfish::HAL::Interfaces::AnalogInput
) should be renamed toPufferfish::HAL::Mock::AnalogInput
.Pufferfish::HAL::STM32
namespace, rather than thePufferfish::HAL
namespace. ThePufferfish::HAL::STM32::HALAnalogInput
class (which will inherit fromPufferfish::HAL::Interfaces::AnalogInput
) should be renamed toPufferfish::HAL::STM32::AnalogInput
.Finally, we should delete the
Pufferfish/HAL/HAL.h
file, as half of it is redundant withPufferfish/HAL/STM32/HAL.h
, and the remaining includes (which are#includes
of interface files) should all be specified individually in any dependent files on an as-needed basis.@rohanpurohit Since this is purely a renaming task and it'll give exposure to all of the HAL classes, this could be a good first task for Raavi to do together with you (I'm not sure Raavi has accepted the invitation I sent her to our Github team, she needs to do it from her email before we can assign her issues; once she does, can you add her as an assignee?), as a "hello world" of making some changes, building and testing in STM32Cube IDE, and using our Github Actions infrastructure.