From f4b1e76d9fd29bd8fb25c95dfdee312f5103d4dc Mon Sep 17 00:00:00 2001
From: Grigoris Pavlakis <grigpavl@ece.auth.gr>
Date: Sun, 25 Nov 2018 00:20:38 +0200
Subject: [PATCH] Move numOfValidIds as static private function

---
 inc/Services/ParameterService.hpp | 7 +++----
 src/Services/ParameterService.cpp | 4 +---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/inc/Services/ParameterService.hpp b/inc/Services/ParameterService.hpp
index 0992043f..f0761bea 100644
--- a/inc/Services/ParameterService.hpp
+++ b/inc/Services/ParameterService.hpp
@@ -16,7 +16,7 @@
 /**
  * Generic parameter structure
  * PTC and PFC for each parameter shall be specified as in
- * ECSS-ECSS-E-ST-70-41C, chapter 7.3
+ * ECSS-E-ST-70-41C, chapter 7.3
  */
 struct Parameter {
 
@@ -39,11 +39,10 @@ struct Parameter {
  */
 
 class ParameterService : public Service {
-
+private:
 	Parameter paramsList[CONFIGLENGTH];
 	// CONFIGLENGTH is just a dummy number for now, this should be statically set
-
-	// RequestVerificationService rvs;  // request verification service for error reporting
+	static uint16_t numOfValidIds(Message idMsg);  //count the valid ids in a given TC[20, 1]
 
 public:
 	ParameterService();
diff --git a/src/Services/ParameterService.cpp b/src/Services/ParameterService.cpp
index 49e1de6b..4fa0e1b2 100644
--- a/src/Services/ParameterService.cpp
+++ b/src/Services/ParameterService.cpp
@@ -9,8 +9,6 @@
 
 #endif
 
-uint16_t numOfValidIds(Message idMsg);  //count the valid ids in a given TC[20, 1]
-
 ParameterService::ParameterService() {
 #ifdef DEMOMODE
 	/**
@@ -119,7 +117,7 @@ void ParameterService::setParameterIds(Message newParamValues) {
 	}
 }
 
-uint16_t numOfValidIds(Message idMsg) {
+uint16_t ParameterService::numOfValidIds(Message idMsg) {
 
 	idMsg.readPosition = 0;
 	// start reading from the beginning of the idMsg object
-- 
GitLab