From 884f4af4ab3c756693567a609d140e5a5e021d09 Mon Sep 17 00:00:00 2001
From: athatheocsd <athatheo@csd.auth.gr>
Date: Tue, 18 Dec 2018 19:15:21 +0200
Subject: [PATCH] Fixed minor issues and mistakes

---
 inc/Services/EventActionService.hpp | 27 ++++-----------------------
 src/Services/EventActionService.cpp |  8 ++++----
 2 files changed, 8 insertions(+), 27 deletions(-)

diff --git a/inc/Services/EventActionService.hpp b/inc/Services/EventActionService.hpp
index 1c4a95f4..6314b2e0 100644
--- a/inc/Services/EventActionService.hpp
+++ b/inc/Services/EventActionService.hpp
@@ -5,38 +5,26 @@
 /**
  * Implementation of ST[19] event-action Service
  *
- * @todo: check if two enums are need for both event-action status and event-action definition
- * status
+ * @todo: Do something with the applicationID.
  */
 class EventActionService : public Service {
 /**
  * @todo: check if this should be private or not
  */
 private:
-	uint8_t eventActionStatus;
 	uint8_t eventActionFunctionStatus;
 public:
 	EventActionService() {
 		serviceType = 19;
-		eventActionStatus = EventActionStatus::enabled;
-		eventActionFunctionStatus = EventActionFunctionStatus::enabledFunction;
+		eventActionFunctionStatus = enabledFunction;
 	}
 
-
-	/**
-	 * Event-action status
-	 */
-	enum EventActionStatus{
-		disabled = 0,
-		enabled = 1,
-	};
-
 	/**
 	 * Event-action function status
 	 */
 	enum EventActionFunctionStatus {
-		disabledFunction = 1,
-		enabledFunction = 0,
+		disabledFunction = 0,
+		enabledFunction = 1,
 	};
 	/**
 	 * TC[19,1] add event-action definitions
@@ -83,13 +71,6 @@ public:
 	 */
 	void disableEventActionFunction(Message message);
 
-	/**
-	 * Setter for event-action status
-	 */
-	void setEventActionStatus(EventActionStatus e){
-		eventActionStatus = e;
-	}
-
 	/**
 	 * Setter for event-action function status
 	 */
diff --git a/src/Services/EventActionService.cpp b/src/Services/EventActionService.cpp
index d5d93957..e11548d0 100644
--- a/src/Services/EventActionService.cpp
+++ b/src/Services/EventActionService.cpp
@@ -6,7 +6,7 @@ void EventActionService::addEventActionDefinitions(Message message){
 	// TC[19,1]
 	if (message.messageType == 1 && message.packetType == Message::TC && message.serviceType
 	                                                                     == 19){
-		int N = message.readUint16();
+		uint16_t N = message.readUint16();
 		for (uint16_t i = 0; i < N; i++){
 
 		}
@@ -18,7 +18,7 @@ void EventActionService::deleteEventActionDefinitions(Message message) {
 	// TC[19,2]
 	if (message.messageType == 2 && message.packetType == Message::TC && message.serviceType
 	                                                                     == 19){
-		int N = message.readUint16();
+		uint16_t N = message.readUint16();
 		for (uint16_t i = 0; i < N; i++){
 
 		}
@@ -38,7 +38,7 @@ void EventActionService::enableEventActionDefinitions(Message message) {
 	// TC[19,4]
 	if (message.messageType == 4 && message.packetType == Message::TC && message.serviceType
 	                                                                     == 19){
-		int N = message.readUint16();
+		uint16_t N = message.readUint16();
 		for (uint16_t i = 0; i < N; i++){
 
 		}
@@ -50,7 +50,7 @@ void EventActionService::disableEventActionDefinitions(Message message) {
 	// TC[19,5]
 	if (message.messageType == 5 && message.packetType == Message::TC && message.serviceType
 	                                                                     == 19){
-		int N = message.readUint16();
+		uint16_t N = message.readUint16();
 		for (uint16_t i = 0; i < N; i++){
 
 		}
-- 
GitLab