diff --git a/inc/Services/EventActionService.hpp b/inc/Services/EventActionService.hpp index ae9bd5ff0922254dc0b0a7c6c5a5bbd9b02cc3e9..6189f747d633ad7e6f5b4a6dc5649b0c40895ccb 100644 --- a/inc/Services/EventActionService.hpp +++ b/inc/Services/EventActionService.hpp @@ -2,18 +2,74 @@ #define ECSS_SERVICES_EVENTACTIONSERVICE_HPP #include "Service.hpp" - - +/** + * Implementation of ST[19] event-action Service + * + * @todo: check if two enums are need for both event-action status and event-action definition + * status + */ class EventActionService : public Service { public: - EventActionService(){ + EventActionService() { serviceType = 19; } /** - * TC[19,1] + * Event-action status + * + * Note: In the standard 8.19.3.a and 8.19.3.b there are two enums with the same enum values + * (event-action status and event-action function status). I discarded the function one, + * because I think one enum is enough. + */ + enum eventActionStatus{ + disabled = 0, + enabled = 1, + }; + + /** + * TC[19,1] add event-action definitions + */ + void addEventActionDefinitions(Message message); + + /** + * TC[19,2] delete event-action definitions */ - + void deleteEventActionDefinitions(Message message); + /** + * TC[19,3] delete all event-action definitions + */ + void deleteAllEventActionDefinitions(Message message); + + /** + * TC[19,4] enable event-action definitions + */ + void enableEventActionDefinitions(Message message); + + /** + * TC[19,5] disable event-action definitions + */ + void disableEventActionDefinitions(Message message); + + /** + * TC[19,6] report the status of each event-action definition + */ + void requestEventActionDefinitionStatus(Message message); + + /** + * TM[19,7] event-action status report + */ + void eventActionStatusReport(); + + /** + * TC[19,8] enable the event-action function + */ + void enableEventActionFunction(Message message); + + /** + * TC[19,9] disable the event-actioni function + */ + void disableEventActionFunction(Message message); }; + #endif //ECSS_SERVICES_EVENTACTIONSERVICE_HPP diff --git a/src/Services/EventActionService.cpp b/src/Services/EventActionService.cpp index 0beb4895f79c208704892a6127fd74f7cf4bf4d1..f2d9290dc235ec6a53f07bb6d3e6c64db1d51dda 100644 --- a/src/Services/EventActionService.cpp +++ b/src/Services/EventActionService.cpp @@ -2,3 +2,10 @@ #include "Message.hpp" #include "MessageParser.hpp" +void EventActionService::addEventActionDefinitions(Message message){ + if (message.messageType == 1 && message.packetType == Message::TC && message.serviceType + == 19){ + int N = message.readUint16(); + + } +}