-
thodkatz authored
Squashed commit of the following: commit 67fea0c0faa1adb705df9036665a9d4d2bf4a3ad Author: thodkatz <thodkatz@gmail.com> Date: Wed Nov 28 22:41:10 2018 +0200 Vera has some issues with the code commit 12245cad5d7a37d066fccd0f59747c55c4d19c0c Merge: abda103 a2c12996 Author: thodkatz <thodkatz@gmail.com> Date: Wed Nov 28 22:35:37 2018 +0200 Merge master commit abda103174945872504725c0359a32fcf2f90cb6 Author: thodkatz <thodkatz@gmail.com> Date: Mon Nov 26 23:19:34 2018 +0200 Minor changes commit 3ab9a66f9c93eb93a68d5dc88aae896c4b59655d Author: thodkatz <thodkatz@gmail.com> Date: Mon Nov 26 19:43:11 2018 +0200 Implement more code reviews suggestions commit e9018656018498f18c50489949d180c48f2a61bf Author: thodkatz <thodkatz@gmail.com> Date: Mon Nov 26 16:43:14 2018 +0200 Implement the code reviews suggestions commit 7f8a2d0506b37004155b47270501876ac85315c9 Author: kongr45gpen <electrovesta@gmail.com> Date: Sun Nov 25 22:02:32 2018 +0200 Suppress clang-tidy false positive commit 401685c7fa14ac683aa19c4e9c87328e1554c6f0 Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 18:23:38 2018 +0200 Implement inline functions in a better way commit 1e8c32685d110344cdadbdad3fbc3694c9fb3158 Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 07:18:14 2018 +0200 Formatting commit 65743aebaaa9c962557d1d15bd05f654aad98abf Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 06:43:05 2018 +0200 Formatting commit 742f96b72e8c23014faa7a2f1d0eca59a8d3aae1 Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 06:27:39 2018 +0200 Add tests commit 083e22f7369fc76fd4d8c2ea2c043296ee6e7c10 Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 05:56:39 2018 +0200 A basic implementation of the MessageParser class
thodkatz authoredSquashed commit of the following: commit 67fea0c0faa1adb705df9036665a9d4d2bf4a3ad Author: thodkatz <thodkatz@gmail.com> Date: Wed Nov 28 22:41:10 2018 +0200 Vera has some issues with the code commit 12245cad5d7a37d066fccd0f59747c55c4d19c0c Merge: abda103 a2c12996 Author: thodkatz <thodkatz@gmail.com> Date: Wed Nov 28 22:35:37 2018 +0200 Merge master commit abda103174945872504725c0359a32fcf2f90cb6 Author: thodkatz <thodkatz@gmail.com> Date: Mon Nov 26 23:19:34 2018 +0200 Minor changes commit 3ab9a66f9c93eb93a68d5dc88aae896c4b59655d Author: thodkatz <thodkatz@gmail.com> Date: Mon Nov 26 19:43:11 2018 +0200 Implement more code reviews suggestions commit e9018656018498f18c50489949d180c48f2a61bf Author: thodkatz <thodkatz@gmail.com> Date: Mon Nov 26 16:43:14 2018 +0200 Implement the code reviews suggestions commit 7f8a2d0506b37004155b47270501876ac85315c9 Author: kongr45gpen <electrovesta@gmail.com> Date: Sun Nov 25 22:02:32 2018 +0200 Suppress clang-tidy false positive commit 401685c7fa14ac683aa19c4e9c87328e1554c6f0 Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 18:23:38 2018 +0200 Implement inline functions in a better way commit 1e8c32685d110344cdadbdad3fbc3694c9fb3158 Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 07:18:14 2018 +0200 Formatting commit 65743aebaaa9c962557d1d15bd05f654aad98abf Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 06:43:05 2018 +0200 Formatting commit 742f96b72e8c23014faa7a2f1d0eca59a8d3aae1 Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 06:27:39 2018 +0200 Add tests commit 083e22f7369fc76fd4d8c2ea2c043296ee6e7c10 Author: thodkatz <thodkatz@gmail.com> Date: Sun Nov 25 05:56:39 2018 +0200 A basic implementation of the MessageParser class
Service.hpp 1.45 KiB
#ifndef ECSS_SERVICES_SERVICE_HPP
#define ECSS_SERVICES_SERVICE_HPP
#include <cstdint>
#include "Message.hpp"
#include <iostream> // This file should be removed
/**
* A spacecraft service, as defined in ECSS-E-ST-70-41C
*
* A member of the Service class should be used as a singleton, i.e. must be created only once in
* the code
*
* @todo Disable copy constructor
*/
class Service {
private:
uint16_t messageTypeCounter = 0;
protected:
uint8_t serviceType{};
/**
* Creates a new empty telemetry package originating from this service
*
* @param messageType The ID of the message type, as specified in the standard. For example,
* the TC[17,3] message has `messageType = 3`.
* @todo See if the Message must be returned by reference
* @todo Set the application ID to the current application
* @todo Use the messageTypeCounter
*/
Message createTM(uint8_t messageType) {
return Message(serviceType, messageType, Message::TM, 0);
}
/**
* Stores a message so that it can be transmitted to the ground station
*
* Note: For now, since we don't have any mechanisms to queue messages and send them later,
* we just print the message to the screen
*/
void storeMessage(const Message &message);
/**
* This function declared only to remind us that every service must have a function like
* this, but this particular function does actually nothing.
*/
void execute(Message &message);
};
#endif //ECSS_SERVICES_SERVICE_HPP