diff --git a/FprimeZephyrReference/Components/ADCS/ADCS.cpp b/FprimeZephyrReference/Components/ADCS/ADCS.cpp deleted file mode 100644 index 8a756d83..00000000 --- a/FprimeZephyrReference/Components/ADCS/ADCS.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// ====================================================================== -// \title ADCS.cpp -// \brief cpp file for ADCS component implementation class -// ====================================================================== - -#include "FprimeZephyrReference/Components/ADCS/ADCS.hpp" - -#include - -namespace Components { - -// ---------------------------------------------------------------------- -// Component construction and destruction -// ---------------------------------------------------------------------- - -ADCS::ADCS(const char* const compName) : ADCSComponentBase(compName) {} - -ADCS::~ADCS() {} - -// ---------------------------------------------------------------------- -// Handler implementations for typed input ports -// ---------------------------------------------------------------------- - -void ADCS::run_handler(FwIndexType portNum, U32 context) { - Fw::Success condition; - - // Face light sensors - for (FwIndexType i = 0; i < this->getNum_visibleLightGet_OutputPorts(); i++) { - this->visibleLightGet_out(i, condition); - } -} - -} // namespace Components diff --git a/FprimeZephyrReference/Components/ADCS/ADCS.fpp b/FprimeZephyrReference/Components/ADCS/ADCS.fpp deleted file mode 100644 index 57f2b661..00000000 --- a/FprimeZephyrReference/Components/ADCS/ADCS.fpp +++ /dev/null @@ -1,24 +0,0 @@ -module Components { - @ Attitude Determination and Control Component for F Prime FSW framework. - passive component ADCS { - sync input port run: Svc.Sched - - @ Port for face light sensors - output port visibleLightGet: [6] Drv.lightGet - - ############################################################################### - # Standard AC Ports: Required for Channels, Events, Commands, and Parameters # - ############################################################################### - @ Port for requesting the current time - time get port timeCaller - - @ Port for emitting telemetry - telemetry port tlmOut - - @ Port for emitting events - event port logOut - - @ Port for emitting text events - text event port logTextOut - } -} diff --git a/FprimeZephyrReference/Components/ADCS/ADCS.hpp b/FprimeZephyrReference/Components/ADCS/ADCS.hpp deleted file mode 100644 index 077815fb..00000000 --- a/FprimeZephyrReference/Components/ADCS/ADCS.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// ====================================================================== -// \title ADCS.hpp -// \brief hpp file for ADCS component implementation class -// ====================================================================== - -#ifndef Components_ADCS_HPP -#define Components_ADCS_HPP - -#include "FprimeZephyrReference/Components/ADCS/ADCSComponentAc.hpp" - -namespace Components { - -class ADCS final : public ADCSComponentBase { - public: - // ---------------------------------------------------------------------- - // Component construction and destruction - // ---------------------------------------------------------------------- - - //! Construct ADCS object - ADCS(const char* const compName //!< The component name - ); - - //! Destroy ADCS object - ~ADCS(); - - private: - // ---------------------------------------------------------------------- - // Handler implementations for typed input ports - // ---------------------------------------------------------------------- - - //! Handler implementation for run - //! - //! Scheduled port for periodic temperature reading - void run_handler(FwIndexType portNum, //!< The port number - U32 context //!< The call order - ) override; -}; - -} // namespace Components - -#endif diff --git a/FprimeZephyrReference/Components/ADCS/CMakeLists.txt b/FprimeZephyrReference/Components/ADCS/CMakeLists.txt deleted file mode 100644 index fe80bbbf..00000000 --- a/FprimeZephyrReference/Components/ADCS/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -#### -# F Prime CMakeLists.txt: -# -# SOURCES: list of source files (to be compiled) -# AUTOCODER_INPUTS: list of files to be passed to the autocoders -# DEPENDS: list of libraries that this module depends on -# -# More information in the F´ CMake API documentation: -# https://fprime.jpl.nasa.gov/latest/docs/reference/api/cmake/API/ -# -#### - -register_fprime_library( - AUTOCODER_INPUTS - "${CMAKE_CURRENT_LIST_DIR}/ADCS.fpp" - SOURCES - "${CMAKE_CURRENT_LIST_DIR}/ADCS.cpp" -) diff --git a/FprimeZephyrReference/Components/CMakeLists.txt b/FprimeZephyrReference/Components/CMakeLists.txt index 307b05de..b899a717 100644 --- a/FprimeZephyrReference/Components/CMakeLists.txt +++ b/FprimeZephyrReference/Components/CMakeLists.txt @@ -1,6 +1,5 @@ # Include project-wide components here -add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ADCS/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/AntennaDeployer/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/BootloaderTrigger/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Burnwire/") @@ -8,7 +7,6 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ComDelay/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Drv/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FatalHandler") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FsSpace/") -add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GenericDeviceMonitor/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ImuManager/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LoadSwitch/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ModeManager/") @@ -16,5 +14,4 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/NullPrmDb/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PowerMonitor/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ResetManager/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/StartupManager/") -add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ThermalManager/") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Watchdog") diff --git a/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.cpp b/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.cpp index 1875cc3b..4d9cd6ab 100644 --- a/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.cpp +++ b/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.cpp @@ -23,8 +23,15 @@ Tmp112Manager ::~Tmp112Manager() {} // Helper methods // ---------------------------------------------------------------------- -void Tmp112Manager::configure(const struct device* dev) { +void Tmp112Manager::configure(const struct device* tca, + const struct device* mux, + const struct device* dev, + bool loadSwitchCheck) { + this->m_tca = tca; + this->m_mux = mux; this->m_dev = dev; + // TODO(nateinaction): Abstract load switch check, perhaps wrap this component and only use when needed? + this->m_load_switch_check = loadSwitchCheck; } // ---------------------------------------------------------------------- @@ -74,7 +81,7 @@ F64 Tmp112Manager ::temperatureGet_handler(FwIndexType portNum, Fw::Success& con F64 temp = sensor_value_to_double(&val); condition = Fw::Success::SUCCESS; - this->tlmWrite_Temperature(temp); + // this->tlmWrite_Temperature(temp); return temp; } @@ -105,13 +112,13 @@ Fw::Success Tmp112Manager ::initializeDevice() { return Fw::Success::SUCCESS; } - if (this->tcaHealthGet_out(0) != Fw::Health::HEALTHY) { + if (!device_is_ready(this->m_tca)) { this->log_WARNING_HI_TcaUnhealthy(); return Fw::Success::FAILURE; } this->log_WARNING_HI_TcaUnhealthy_ThrottleClear(); - if (this->muxHealthGet_out(0) != Fw::Health::HEALTHY) { + if (!device_is_ready(this->m_mux)) { this->log_WARNING_HI_MuxUnhealthy(); return Fw::Success::FAILURE; } @@ -151,7 +158,8 @@ Fw::Success Tmp112Manager ::deinitializeDevice() { } bool Tmp112Manager ::loadSwitchReady() { - return this->m_load_switch_state == Fw::On::ON && this->getTime() >= this->m_load_switch_on_timeout; + return (this->m_load_switch_state == Fw::On::ON && this->getTime() >= this->m_load_switch_on_timeout) || + !this->m_load_switch_check; } } // namespace Drv diff --git a/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.fpp b/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.fpp index 5eed08dc..6b752f0f 100644 --- a/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.fpp +++ b/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.fpp @@ -12,17 +12,13 @@ module Drv { @ Port to initialize and deinitialize the TMP112 device on load switch state change sync input port loadSwitchStateChanged: Components.loadSwitchStateChanged - @ Output port to check device TCA health - output port tcaHealthGet: Components.HealthGet - - @ Output port to check device MUX health - output port muxHealthGet: Components.HealthGet - - # Telemetry channels - - @ Telemetry channel for temperature in degrees Celsius - telemetry Temperature: F64 + # Commands + # @ Command to get the temperature from the TMP112 device + # sync command GET_TEMPERATURE( + # $port: FwIndexType @< Temperature Sensor to read + # ) + # Events @ Event for reporting TMP112 not ready error event DeviceNotReady() severity warning high format "TMP112 device not ready" throttle 5 @@ -50,20 +46,29 @@ module Drv { @ Event for reporting TMP112 sensor channel get failure event SensorChannelGetFailed(ret: I32) severity warning high format "TMP112 sensor channel get failed with return code: {}" throttle 5 + @ Event to report TMP112 temperature readout + event TemperatureReadout($port: FwIndexType, tempC: F64) severity activity high format "TMP112 {} Temperature Readout: {} °C" + ############################################################################### # Standard AC Ports: Required for Channels, Events, Commands, and Parameters # ############################################################################### @ Port for requesting the current time time get port timeCaller + @ Port for sending command registrations + command reg port cmdRegOut + + @ Port for receiving commands + command recv port cmdIn + + @ Port for sending command responses + command resp port cmdResponseOut + @ Port for sending textual representation of events text event port logTextOut @ Port for sending events to downlink event port logOut - @ Port for sending telemetry channels to downlink - telemetry port tlmOut - } } diff --git a/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.hpp b/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.hpp index 2414ae1b..cc45fc16 100644 --- a/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.hpp +++ b/FprimeZephyrReference/Components/Drv/Tmp112Manager/TMP112Manager.hpp @@ -31,7 +31,7 @@ class Tmp112Manager final : public Tmp112ManagerComponentBase { // ---------------------------------------------------------------------- //! Configure the TMP112 device - void configure(const struct device* dev); + void configure(const struct device* tca, const struct device* mux, const struct device* dev, bool loadSwitchCheck); private: // ---------------------------------------------------------------------- @@ -75,11 +75,11 @@ class Tmp112Manager final : public Tmp112ManagerComponentBase { //! Zephyr device stores the initialized TMP112 sensor const struct device* m_dev; - //! TCA health state - Fw::Health m_tca_state = Fw::Health::FAILED; + //! Zephyr device for the TCA + const struct device* m_tca; - //! MUX health state - Fw::Health m_mux_state = Fw::Health::FAILED; + //! Zephyr device for the mux + const struct device* m_mux; //! Load switch state Fw::On m_load_switch_state = Fw::On::OFF; @@ -87,6 +87,10 @@ class Tmp112Manager final : public Tmp112ManagerComponentBase { //! Load switch on timeout //! Time when we can consider the load switch to be fully on (giving time for power to normalize) Fw::Time m_load_switch_on_timeout; + + //! Load switch check + //! Available to disable if the component is not powered by a load switch + bool m_load_switch_check = true; }; } // namespace Drv diff --git a/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.cpp b/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.cpp index 1e520f7c..d36e5dde 100644 --- a/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.cpp +++ b/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.cpp @@ -24,7 +24,9 @@ Veml6031Manager ::~Veml6031Manager() {} // Public helper methods // ---------------------------------------------------------------------- -void Veml6031Manager ::configure(const struct device* dev) { +void Veml6031Manager ::configure(const struct device* tca, const struct device* mux, const struct device* dev) { + this->m_tca = tca; + this->m_mux = mux; this->m_dev = dev; } @@ -53,7 +55,7 @@ F32 Veml6031Manager ::ambientLightGet_handler(FwIndexType portNum, Fw::Success& F32 lux = sensor_value_to_double(&val); - this->tlmWrite_VisibleLight(lux); + // this->tlmWrite_VisibleLight(lux); condition = Fw::Success::SUCCESS; return lux; @@ -80,7 +82,7 @@ F32 Veml6031Manager ::infraRedLightGet_handler(FwIndexType portNum, Fw::Success& F32 lux = sensor_value_to_double(&val); - this->tlmWrite_InfraRedLight(lux); + // this->tlmWrite_InfraRedLight(lux); condition = Fw::Success::SUCCESS; return lux; @@ -124,7 +126,7 @@ F32 Veml6031Manager ::visibleLightGet_handler(FwIndexType portNum, Fw::Success& F32 lux = sensor_value_to_double(&val); - this->tlmWrite_VisibleLight(lux); + // this->tlmWrite_VisibleLight(lux); condition = Fw::Success::SUCCESS; return lux; @@ -160,13 +162,13 @@ Fw::Success Veml6031Manager ::initializeDevice() { return Fw::Success::SUCCESS; } - if (this->tcaHealthGet_out(0) != Fw::Health::HEALTHY) { + if (!device_is_ready(this->m_tca)) { this->log_WARNING_HI_TcaUnhealthy(); return Fw::Success::FAILURE; } this->log_WARNING_HI_TcaUnhealthy_ThrottleClear(); - if (this->muxHealthGet_out(0) != Fw::Health::HEALTHY) { + if (!device_is_ready(this->m_mux)) { this->log_WARNING_HI_MuxUnhealthy(); return Fw::Success::FAILURE; } diff --git a/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.fpp b/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.fpp index 38e5ef9f..fc7f9fc8 100644 --- a/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.fpp +++ b/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.fpp @@ -53,16 +53,6 @@ module Drv { @ Parameter for setting the Ambient Light Sensor (ALS) persistence protect number setting (PERS). param ALS_PERSISTENCE_PROTECT_NUMBER: ALS_PERS default ALS_PERS.VEML60XX_PERS_1 - #### Telemetry #### - @ Telemetry for the illuminance in the visible spectrum, in lux - telemetry VisibleLight: F32 - - @ Telemetry for the illuminance in the infra-red spectrum, in lux - telemetry InfraRedLight: F32 - - @ Telemetry for the ambient illuminance in visible spectrum, in lux - telemetry AmbientLight: F32 - #### Ports #### @ Port to read the illuminance in visible spectrum, in lux @@ -80,15 +70,6 @@ module Drv { @ Port to initialize and deinitialize the VEML6031 device on load switch state change sync input port loadSwitchStateChanged: Components.loadSwitchStateChanged - @ Output port to check device TCA health - output port tcaHealthGet: Components.HealthGet - - @ Output port to check device MUX health - output port muxHealthGet: Components.HealthGet - - @ Port for reading gpio status - output port gpioRead: Drv.GpioRead - #### Events #### @ Event for reporting VEML6031 not ready error diff --git a/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.hpp b/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.hpp index a5455292..f2552ede 100644 --- a/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.hpp +++ b/FprimeZephyrReference/Components/Drv/Veml6031Manager/Veml6031Manager.hpp @@ -38,7 +38,7 @@ class Veml6031Manager final : public Veml6031ManagerComponentBase { // ---------------------------------------------------------------------- //! Configure the TMP112 device - void configure(const struct device* dev); + void configure(const struct device* tca, const struct device* mux, const struct device* dev); private: // ---------------------------------------------------------------------- @@ -109,11 +109,11 @@ class Veml6031Manager final : public Veml6031ManagerComponentBase { //! Zephyr device stores the initialized TMP112 sensor const struct device* m_dev; - //! TCA health state - Fw::Health m_tca_state = Fw::Health::FAILED; + //! Zephyr device for the TCA + const struct device* m_tca; - //! MUX health state - Fw::Health m_mux_state = Fw::Health::FAILED; + //! Zephyr device for the mux + const struct device* m_mux; //! Load switch state Fw::On m_load_switch_state = Fw::On::OFF; diff --git a/FprimeZephyrReference/Components/GenericDeviceMonitor/CMakeLists.txt b/FprimeZephyrReference/Components/GenericDeviceMonitor/CMakeLists.txt deleted file mode 100644 index 731a72e3..00000000 --- a/FprimeZephyrReference/Components/GenericDeviceMonitor/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -#### -# F Prime CMakeLists.txt: -# -# SOURCES: list of source files (to be compiled) -# AUTOCODER_INPUTS: list of files to be passed to the autocoders -# DEPENDS: list of libraries that this module depends on -# -# More information in the F´ CMake API documentation: -# https://fprime.jpl.nasa.gov/latest/docs/reference/api/cmake/API/ -# -#### - -# Module names are derived from the path from the nearest project/library/framework -# root when not specifically overridden by the developer. i.e. The module defined by -# `Ref/SignalGen/CMakeLists.txt` will be named `Ref_SignalGen`. - -register_fprime_library( - AUTOCODER_INPUTS - "${CMAKE_CURRENT_LIST_DIR}/GenericDeviceMonitor.fpp" - SOURCES - "${CMAKE_CURRENT_LIST_DIR}/GenericDeviceMonitor.cpp" -# DEPENDS -# MyPackage_MyOtherModule -) - -### Unit Tests ### -# register_fprime_ut( -# AUTOCODER_INPUTS -# "${CMAKE_CURRENT_LIST_DIR}/GenericDeviceMonitor.fpp" -# SOURCES -# "${CMAKE_CURRENT_LIST_DIR}/test/ut/GenericDeviceMonitorTestMain.cpp" -# "${CMAKE_CURRENT_LIST_DIR}/test/ut/GenericDeviceMonitorTester.cpp" -# DEPENDS -# STest # For rules-based testing -# UT_AUTO_HELPERS -# ) diff --git a/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.cpp b/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.cpp deleted file mode 100644 index 17bca66e..00000000 --- a/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// ====================================================================== -// \title GenericDeviceMonitor.cpp -// \author nate -// \brief cpp file for GenericDeviceMonitor component implementation class -// ====================================================================== - -#include "FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.hpp" - -namespace Components { - -// ---------------------------------------------------------------------- -// Component construction and destruction -// ---------------------------------------------------------------------- - -GenericDeviceMonitor ::GenericDeviceMonitor(const char* const compName) : GenericDeviceMonitorComponentBase(compName) {} - -GenericDeviceMonitor ::~GenericDeviceMonitor() {} - -// ---------------------------------------------------------------------- -// Helper methods -// ---------------------------------------------------------------------- - -void GenericDeviceMonitor::configure(const struct device* dev) { - this->m_dev = dev; -} - -// ---------------------------------------------------------------------- -// Handler implementations for typed input ports -// ---------------------------------------------------------------------- - -Fw::Health GenericDeviceMonitor ::healthGet_handler(FwIndexType portNum) { - return device_is_ready(this->m_dev) ? Fw::Health::HEALTHY : Fw::Health::FAILED; -} - -void GenericDeviceMonitor ::run_handler(FwIndexType portNum, U32 context) { - if (!device_is_ready(this->m_dev)) { - this->tlmWrite_Healthy(Fw::Health::FAILED); - this->log_WARNING_LO_DeviceNotReady(); - return; - } - - this->tlmWrite_Healthy(Fw::Health::HEALTHY); -} - -} // namespace Components diff --git a/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.fpp b/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.fpp deleted file mode 100644 index e5da4abc..00000000 --- a/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.fpp +++ /dev/null @@ -1,38 +0,0 @@ -module Components { - port HealthGet -> Fw.Health -} - -module Components { - @ Generic Device Health Reporter - @ Use for devices which only need to report simple health status and have no interactivity - passive component GenericDeviceMonitor { - - @ Port receiving calls from the rate group - sync input port run: Svc.Sched - - @ Port receiving calls to request device health - sync input port healthGet: HealthGet - - @ Telemetry showing device health - telemetry Healthy: Fw.Health - - @ Event indicating device not ready - event DeviceNotReady() severity warning low id 0 format "Device not ready" throttle 5 - - ############################################################################### - # Standard AC Ports: Required for Channels, Events, Commands, and Parameters # - ############################################################################### - @ Port for requesting the current time - time get port timeCaller - - @ Port for sending textual representation of events - text event port logTextOut - - @ Port for sending events to downlink - event port logOut - - @ Port for sending telemetry channels to downlink - telemetry port tlmOut - - } -} diff --git a/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.hpp b/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.hpp deleted file mode 100644 index ea0d741f..00000000 --- a/FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitor.hpp +++ /dev/null @@ -1,65 +0,0 @@ -// ====================================================================== -// \title GenericDeviceMonitor.hpp -// \author nate -// \brief hpp file for GenericDeviceMonitor component implementation class -// ====================================================================== - -#ifndef Components_GenericDeviceMonitor_HPP -#define Components_GenericDeviceMonitor_HPP - -#include "FprimeZephyrReference/Components/GenericDeviceMonitor/GenericDeviceMonitorComponentAc.hpp" -#include - -namespace Components { - -class GenericDeviceMonitor final : public GenericDeviceMonitorComponentBase { - public: - // ---------------------------------------------------------------------- - // Component construction and destruction - // ---------------------------------------------------------------------- - - //! Construct GenericDeviceMonitor object - GenericDeviceMonitor(const char* const compName //!< The component name - ); - - //! Destroy GenericDeviceMonitor object - ~GenericDeviceMonitor(); - - public: - // ---------------------------------------------------------------------- - // Public helper methods - // ---------------------------------------------------------------------- - - //! Configure the zephyr mux channel device - void configure(const struct device* dev); - - private: - // ---------------------------------------------------------------------- - // Handler implementations for typed input ports - // ---------------------------------------------------------------------- - - //! Handler implementation for healthGet - //! - //! Port receiving calls to request device health - Fw::Health healthGet_handler(FwIndexType portNum //!< The port number - ) override; - - //! Handler implementation for run - //! - //! Port receiving calls from the rate group - void run_handler(FwIndexType portNum, //!< The port number - U32 context //!< The call order - ) override; - - private: - // ---------------------------------------------------------------------- - // Private member variables - // ---------------------------------------------------------------------- - - //! Zephyr device stores the initialized mux channel - const struct device* m_dev; -}; - -} // namespace Components - -#endif diff --git a/FprimeZephyrReference/Components/GenericDeviceMonitor/docs/sdd.md b/FprimeZephyrReference/Components/GenericDeviceMonitor/docs/sdd.md deleted file mode 100644 index fb0ea3d4..00000000 --- a/FprimeZephyrReference/Components/GenericDeviceMonitor/docs/sdd.md +++ /dev/null @@ -1,66 +0,0 @@ -# Components::GenericDeviceMonitor - -Mux Channel Health Reporter - -## Usage Examples -Add usage examples here - -### Diagrams -Add diagrams here - -### Typical Usage -And the typical usage of the component here - -## Class Diagram -Add a class diagram here - -## Port Descriptions -| Name | Description | -|---|---| -|---|---| - -## Component States -Add component states in the chart below -| Name | Description | -|---|---| -|---|---| - -## Sequence Diagrams -Add sequence diagrams here - -## Parameters -| Name | Description | -|---|---| -|---|---| - -## Commands -| Name | Description | -|---|---| -|---|---| - -## Events -| Name | Description | -|---|---| -|---|---| - -## Telemetry -| Name | Description | -|---|---| -|---|---| - -## Unit Tests -Add unit test descriptions in the chart below -| Name | Description | Output | Coverage | -|---|---|---|---| -|---|---|---|---| - -## Requirements -Add requirements in the chart below -| Name | Description | Validation | -|---|---|---| -|---|---|---| - -## Change Log -| Date | Description | -|---|---| -|---| Initial Draft | diff --git a/FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.cpp b/FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.cpp index 094cd976..b5e1028a 100644 --- a/FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.cpp +++ b/FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.cpp @@ -63,7 +63,7 @@ void LoadSwitch ::setLoadSwitchState(Fw::On state) { this->loadSwitchStateChanged_out(i, state); } this->log_ACTIVITY_HI_StatusChanged(state); - this->tlmWrite_IsOn(state); + // this->tlmWrite_IsOn(state); } Fw::On LoadSwitch ::getLoadSwitchState() { diff --git a/FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.fpp b/FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.fpp index c2f7339d..5d2dc575 100644 --- a/FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.fpp +++ b/FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.fpp @@ -13,8 +13,8 @@ module Components { @ Command to turn the load switch off sync command TURN_OFF() - @ Telemetry channel for load switch state - telemetry IsOn: Fw.On + # @ Telemetry channel for load switch state + # telemetry IsOn: Fw.On @ Event for reporting load switch state change event StatusChanged($state: Fw.On) severity activity high id 1 format "Load switch state changed to {}" diff --git a/FprimeZephyrReference/Components/ThermalManager/CMakeLists.txt b/FprimeZephyrReference/Components/ThermalManager/CMakeLists.txt deleted file mode 100644 index 16905ca2..00000000 --- a/FprimeZephyrReference/Components/ThermalManager/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -#### -# F Prime CMakeLists.txt: -# -# SOURCES: list of source files (to be compiled) -# AUTOCODER_INPUTS: list of files to be passed to the autocoders -# DEPENDS: list of libraries that this module depends on -# -# More information in the F´ CMake API documentation: -# https://fprime.jpl.nasa.gov/latest/docs/reference/api/cmake/API/ -# -#### - -register_fprime_library( - AUTOCODER_INPUTS - "${CMAKE_CURRENT_LIST_DIR}/ThermalManager.fpp" - SOURCES - "${CMAKE_CURRENT_LIST_DIR}/ThermalManager.cpp" -) diff --git a/FprimeZephyrReference/Components/ThermalManager/ThermalManager.cpp b/FprimeZephyrReference/Components/ThermalManager/ThermalManager.cpp deleted file mode 100644 index 17102ee2..00000000 --- a/FprimeZephyrReference/Components/ThermalManager/ThermalManager.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// ====================================================================== -// \title ThermalManager.cpp -// \brief cpp file for ThermalManager component implementation class -// ====================================================================== - -#include "FprimeZephyrReference/Components/ThermalManager/ThermalManager.hpp" - -#include - -namespace Components { - -// ---------------------------------------------------------------------- -// Component construction and destruction -// ---------------------------------------------------------------------- - -ThermalManager::ThermalManager(const char* const compName) : ThermalManagerComponentBase(compName) {} - -ThermalManager::~ThermalManager() {} - -// ---------------------------------------------------------------------- -// Handler implementations for typed input ports -// ---------------------------------------------------------------------- - -void ThermalManager::run_handler(FwIndexType portNum, U32 context) { - Fw::Success condition; - - // Face temp sensors - for (FwIndexType i = 0; i < this->getNum_faceTempGet_OutputPorts(); i++) { - this->faceTempGet_out(i, condition); - } - - // Battery cell temp sensors - for (FwIndexType i = 0; i < this->getNum_battCellTempGet_OutputPorts(); i++) { - this->battCellTempGet_out(i, condition); - } -} - -} // namespace Components diff --git a/FprimeZephyrReference/Components/ThermalManager/ThermalManager.fpp b/FprimeZephyrReference/Components/ThermalManager/ThermalManager.fpp deleted file mode 100644 index f3c73ab7..00000000 --- a/FprimeZephyrReference/Components/ThermalManager/ThermalManager.fpp +++ /dev/null @@ -1,32 +0,0 @@ -module Components { - @ Thermal Manager Component for F Prime FSW framework. - @ Orchestrates temperature sensor readings from 11 TMP112 sensors - passive component ThermalManager { - sync input port run: Svc.Sched - - # Output ports to instances - - @ Port for face temperature sensors - output port faceTempGet: [5] Drv.temperatureGet - - # Battery Cell - - @ Port for battery cell temperature sensors - output port battCellTempGet: [4] Drv.temperatureGet - - ############################################################################### - # Standard AC Ports: Required for Channels, Events, Commands, and Parameters # - ############################################################################### - @ Port for requesting the current time - time get port timeCaller - - @ Port for emitting telemetry - telemetry port tlmOut - - @ Port for emitting events - event port logOut - - @ Port for emitting text events - text event port logTextOut - } -} diff --git a/FprimeZephyrReference/Components/ThermalManager/ThermalManager.hpp b/FprimeZephyrReference/Components/ThermalManager/ThermalManager.hpp deleted file mode 100644 index 3bdf8989..00000000 --- a/FprimeZephyrReference/Components/ThermalManager/ThermalManager.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// ====================================================================== -// \title ThermalManager.hpp -// \brief hpp file for ThermalManager component implementation class -// ====================================================================== - -#ifndef Components_ThermalManager_HPP -#define Components_ThermalManager_HPP - -#include "FprimeZephyrReference/Components/ThermalManager/ThermalManagerComponentAc.hpp" - -namespace Components { - -class ThermalManager final : public ThermalManagerComponentBase { - public: - // ---------------------------------------------------------------------- - // Component construction and destruction - // ---------------------------------------------------------------------- - - //! Construct ThermalManager object - ThermalManager(const char* const compName //!< The component name - ); - - //! Destroy ThermalManager object - ~ThermalManager(); - - private: - // ---------------------------------------------------------------------- - // Handler implementations for typed input ports - // ---------------------------------------------------------------------- - - //! Handler implementation for run - //! - //! Scheduled port for periodic temperature reading - void run_handler(FwIndexType portNum, //!< The port number - U32 context //!< The call order - ) override; -}; - -} // namespace Components - -#endif diff --git a/FprimeZephyrReference/ReferenceDeployment/Main.cpp b/FprimeZephyrReference/ReferenceDeployment/Main.cpp index e3642197..16b871ce 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Main.cpp +++ b/FprimeZephyrReference/ReferenceDeployment/Main.cpp @@ -86,12 +86,12 @@ int main(int argc, char* argv[]) { inputs.battCell4TempDevice = batt_cell4_temp_sens; // Light sensor devices inputs.face0LightDevice = face0_light_sens; - // inputs.face1LightDevice = face1_light_sens; - // inputs.face2LightDevice = face2_light_sens; - // inputs.face3LightDevice = face3_light_sens; - // inputs.face5LightDevice = face5_light_sens; - // inputs.face6LightDevice = face6_light_sens; - // inputs.face7LightDevice = face7_light_sens; + inputs.face1LightDevice = face1_light_sens; + inputs.face2LightDevice = face2_light_sens; + inputs.face3LightDevice = face3_light_sens; + inputs.face5LightDevice = face5_light_sens; + inputs.face6LightDevice = face6_light_sens; + inputs.face7LightDevice = face7_light_sens; inputs.baudRate = 115200; diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi b/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi index 1771e858..5b683ab2 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi +++ b/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi @@ -9,7 +9,6 @@ telemetry packets ReferenceDeploymentPackets { ComCcsdsUart.commsBufferManager.HiBuffs ReferenceDeployment.rateGroup10Hz.RgMaxTime ReferenceDeployment.rateGroup1Hz.RgMaxTime - ReferenceDeployment.rateGroup1_6Hz.RgMaxTime ReferenceDeployment.startupManager.BootCount ReferenceDeployment.startupManager.QuiescenceEndTime ReferenceDeployment.modeManager.CurrentMode @@ -24,10 +23,8 @@ telemetry packets ReferenceDeploymentPackets { ComCcsdsUart.commsBufferManager.EmptyBuffs ReferenceDeployment.rateGroup10Hz.RgCycleSlips ReferenceDeployment.rateGroup1Hz.RgCycleSlips - ReferenceDeployment.rateGroup1_6Hz.RgCycleSlips } - packet HealthAuxillary id 3 group 2 { ComCcsds.commsBufferManager.TotalBuffs ComCcsds.commsBufferManager.CurrBuffs @@ -46,97 +43,6 @@ telemetry packets ReferenceDeploymentPackets { fsSpace.TotalSpace } - packet Led id 5 group 4 { - ReferenceDeployment.watchdog.WatchdogTransitions - } - - packet Imu id 6 group 4 { - ReferenceDeployment.lsm6dsoManager.Acceleration - ReferenceDeployment.lsm6dsoManager.AngularVelocity - ReferenceDeployment.lsm6dsoManager.Temperature - ReferenceDeployment.lis2mdlManager.MagneticField - } - - packet LoRa id 7 group 4 { - lora.LastRssi - lora.LastSnr - } - - packet Antenna id 8 group 4 { - ReferenceDeployment.antennaDeployer.DeployAttemptCount - ReferenceDeployment.antennaDeployer.LastDistance - } - - packet LoadSwitches id 9 group 4 { - ReferenceDeployment.face4LoadSwitch.IsOn - ReferenceDeployment.face0LoadSwitch.IsOn - ReferenceDeployment.face1LoadSwitch.IsOn - ReferenceDeployment.face2LoadSwitch.IsOn - ReferenceDeployment.face3LoadSwitch.IsOn - ReferenceDeployment.face5LoadSwitch.IsOn - ReferenceDeployment.payloadPowerLoadSwitch.IsOn - ReferenceDeployment.payloadBatteryLoadSwitch.IsOn - } - - packet PowerMonitor id 10 group 4 { - ReferenceDeployment.ina219SysManager.Voltage - ReferenceDeployment.ina219SysManager.Current - ReferenceDeployment.ina219SysManager.Power - ReferenceDeployment.ina219SolManager.Voltage - ReferenceDeployment.ina219SolManager.Current - ReferenceDeployment.ina219SolManager.Power - ReferenceDeployment.powerMonitor.TotalPowerConsumption - ReferenceDeployment.powerMonitor.TotalPowerGenerated - } - - packet TcaMonitor id 12 group 4 { - ReferenceDeployment.tcaMonitor.Healthy - ReferenceDeployment.muxChannel0Monitor.Healthy - ReferenceDeployment.muxChannel1Monitor.Healthy - ReferenceDeployment.muxChannel2Monitor.Healthy - ReferenceDeployment.muxChannel3Monitor.Healthy - ReferenceDeployment.muxChannel4Monitor.Healthy - ReferenceDeployment.muxChannel5Monitor.Healthy - ReferenceDeployment.muxChannel6Monitor.Healthy - ReferenceDeployment.muxChannel7Monitor.Healthy - } - - packet Thermal id 13 group 4 { - ReferenceDeployment.tmp112Face0Manager.Temperature - ReferenceDeployment.tmp112Face1Manager.Temperature - ReferenceDeployment.tmp112Face2Manager.Temperature - ReferenceDeployment.tmp112Face3Manager.Temperature - ReferenceDeployment.tmp112Face5Manager.Temperature - ReferenceDeployment.tmp112BattCell1Manager.Temperature - ReferenceDeployment.tmp112BattCell2Manager.Temperature - ReferenceDeployment.tmp112BattCell3Manager.Temperature - ReferenceDeployment.tmp112BattCell4Manager.Temperature - } - - packet LightSensor id 14 group 4 { - ReferenceDeployment.veml6031Face0Manager.VisibleLight - # ReferenceDeployment.veml6031Face1Manager.RawLightData - # ReferenceDeployment.veml6031Face2Manager.RawLightData - # ReferenceDeployment.veml6031Face3Manager.RawLightData - # ReferenceDeployment.veml6031Face5Manager.RawLightData - # ReferenceDeployment.veml6031Face6Manager.RawLightData - # ReferenceDeployment.veml6031Face7Manager.RawLightData - ReferenceDeployment.veml6031Face0Manager.InfraRedLight - # ReferenceDeployment.veml6031Face1Manager.IRLightData - # ReferenceDeployment.veml6031Face2Manager.IRLightData - # ReferenceDeployment.veml6031Face3Manager.IRLightData - # ReferenceDeployment.veml6031Face5Manager.IRLightData - # ReferenceDeployment.veml6031Face6Manager.IRLightData - # ReferenceDeployment.veml6031Face7Manager.IRLightData - ReferenceDeployment.veml6031Face0Manager.AmbientLight - # ReferenceDeployment.veml6031Face1Manager.ALSLightData - # ReferenceDeployment.veml6031Face2Manager.ALSLightData - # ReferenceDeployment.veml6031Face3Manager.ALSLightData - # ReferenceDeployment.veml6031Face5Manager.ALSLightData - # ReferenceDeployment.veml6031Face6Manager.ALSLightData - # ReferenceDeployment.veml6031Face7Manager.ALSLightData - } - } omit { CdhCore.cmdDisp.CommandErrors # Only has one library, no custom versions @@ -172,4 +78,77 @@ telemetry packets ReferenceDeploymentPackets { FileHandling.fileManager.Errors FileHandling.fileUplink.Warnings FileHandling.fileDownlink.Warnings + # Light sensor + # ReferenceDeployment.veml6031Face0Manager.VisibleLight + # ReferenceDeployment.veml6031Face1Manager.VisibleLight + # ReferenceDeployment.veml6031Face2Manager.VisibleLight + # ReferenceDeployment.veml6031Face3Manager.VisibleLight + # ReferenceDeployment.veml6031Face5Manager.VisibleLight + # ReferenceDeployment.veml6031Face6Manager.VisibleLight + # ReferenceDeployment.veml6031Face7Manager.VisibleLight + # ReferenceDeployment.veml6031Face0Manager.InfraRedLight + # ReferenceDeployment.veml6031Face1Manager.InfraRedLight + # ReferenceDeployment.veml6031Face2Manager.InfraRedLight + # ReferenceDeployment.veml6031Face3Manager.InfraRedLight + # ReferenceDeployment.veml6031Face5Manager.InfraRedLight + # ReferenceDeployment.veml6031Face6Manager.InfraRedLight + # ReferenceDeployment.veml6031Face7Manager.InfraRedLight + # ReferenceDeployment.veml6031Face0Manager.AmbientLight + # ReferenceDeployment.veml6031Face1Manager.AmbientLight + # ReferenceDeployment.veml6031Face2Manager.AmbientLight + # ReferenceDeployment.veml6031Face3Manager.AmbientLight + # ReferenceDeployment.veml6031Face5Manager.AmbientLight + # ReferenceDeployment.veml6031Face6Manager.AmbientLight + # ReferenceDeployment.veml6031Face7Manager.AmbientLight + # Temp Sensors + # ReferenceDeployment.tmp112Face0Manager.Temperature + # ReferenceDeployment.tmp112Face1Manager.Temperature + # ReferenceDeployment.tmp112Face2Manager.Temperature + # ReferenceDeployment.tmp112Face3Manager.Temperature + # ReferenceDeployment.tmp112Face5Manager.Temperature + # ReferenceDeployment.tmp112BattCell1Manager.Temperature + # ReferenceDeployment.tmp112BattCell2Manager.Temperature + # ReferenceDeployment.tmp112BattCell3Manager.Temperature + # ReferenceDeployment.tmp112BattCell4Manager.Temperature + # TCA/Mux + # ReferenceDeployment.tcaMonitor.Healthy + # ReferenceDeployment.muxChannel0Monitor.Healthy + # ReferenceDeployment.muxChannel1Monitor.Healthy + # ReferenceDeployment.muxChannel2Monitor.Healthy + # ReferenceDeployment.muxChannel3Monitor.Healthy + # ReferenceDeployment.muxChannel4Monitor.Healthy + # ReferenceDeployment.muxChannel5Monitor.Healthy + # ReferenceDeployment.muxChannel6Monitor.Healthy + # ReferenceDeployment.muxChannel7Monitor.Healthy + # Power Monitor + ReferenceDeployment.ina219SysManager.Voltage + ReferenceDeployment.ina219SysManager.Current + ReferenceDeployment.ina219SysManager.Power + ReferenceDeployment.ina219SolManager.Voltage + ReferenceDeployment.ina219SolManager.Current + ReferenceDeployment.ina219SolManager.Power + ReferenceDeployment.powerMonitor.TotalPowerConsumption + ReferenceDeployment.powerMonitor.TotalPowerGenerated + # Load Switches + # ReferenceDeployment.face4LoadSwitch.IsOn + # ReferenceDeployment.face0LoadSwitch.IsOn + # ReferenceDeployment.face1LoadSwitch.IsOn + # ReferenceDeployment.face2LoadSwitch.IsOn + # ReferenceDeployment.face3LoadSwitch.IsOn + # ReferenceDeployment.face5LoadSwitch.IsOn + # ReferenceDeployment.payloadPowerLoadSwitch.IsOn + # ReferenceDeployment.payloadBatteryLoadSwitch.IsOn + # Antenna + ReferenceDeployment.antennaDeployer.DeployAttemptCount + ReferenceDeployment.antennaDeployer.LastDistance + # Watchdog + ReferenceDeployment.watchdog.WatchdogTransitions + # IMU + ReferenceDeployment.lsm6dsoManager.Acceleration + ReferenceDeployment.lsm6dsoManager.AngularVelocity + ReferenceDeployment.lsm6dsoManager.Temperature + ReferenceDeployment.lis2mdlManager.MagneticField + # LORA + lora.LastRssi + lora.LastSnr } diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp b/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp index d6406ec3..6326cdf2 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp @@ -67,7 +67,7 @@ void configureTopology() { // Rate groups require context arrays. rateGroup10Hz.configure(rateGroup10HzContext, FW_NUM_ARRAY_ELEMENTS(rateGroup10HzContext)); rateGroup1Hz.configure(rateGroup1HzContext, FW_NUM_ARRAY_ELEMENTS(rateGroup1HzContext)); - rateGroup1_6Hz.configure(rateGroup1_6HzContext, FW_NUM_ARRAY_ELEMENTS(rateGroup1_6HzContext)); + // rateGroup1_6Hz.configure(rateGroup1_6HzContext, FW_NUM_ARRAY_ELEMENTS(rateGroup1_6HzContext)); cmdSeq.allocateBuffer(0, mallocator, 5 * 1024); @@ -121,34 +121,26 @@ void setupTopology(const TopologyState& state) { lis2mdlManager.configure(state.lis2mdlDevice); ina219SysManager.configure(state.ina219SysDevice); ina219SolManager.configure(state.ina219SolDevice); - tcaMonitor.configure(state.tca9548aDevice); - muxChannel0Monitor.configure(state.muxChannel0Device); - muxChannel1Monitor.configure(state.muxChannel1Device); - muxChannel2Monitor.configure(state.muxChannel2Device); - muxChannel3Monitor.configure(state.muxChannel3Device); - muxChannel4Monitor.configure(state.muxChannel4Device); - muxChannel5Monitor.configure(state.muxChannel5Device); - muxChannel7Monitor.configure(state.muxChannel7Device); // Configure all 11 TMP112 temperature sensor managers - tmp112Face0Manager.configure(state.face0TempDevice); - tmp112Face1Manager.configure(state.face1TempDevice); - tmp112Face2Manager.configure(state.face2TempDevice); - tmp112Face3Manager.configure(state.face3TempDevice); - tmp112Face5Manager.configure(state.face5TempDevice); - tmp112BattCell1Manager.configure(state.battCell1TempDevice); - tmp112BattCell2Manager.configure(state.battCell2TempDevice); - tmp112BattCell3Manager.configure(state.battCell3TempDevice); - tmp112BattCell4Manager.configure(state.battCell4TempDevice); + tmp112Face0Manager.configure(state.tca9548aDevice, state.muxChannel0Device, state.face0TempDevice, true); + tmp112Face1Manager.configure(state.tca9548aDevice, state.muxChannel1Device, state.face1TempDevice, true); + tmp112Face2Manager.configure(state.tca9548aDevice, state.muxChannel2Device, state.face2TempDevice, true); + tmp112Face3Manager.configure(state.tca9548aDevice, state.muxChannel3Device, state.face3TempDevice, true); + tmp112Face5Manager.configure(state.tca9548aDevice, state.muxChannel5Device, state.face5TempDevice, true); + tmp112BattCell1Manager.configure(state.tca9548aDevice, state.muxChannel4Device, state.battCell1TempDevice, false); + tmp112BattCell2Manager.configure(state.tca9548aDevice, state.muxChannel4Device, state.battCell2TempDevice, false); + tmp112BattCell3Manager.configure(state.tca9548aDevice, state.muxChannel4Device, state.battCell3TempDevice, false); + tmp112BattCell4Manager.configure(state.tca9548aDevice, state.muxChannel4Device, state.battCell4TempDevice, false); // Configure all 7 VEML6031 light sensor managers - veml6031Face0Manager.configure(state.face0LightDevice); - // veml6031Face1Manager.configure(state.face1LightDevice); - // veml6031Face2Manager.configure(state.face2LightDevice); - // veml6031Face3Manager.configure(state.face3LightDevice); - // veml6031Face5Manager.configure(state.face5LightDevice); - // veml6031Face6Manager.configure(state.face6LightDevice); - // veml6031Face7Manager.configure(state.face7LightDevice); + veml6031Face0Manager.configure(state.tca9548aDevice, state.muxChannel0Device, state.face0LightDevice); + veml6031Face1Manager.configure(state.tca9548aDevice, state.muxChannel1Device, state.face1LightDevice); + veml6031Face2Manager.configure(state.tca9548aDevice, state.muxChannel2Device, state.face2LightDevice); + veml6031Face3Manager.configure(state.tca9548aDevice, state.muxChannel3Device, state.face3LightDevice); + veml6031Face5Manager.configure(state.tca9548aDevice, state.muxChannel5Device, state.face5LightDevice); + veml6031Face6Manager.configure(state.tca9548aDevice, state.muxChannel6Device, state.face6LightDevice); + veml6031Face7Manager.configure(state.tca9548aDevice, state.muxChannel7Device, state.face7LightDevice); } void startRateGroups() { diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopologyDefs.hpp b/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopologyDefs.hpp index c6dd5eb2..19d72cea 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopologyDefs.hpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopologyDefs.hpp @@ -107,12 +107,12 @@ struct TopologyState { const device* battCell4TempDevice; //!< TMP112 device for battery cell 4 // - Light sensors const device* face0LightDevice; //!< Light sensor device for cube face 0 - // const device* face1LightDevice; //!< Light sensor device for cube face 1 - // const device* face2LightDevice; //!< Light sensor device for cube face 2 - // const device* face3LightDevice; //!< Light sensor device for cube face 3 - // const device* face5LightDevice; //!< Light sensor device for cube face 5 - // const device* face6LightDevice; //!< Light sensor device for cube face 6 - // const device* face7LightDevice; //!< Light sensor device for cube face 7 + const device* face1LightDevice; //!< Light sensor device for cube face 1 + const device* face2LightDevice; //!< Light sensor device for cube face 2 + const device* face3LightDevice; //!< Light sensor device for cube face 3 + const device* face5LightDevice; //!< Light sensor device for cube face 5 + const device* face6LightDevice; //!< Light sensor device for cube face 6 + const device* face7LightDevice; //!< Light sensor device for cube face 7 }; namespace PingEntries = ::PingEntries; diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp b/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp index 94b9311c..28b9904c 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp @@ -19,7 +19,7 @@ module ReferenceDeployment { # ---------------------------------------------------------------------- module Default { - constant QUEUE_SIZE = 10 + constant QUEUE_SIZE = 5 constant STACK_SIZE = 8 * 1024 # Must match prj.conf thread stack size } @@ -147,26 +147,6 @@ module ReferenceDeployment { instance startupManager: Components.StartupManager base id 0x1003F000 - instance tcaMonitor: Components.GenericDeviceMonitor base id 0x10041000 - - instance muxChannel0Monitor: Components.GenericDeviceMonitor base id 0x10042000 - - instance muxChannel1Monitor: Components.GenericDeviceMonitor base id 0x10043000 - - instance muxChannel2Monitor: Components.GenericDeviceMonitor base id 0x10044000 - - instance muxChannel3Monitor: Components.GenericDeviceMonitor base id 0x10045000 - - instance muxChannel4Monitor: Components.GenericDeviceMonitor base id 0x10046000 - - instance muxChannel5Monitor: Components.GenericDeviceMonitor base id 0x10047000 - - instance muxChannel6Monitor: Components.GenericDeviceMonitor base id 0x10048000 - - instance muxChannel7Monitor: Components.GenericDeviceMonitor base id 0x10049000 - - instance thermalManager: Components.ThermalManager base id 0x1004A000 - instance tmp112Face0Manager: Drv.Tmp112Manager base id 0x1004B000 instance tmp112Face1Manager: Drv.Tmp112Manager base id 0x1004C000 @@ -185,8 +165,6 @@ module ReferenceDeployment { instance tmp112BattCell4Manager: Drv.Tmp112Manager base id 0x10053000 - instance adcs: Components.ADCS base id 0x10054000 - instance veml6031Face0Manager: Drv.Veml6031Manager base id 0x10055000 instance veml6031Face1Manager: Drv.Veml6031Manager base id 0x10056000 diff --git a/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp b/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp index 49741a9b..6d06edb7 100644 --- a/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp +++ b/FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp @@ -25,7 +25,7 @@ module ReferenceDeployment { # ---------------------------------------------------------------------- instance rateGroup10Hz instance rateGroup1Hz - instance rateGroup1_6Hz + # instance rateGroup1_6Hz instance rateGroupDriver instance timer instance lora @@ -68,18 +68,8 @@ module ReferenceDeployment { instance powerMonitor instance ina219SysManager instance ina219SolManager - instance tcaMonitor - instance muxChannel0Monitor - instance muxChannel1Monitor - instance muxChannel2Monitor - instance muxChannel3Monitor - instance muxChannel4Monitor - instance muxChannel5Monitor - instance muxChannel6Monitor - instance muxChannel7Monitor # Face Board Instances - instance thermalManager instance tmp112Face0Manager instance tmp112Face1Manager instance tmp112Face2Manager @@ -91,14 +81,13 @@ module ReferenceDeployment { instance tmp112BattCell4Manager instance resetManager instance modeManager - instance adcs instance veml6031Face0Manager - # instance veml6031Face1Manager - # instance veml6031Face2Manager - # instance veml6031Face3Manager - # instance veml6031Face5Manager - # instance veml6031Face6Manager - # instance veml6031Face7Manager + instance veml6031Face1Manager + instance veml6031Face2Manager + instance veml6031Face3Manager + instance veml6031Face5Manager + instance veml6031Face6Manager + instance veml6031Face7Manager # ---------------------------------------------------------------------- @@ -200,23 +189,10 @@ module ReferenceDeployment { rateGroup1Hz.RateGroupMemberOut[7] -> fsSpace.run rateGroup1Hz.RateGroupMemberOut[8] -> FileHandling.fileDownlink.Run rateGroup1Hz.RateGroupMemberOut[9] -> startupManager.run # doubles (20ms) rate group max time - # rateGroup1Hz.RateGroupMemberOut[12] -> powerMonitor.run # Causing rate group to slip? rateGroup1Hz.RateGroupMemberOut[10] -> modeManager.run - # rateGroup1Hz.RateGroupMemberOut[23] -> adcs.run - - # Slow rate (1/6 Hz) rate group - rateGroupDriver.CycleOut[Ports_RateGroups.rateGroup1_6Hz] -> rateGroup1_6Hz.CycleIn - rateGroup1_6Hz.RateGroupMemberOut[0] -> CdhCore.tlmSend.Run - rateGroup1_6Hz.RateGroupMemberOut[1] -> imuManager.run - rateGroup1_6Hz.RateGroupMemberOut[2] -> tcaMonitor.run - rateGroup1_6Hz.RateGroupMemberOut[3] -> muxChannel0Monitor.run - rateGroup1_6Hz.RateGroupMemberOut[4] -> muxChannel1Monitor.run - rateGroup1_6Hz.RateGroupMemberOut[5] -> muxChannel2Monitor.run - rateGroup1_6Hz.RateGroupMemberOut[6] -> muxChannel3Monitor.run - rateGroup1_6Hz.RateGroupMemberOut[7] -> muxChannel4Monitor.run - rateGroup1_6Hz.RateGroupMemberOut[8] -> muxChannel5Monitor.run - rateGroup1_6Hz.RateGroupMemberOut[9] -> muxChannel7Monitor.run - rateGroup1_6Hz.RateGroupMemberOut[10] -> thermalManager.run + rateGroup1Hz.RateGroupMemberOut[11] -> CdhCore.tlmSend.Run + rateGroup1Hz.RateGroupMemberOut[12] -> imuManager.run + rateGroup1Hz.RateGroupMemberOut[13] -> powerMonitor.run } @@ -236,18 +212,22 @@ module ReferenceDeployment { face1LoadSwitch.gpioSet -> gpioface1LS.gpioWrite face1LoadSwitch.gpioGet -> gpioface1LS.gpioRead face1LoadSwitch.loadSwitchStateChanged[0] -> tmp112Face1Manager.loadSwitchStateChanged + face1LoadSwitch.loadSwitchStateChanged[1] -> veml6031Face1Manager.loadSwitchStateChanged face2LoadSwitch.gpioSet -> gpioface2LS.gpioWrite face2LoadSwitch.gpioGet -> gpioface2LS.gpioRead face2LoadSwitch.loadSwitchStateChanged[0] -> tmp112Face2Manager.loadSwitchStateChanged + face2LoadSwitch.loadSwitchStateChanged[1] -> veml6031Face2Manager.loadSwitchStateChanged face3LoadSwitch.gpioSet -> gpioface3LS.gpioWrite face3LoadSwitch.gpioGet -> gpioface3LS.gpioRead face3LoadSwitch.loadSwitchStateChanged[0] -> tmp112Face3Manager.loadSwitchStateChanged + face3LoadSwitch.loadSwitchStateChanged[1] -> veml6031Face3Manager.loadSwitchStateChanged face5LoadSwitch.gpioSet -> gpioface5LS.gpioWrite face5LoadSwitch.gpioGet -> gpioface5LS.gpioRead face5LoadSwitch.loadSwitchStateChanged[0] -> tmp112Face5Manager.loadSwitchStateChanged + face5LoadSwitch.loadSwitchStateChanged[1] -> veml6031Face5Manager.loadSwitchStateChanged payloadPowerLoadSwitch.gpioSet -> gpioPayloadPowerLS.gpioWrite payloadPowerLoadSwitch.gpioGet -> gpioPayloadPowerLS.gpioRead @@ -293,53 +273,6 @@ module ReferenceDeployment { powerMonitor.solPowerGet -> ina219SolManager.powerGet } - connections thermalManager { - tmp112Face0Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112Face0Manager.muxHealthGet -> muxChannel0Monitor.healthGet - thermalManager.faceTempGet[0] -> tmp112Face0Manager.temperatureGet - - tmp112Face1Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112Face1Manager.muxHealthGet -> muxChannel1Monitor.healthGet - thermalManager.faceTempGet[1] -> tmp112Face1Manager.temperatureGet - - tmp112Face2Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112Face2Manager.muxHealthGet -> muxChannel2Monitor.healthGet - thermalManager.faceTempGet[2] -> tmp112Face2Manager.temperatureGet - - tmp112Face3Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112Face3Manager.muxHealthGet -> muxChannel3Monitor.healthGet - thermalManager.faceTempGet[3] -> tmp112Face3Manager.temperatureGet - - tmp112Face5Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112Face5Manager.muxHealthGet -> muxChannel5Monitor.healthGet - thermalManager.faceTempGet[4] -> tmp112Face5Manager.temperatureGet - - tmp112BattCell1Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112BattCell1Manager.muxHealthGet -> muxChannel4Monitor.healthGet - thermalManager.battCellTempGet[0] -> tmp112BattCell1Manager.temperatureGet - - tmp112BattCell2Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112BattCell2Manager.muxHealthGet -> muxChannel4Monitor.healthGet - thermalManager.battCellTempGet[1] -> tmp112BattCell2Manager.temperatureGet - - tmp112BattCell3Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112BattCell3Manager.muxHealthGet -> muxChannel4Monitor.healthGet - thermalManager.battCellTempGet[2] -> tmp112BattCell3Manager.temperatureGet - - tmp112BattCell4Manager.tcaHealthGet -> tcaMonitor.healthGet - tmp112BattCell4Manager.muxHealthGet -> muxChannel4Monitor.healthGet - thermalManager.battCellTempGet[3] -> tmp112BattCell4Manager.temperatureGet - } - - connections adcs { - adcs.visibleLightGet[0] -> veml6031Face0Manager.visibleLightGet - # adcs.visibleLightGet[1] -> veml6031Face1Manager.visibleLightGet --- IGNORE --- - # adcs.visibleLightGet[2] -> veml6031Face2Manager.visibleLightGet --- IGNORE --- - # adcs.visibleLightGet[3] -> veml6031Face3Manager.visibleLightGet --- IGNORE --- - # adcs.visibleLightGet[4] -> veml6031Face5Manager.visibleLightGet --- IGNORE --- - # adcs.visibleLightGet[5] -> veml6031Face6Manager.visibleLightGet --- IGNORE - } - connections ModeManager { # Voltage monitoring from system power manager modeManager.voltageGet -> ina219SysManager.voltageGet diff --git a/FprimeZephyrReference/project/config/AcConstants.fpp b/FprimeZephyrReference/project/config/AcConstants.fpp index 6eadde8f..ecca53aa 100644 --- a/FprimeZephyrReference/project/config/AcConstants.fpp +++ b/FprimeZephyrReference/project/config/AcConstants.fpp @@ -4,7 +4,7 @@ # ====================================================================== @ Number of rate group member output ports for ActiveRateGroup -constant ActiveRateGroupOutputPorts = 12 +constant ActiveRateGroupOutputPorts = 16 @ Number of rate group member output ports for PassiveRateGroup constant PassiveRateGroupOutputPorts = 10 @@ -13,7 +13,7 @@ constant PassiveRateGroupOutputPorts = 10 constant RateGroupDriverRateGroupPorts = 3 @ Used for command and registration ports -constant CmdDispatcherComponentCommandPorts = 36 +constant CmdDispatcherComponentCommandPorts = 44 @ Used for uplink/sequencer buffer/response ports constant CmdDispatcherSequencePorts = 5 diff --git a/FprimeZephyrReference/project/config/CdhCoreConfig.fpp b/FprimeZephyrReference/project/config/CdhCoreConfig.fpp index 36c77be5..0b29a0f2 100644 --- a/FprimeZephyrReference/project/config/CdhCoreConfig.fpp +++ b/FprimeZephyrReference/project/config/CdhCoreConfig.fpp @@ -3,8 +3,8 @@ module CdhCoreConfig { constant BASE_ID = 0x01000000 module QueueSizes { - constant cmdDisp = 10 - constant events = 25 + constant cmdDisp = 5 + constant events = 10 constant tlmSend = 5 constant $health = 10 } diff --git a/FprimeZephyrReference/project/config/ComCcsdsConfig.fpp b/FprimeZephyrReference/project/config/ComCcsdsConfig.fpp index c39d3778..d128a55b 100644 --- a/FprimeZephyrReference/project/config/ComCcsdsConfig.fpp +++ b/FprimeZephyrReference/project/config/ComCcsdsConfig.fpp @@ -5,7 +5,7 @@ module ComCcsdsConfig { module QueueSizes { constant comQueue = 5 - constant aggregator = 15 + constant aggregator = 8 } module StackSizes { @@ -20,7 +20,7 @@ module ComCcsdsConfig { # Queue configuration constants module QueueDepths { - constant events = 10 + constant events = 5 constant tlm = 5 constant file = 1 } diff --git a/FprimeZephyrReference/project/config/FileHandlingConfig.fpp b/FprimeZephyrReference/project/config/FileHandlingConfig.fpp index 1074f62c..a9070162 100644 --- a/FprimeZephyrReference/project/config/FileHandlingConfig.fpp +++ b/FprimeZephyrReference/project/config/FileHandlingConfig.fpp @@ -3,10 +3,10 @@ module FileHandlingConfig { constant BASE_ID = 0x05000000 module QueueSizes { - constant fileUplink = 10 - constant fileDownlink = 10 - constant fileManager = 10 - constant prmDb = 10 + constant fileUplink = 5 + constant fileDownlink = 5 + constant fileManager = 5 + constant prmDb = 5 } module StackSizes { @@ -28,6 +28,6 @@ module FileHandlingConfig { constant timeout = 1000 # File downlink timeout in ms constant cooldown = 1000 # File downlink cooldown in ms constant cycleTime = 1000 # File downlink cycle time in ms - constant fileQueueDepth = 3 # File downlink queue depth + constant fileQueueDepth = 1 # File downlink queue depth } } diff --git a/FprimeZephyrReference/project/config/FpConstants.fpp b/FprimeZephyrReference/project/config/FpConstants.fpp index e91467a3..50073b86 100644 --- a/FprimeZephyrReference/project/config/FpConstants.fpp +++ b/FprimeZephyrReference/project/config/FpConstants.fpp @@ -71,7 +71,7 @@ constant FW_FIXED_LENGTH_STRING_SIZE = 256 constant FW_OBJ_SIMPLE_REG_ENTRIES = 500 @ For the simple queue registry provided with the framework, this specifies how many queues the registry will store. -constant FW_QUEUE_SIMPLE_QUEUE_ENTRIES = 100 +constant FW_QUEUE_SIMPLE_QUEUE_ENTRIES = 50 @ Maximum number of cascading FW_ASSERT check failures before forcing a system assert constant FW_ASSERT_COUNT_MAX = 10 diff --git a/prj.conf b/prj.conf index 6c8cb703..2f997d73 100644 --- a/prj.conf +++ b/prj.conf @@ -47,17 +47,16 @@ CONFIG_DYNAMIC_THREAD_STACK_SIZE=8192 CONFIG_THREAD_STACK_INFO=y CONFIG_RING_BUFFER=y -CONFIG_PRINTK=y +# CONFIG_PRINTK=y CONFIG_UART_CONSOLE=y CONFIG_COMMON_LIBC_MALLOC=y CONFIG_SENSOR=y # Enable detailed logging for I2C and sensor debugging -CONFIG_LOG=y -CONFIG_LOG_DEFAULT_LEVEL=3 - -CONFIG_CBPRINTF_FP_SUPPORT=y +CONFIG_LOG=n +# CONFIG_LOG_DEFAULT_LEVEL=3 +# CONFIG_CBPRINTF_FP_SUPPORT=y CONFIG_POSIX_AEP_CHOICE_PSE52=y