Compare commits
	
		
			22 Commits
		
	
	
		
			obj-manage
			...
			docker_d10
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ac817f296b | |||
| 
						
						
							
						
						622ad9ff18
	
				 | 
					
					
						|||
| 
						
						
							
						
						f0e4eacac5
	
				 | 
					
					
						|||
| acc737feb2 | |||
| 
						
						
							
						
						c9281a3760
	
				 | 
					
					
						|||
| 
						
						
							
						
						cc97c7f82d
	
				 | 
					
					
						|||
| 
						
						
							
						
						a3b102c0d0
	
				 | 
					
					
						|||
| 5dd4f15b39 | |||
| b5a3c0226e | |||
| 
						
						
							
						
						e925b8595c
	
				 | 
					
					
						|||
| c5bf5389b8 | |||
| 
						
						
							
						
						7285dd6bac
	
				 | 
					
					
						|||
| b53bf2ea12 | |||
| 610c196f6d | |||
| ece47b4f2f | |||
| 3f777c54fe | |||
| 
						
						
							
						
						3d54895251
	
				 | 
					
					
						|||
| d91e1ecc0a | |||
| 
						
						
							
						
						e5910c77e9
	
				 | 
					
					
						|||
| 
						
						
							
						
						1569416a8f
	
				 | 
					
					
						|||
| 
						
						
							
						
						278c8f1186
	
				 | 
					
					
						|||
| 
						
						
							
						
						60f6ef5f1f
	
				 | 
					
					
						
							
								
								
									
										12
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -22,13 +22,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 | 
			
		||||
  https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/745
 | 
			
		||||
- Small tweak for version getter
 | 
			
		||||
  https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/744
 | 
			
		||||
- Important bugfix for `LocalPool::delete` function, where an overflow could possibly lead to UB.
 | 
			
		||||
 | 
			
		||||
## Added
 | 
			
		||||
 | 
			
		||||
- add CFDP subsystem ID
 | 
			
		||||
  https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/742
 | 
			
		||||
- New object ID for persistent TM store PUS 15
 | 
			
		||||
- `EventManager`: Add function to print all listeners.
 | 
			
		||||
 | 
			
		||||
## Changed
 | 
			
		||||
 | 
			
		||||
- Bump ETL version to 20.35.14
 | 
			
		||||
  https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/748
 | 
			
		||||
- Renamed `PCDU_2` subsystem ID to `POWER_SWITCH_IF`.
 | 
			
		||||
@@ -37,14 +41,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 | 
			
		||||
  https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/743
 | 
			
		||||
- Assert that `FixedArrayList` is larger than 0 at compile time.
 | 
			
		||||
  https://egit.irs.uni-stuttgart.de/fsfw/fsfw/pulls/740
 | 
			
		||||
 | 
			
		||||
## Added
 | 
			
		||||
 | 
			
		||||
- `EventManager`: Add function to print all listeners.
 | 
			
		||||
 | 
			
		||||
## Changed
 | 
			
		||||
 | 
			
		||||
- `EventManager`: Queue depth is configurable now
 | 
			
		||||
- `ActionHelper`: Allow execution of actions without additional data
 | 
			
		||||
 | 
			
		||||
# [v6.0.0] 2023-02-10
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,10 @@ RUN apt-get --yes upgrade
 | 
			
		||||
ARG DEBIAN_FRONTEND=noninteractive
 | 
			
		||||
RUN apt-get --yes install gcc g++ cmake make lcov git valgrind nano iputils-ping python3 pip doxygen graphviz rsync
 | 
			
		||||
 | 
			
		||||
RUN python3 -m pip install sphinx breathe
 | 
			
		||||
# This should also install Sphinx
 | 
			
		||||
COPY docs/requirements.txt .
 | 
			
		||||
RUN python3 -m pip install -r docs/requirements.txt
 | 
			
		||||
RUN python3 -m pip install breathe
 | 
			
		||||
 | 
			
		||||
RUN git clone https://github.com/catchorg/Catch2.git && \
 | 
			
		||||
        cd Catch2 && \
 | 
			
		||||
@@ -26,4 +29,4 @@ RUN adduser --uid 114 jenkins
 | 
			
		||||
 | 
			
		||||
#add documentation server to known hosts
 | 
			
		||||
RUN echo "|1|/LzCV4BuTmTb2wKnD146l9fTKgQ=|NJJtVjvWbtRt8OYqFgcYRnMQyVw= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNL8ssTonYtgiR/6RRlSIK9WU1ywOcJmxFTLcEblAwH7oifZzmYq3XRfwXrgfMpylEfMFYfCU8JRqtmi19xc21A=" >> /etc/ssh/ssh_known_hosts
 | 
			
		||||
RUN echo "|1|CcBvBc3EG03G+XM5rqRHs6gK/Gg=|oGeJQ+1I8NGI2THIkJsW92DpTzs= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNL8ssTonYtgiR/6RRlSIK9WU1ywOcJmxFTLcEblAwH7oifZzmYq3XRfwXrgfMpylEfMFYfCU8JRqtmi19xc21A=" >> /etc/ssh/ssh_known_hosts
 | 
			
		||||
RUN echo "|1|CcBvBc3EG03G+XM5rqRHs6gK/Gg=|oGeJQ+1I8NGI2THIkJsW92DpTzs= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNL8ssTonYtgiR/6RRlSIK9WU1ywOcJmxFTLcEblAwH7oifZzmYq3XRfwXrgfMpylEfMFYfCU8JRqtmi19xc21A=" >> /etc/ssh/ssh_known_hosts
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								automation/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								automation/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@@ -87,38 +87,44 @@ pipeline {
 | 
			
		||||
        }
 | 
			
		||||
        stage('Documentation') {
 | 
			
		||||
            when {
 | 
			
		||||
                branch 'development'
 | 
			
		||||
              anyOf {
 | 
			
		||||
                branch 'development';
 | 
			
		||||
                branch pattern: 'development-doc-deployment*'
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
            steps {
 | 
			
		||||
                dir(DOCDDIR) {
 | 
			
		||||
                    sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
 | 
			
		||||
                    sh 'make Sphinx'
 | 
			
		||||
                    sshagent(credentials: ['documentation-buildfix']) {
 | 
			
		||||
                        sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/development'
 | 
			
		||||
                        sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/projects/fsfw/development'
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                dir(BUILDDIR_LINUX) {
 | 
			
		||||
                    sshagent(credentials: ['documentation-buildfix']) {
 | 
			
		||||
                        sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/development'
 | 
			
		||||
                        sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/projects/fsfw/coverage/development'
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        stage('Master Documentation') {
 | 
			
		||||
            when {
 | 
			
		||||
                branch 'master'
 | 
			
		||||
              anyOf {
 | 
			
		||||
                branch 'master';
 | 
			
		||||
                branch pattern: 'master-doc-deployment*'
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
            steps {
 | 
			
		||||
                dir(DOCDDIR) {
 | 
			
		||||
                    sh 'cmake -DFSFW_BUILD_DOCS=ON -DFSFW_OSAL=host ..'
 | 
			
		||||
                    sh 'make Sphinx'
 | 
			
		||||
                    sshagent(credentials: ['documentation-buildfix']) {
 | 
			
		||||
                        sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/master'
 | 
			
		||||
                        sh 'rsync -r --delete docs/sphinx/* buildfix@documentation.irs.uni-stuttgart.de:/projects/fsfw/master'
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                dir(BUILDDIR_LINUX) {
 | 
			
		||||
                    sshagent(credentials: ['documentation-buildfix']) {
 | 
			
		||||
                        sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/fsfw/coverage/master'
 | 
			
		||||
                        sh 'rsync -r --delete fsfw-tests_coverage/* buildfix@documentation.irs.uni-stuttgart.de:/projects/fsfw/coverage/master'
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@ project = "Flight Software Framework"
 | 
			
		||||
copyright = "2021, Institute of Space Systems (IRS)"
 | 
			
		||||
author = "Institute of Space Systems (IRS)"
 | 
			
		||||
 | 
			
		||||
# TODO: Should try to read this from CMakeLists.txt automatically..
 | 
			
		||||
# The full version, including alpha/beta/rc tags
 | 
			
		||||
release = "5.0.0"
 | 
			
		||||
 | 
			
		||||
@@ -48,7 +49,7 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
 | 
			
		||||
# The theme to use for HTML and HTML Help pages.  See the documentation for
 | 
			
		||||
# a list of builtin themes.
 | 
			
		||||
#
 | 
			
		||||
html_theme = "alabaster"
 | 
			
		||||
html_theme = "sphinx_rtd_theme"
 | 
			
		||||
 | 
			
		||||
html_theme_options = {
 | 
			
		||||
    "extra_nav_links": {"Impressum" : "https://www.uni-stuttgart.de/impressum", "Datenschutz": "https://info.irs.uni-stuttgart.de/datenschutz/datenschutzWebmit.html"}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								docs/requirements.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								docs/requirements.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
sphinx-rtd-theme==1.3.0
 | 
			
		||||
@@ -59,17 +59,24 @@ void ActionHelper::setQueueToUse(MessageQueueIF* queue) { queueToUse = queue; }
 | 
			
		||||
 | 
			
		||||
void ActionHelper::prepareExecution(MessageQueueId_t commandedBy, ActionId_t actionId,
 | 
			
		||||
                                    store_address_t dataAddress) {
 | 
			
		||||
  bool hasAdditionalData = false;
 | 
			
		||||
  const uint8_t* dataPtr = nullptr;
 | 
			
		||||
  size_t size = 0;
 | 
			
		||||
  ReturnValue_t result = ipcStore->getData(dataAddress, &dataPtr, &size);
 | 
			
		||||
  if (result != returnvalue::OK) {
 | 
			
		||||
    CommandMessage reply;
 | 
			
		||||
    ActionMessage::setStepReply(&reply, actionId, 0, result);
 | 
			
		||||
    queueToUse->sendMessage(commandedBy, &reply);
 | 
			
		||||
    return;
 | 
			
		||||
  ReturnValue_t result;
 | 
			
		||||
  if (dataAddress != store_address_t::invalid()) {
 | 
			
		||||
    hasAdditionalData = true;
 | 
			
		||||
    ReturnValue_t result = ipcStore->getData(dataAddress, &dataPtr, &size);
 | 
			
		||||
    if (result != returnvalue::OK) {
 | 
			
		||||
      CommandMessage reply;
 | 
			
		||||
      ActionMessage::setStepReply(&reply, actionId, 0, result);
 | 
			
		||||
      queueToUse->sendMessage(commandedBy, &reply);
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  result = owner->executeAction(actionId, commandedBy, dataPtr, size);
 | 
			
		||||
  ipcStore->deleteData(dataAddress);
 | 
			
		||||
  if (hasAdditionalData) {
 | 
			
		||||
    ipcStore->deleteData(dataAddress);
 | 
			
		||||
  }
 | 
			
		||||
  if (result == HasActionsIF::EXECUTION_FINISHED) {
 | 
			
		||||
    CommandMessage reply;
 | 
			
		||||
    ActionMessage::setCompletionReply(&reply, actionId, true, result);
 | 
			
		||||
 
 | 
			
		||||
@@ -16,8 +16,8 @@ class CommandActionHelper {
 | 
			
		||||
 public:
 | 
			
		||||
  explicit CommandActionHelper(CommandsActionsIF* owner);
 | 
			
		||||
  virtual ~CommandActionHelper();
 | 
			
		||||
  ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, const uint8_t* data,
 | 
			
		||||
                              uint32_t size);
 | 
			
		||||
  ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId,
 | 
			
		||||
                              const uint8_t* data = nullptr, uint32_t size = 0);
 | 
			
		||||
  ReturnValue_t commandAction(object_id_t commandTo, ActionId_t actionId, SerializeIF* data);
 | 
			
		||||
  ReturnValue_t initialize();
 | 
			
		||||
  ReturnValue_t handleReply(CommandMessage* reply);
 | 
			
		||||
 
 | 
			
		||||
@@ -15,6 +15,7 @@ enum framework_objects : object_id_t {
 | 
			
		||||
  PUS_SERVICE_8_FUNCTION_MGMT = 0x53000008,
 | 
			
		||||
  PUS_SERVICE_9_TIME_MGMT = 0x53000009,
 | 
			
		||||
  PUS_SERVICE_11_TC_SCHEDULER = 0x53000011,
 | 
			
		||||
  PUS_SERVICE_15_TM_STORAGE = 0x53000015,
 | 
			
		||||
  PUS_SERVICE_17_TEST = 0x53000017,
 | 
			
		||||
  PUS_SERVICE_20_PARAMETERS = 0x53000020,
 | 
			
		||||
  PUS_SERVICE_200_MODE_MGMT = 0x53000200,
 | 
			
		||||
 
 | 
			
		||||
@@ -89,7 +89,7 @@ ReturnValue_t LocalPool::deleteData(store_address_t storeId) {
 | 
			
		||||
  ReturnValue_t status = returnvalue::OK;
 | 
			
		||||
  size_type pageSize = getSubpoolElementSize(storeId.poolIndex);
 | 
			
		||||
  if ((pageSize != 0) and (storeId.packetIndex < numberOfElements[storeId.poolIndex])) {
 | 
			
		||||
    uint16_t packetPosition = getRawPosition(storeId);
 | 
			
		||||
    size_type packetPosition = getRawPosition(storeId);
 | 
			
		||||
    uint8_t* ptr = &store[storeId.poolIndex][packetPosition];
 | 
			
		||||
    std::memset(ptr, 0, pageSize);
 | 
			
		||||
    // Set free list
 | 
			
		||||
 
 | 
			
		||||
@@ -27,12 +27,7 @@ TEST_CASE("Action Helper", "[action]") {
 | 
			
		||||
    CHECK(not testDhMock.executeActionCalled);
 | 
			
		||||
    REQUIRE(actionHelper.handleActionMessage(&actionMessage) == returnvalue::OK);
 | 
			
		||||
    CHECK(testDhMock.executeActionCalled);
 | 
			
		||||
    // No message is sent if everything is alright.
 | 
			
		||||
    CHECK(not testMqMock.wasMessageSent());
 | 
			
		||||
    store_address_t invalidAddress;
 | 
			
		||||
    ActionMessage::setCommand(&actionMessage, testActionId, invalidAddress);
 | 
			
		||||
    actionHelper.handleActionMessage(&actionMessage);
 | 
			
		||||
    CHECK(testMqMock.wasMessageSent());
 | 
			
		||||
    const uint8_t* ptr = nullptr;
 | 
			
		||||
    size_t size = 0;
 | 
			
		||||
    REQUIRE(ipcStore->getData(paramAddress, &ptr, &size) ==
 | 
			
		||||
@@ -44,6 +39,10 @@ TEST_CASE("Action Helper", "[action]") {
 | 
			
		||||
    for (uint8_t i = 0; i < 3; i++) {
 | 
			
		||||
      REQUIRE(ptr[i] == (i + 1));
 | 
			
		||||
    }
 | 
			
		||||
    // Action message without application data is also valid
 | 
			
		||||
    store_address_t invalidAddress;
 | 
			
		||||
    ActionMessage::setCommand(&actionMessage, testActionId, invalidAddress);
 | 
			
		||||
    actionHelper.handleActionMessage(&actionMessage);
 | 
			
		||||
    testDhMock.clearBuffer();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -95,17 +94,5 @@ TEST_CASE("Action Helper", "[action]") {
 | 
			
		||||
    REQUIRE(ActionMessage::getActionId(&testMessage) == testActionId);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  SECTION("Missing IPC Data") {
 | 
			
		||||
    ActionMessage::setCommand(&actionMessage, testActionId, store_address_t::invalid());
 | 
			
		||||
    CHECK(not testDhMock.executeActionCalled);
 | 
			
		||||
    REQUIRE(actionHelper.handleActionMessage(&actionMessage) == returnvalue::OK);
 | 
			
		||||
    CommandMessage testMessage;
 | 
			
		||||
    REQUIRE(testMqMock.getNextSentMessage(testMessage) == returnvalue::OK);
 | 
			
		||||
    REQUIRE(testMessage.getCommand() == static_cast<uint32_t>(ActionMessage::STEP_FAILED));
 | 
			
		||||
    REQUIRE(ActionMessage::getReturnCode(&testMessage) ==
 | 
			
		||||
            static_cast<uint32_t>(StorageManagerIF::ILLEGAL_STORAGE_ID));
 | 
			
		||||
    REQUIRE(ActionMessage::getStep(&testMessage) == 0);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  SECTION("Data Reply") {}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user