Version FC

Dependencies:   DmTftLibrary eeprom SX1280Lib filesystem mbed

Fork of MSNV2-Terminal_V1-5 by Francis CHATAIN

Revision:
13:5414193da1de
Child:
18:d5e7e56b0a0d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Payload.hpp	Mon Aug 27 16:32:50 2018 +0000
@@ -0,0 +1,49 @@
+#ifndef __PAYLOAD_HPP___HPP__
+#define __PAYLOAD_HPP___HPP__
+
+#include <vector>
+#include "Component.hpp"
+
+class Payload {
+
+    public:
+        // TODO : provide a real list of payload identifiers !
+        enum PAYLOAD_ID {
+            IOT_PAYLOAD_1           = 1,
+            IOT_PAYLOAD_2           = 2,
+            IOT_PAYLOAD_3           = 3,
+            IOT_PAYLOAD_4           = 4,
+            IOT_PAYLOAD_5           = 5,
+            IOT_PAYLOAD_6           = 6,
+            SMART_TOOL_PAYLOAD_1    = 7,
+            SMART_TOOL_PAYLOAD_2    = 8,
+            SMART_TOOL_PAYLOAD_3    = 9,
+            SMART_TOOL_PAYLOAD_4    = 10
+        } ;
+
+        Payload(PAYLOAD_ID id, std::vector<Component> components);
+
+        std::vector<Component>& getComponents() {
+            return this->_components;
+        }
+
+        std::vector<Channel*>& getChannels() {
+            return this->_channels;
+        }
+
+        Channel* getChannelByRank(short channelRank);
+
+        PAYLOAD_ID getId() {
+            return this->_id;
+        }
+
+        friend std::ostream& operator<<(std::ostream&, const Payload &);
+
+
+    private:
+        const PAYLOAD_ID              _id;
+        std::vector<Component>        _components;
+        std::vector<Channel*>         _channels;
+};
+
+#endif // __PAYLOAD_HPP__