Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
src/ConfigurationHandler/Controls/CompositeControl.h@220:dbe21411f962, 2016-10-14 (annotated)
- Committer:
- jmarkel44
- Date:
- Fri Oct 14 13:32:47 2016 +0000
- Revision:
- 220:dbe21411f962
- Parent:
- 195:21df85341cb3
- Child:
- 221:2a5e9902003c
composite control skeleton;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jmarkel44 | 164:7cecd731882e | 1 | /****************************************************************************** |
| jmarkel44 | 164:7cecd731882e | 2 | * |
| jmarkel44 | 164:7cecd731882e | 3 | * File: CompositeControl.h |
| jmarkel44 | 164:7cecd731882e | 4 | * Desciption: ICE Composite Control Class |
| jmarkel44 | 164:7cecd731882e | 5 | * |
| jmarkel44 | 164:7cecd731882e | 6 | *****************************************************************************/ |
| jmarkel44 | 164:7cecd731882e | 7 | #ifndef COMPOSITECONTROL_H |
| jmarkel44 | 164:7cecd731882e | 8 | #define COMPOSITECONTROL_H |
| jmarkel44 | 164:7cecd731882e | 9 | |
| jmarkel44 | 164:7cecd731882e | 10 | #include <string> |
| jmarkel44 | 164:7cecd731882e | 11 | #include <vector> |
| jmarkel44 | 164:7cecd731882e | 12 | #include <stdio.h> |
| jmarkel44 | 164:7cecd731882e | 13 | |
| jmarkel44 | 220:dbe21411f962 | 14 | |
| jmarkel44 | 220:dbe21411f962 | 15 | |
| jmarkel44 | 164:7cecd731882e | 16 | class CompositeControl |
| jmarkel44 | 164:7cecd731882e | 17 | { |
| jmarkel44 | 164:7cecd731882e | 18 | private: |
| jmarkel44 | 220:dbe21411f962 | 19 | typedef struct oe_tag { |
| jmarkel44 | 220:dbe21411f962 | 20 | std::string tag; |
| jmarkel44 | 220:dbe21411f962 | 21 | std::string response; |
| jmarkel44 | 220:dbe21411f962 | 22 | } OutputElement; |
| jmarkel44 | 220:dbe21411f962 | 23 | |
| jmarkel44 | 195:21df85341cb3 | 24 | std::string controlFile; // the control file |
| jmarkel44 | 195:21df85341cb3 | 25 | std::string id; // composite identifier |
| jmarkel44 | 220:dbe21411f962 | 26 | unsigned int priority; // control priority |
| jmarkel44 | 220:dbe21411f962 | 27 | std::string ca; // control algorithm |
| jmarkel44 | 220:dbe21411f962 | 28 | std::vector<std::string> inputs; // (virtual) input(s) |
| jmarkel44 | 220:dbe21411f962 | 29 | std::vector<OutputElement> outputs; // (virtual) output(s) |
| jmarkel44 | 164:7cecd731882e | 30 | public: |
| jmarkel44 | 164:7cecd731882e | 31 | CompositeControl() { } |
| jmarkel44 | 220:dbe21411f962 | 32 | ~CompositeControl() { |
| jmarkel44 | 220:dbe21411f962 | 33 | printf("\r%s invoked\n", __func__); |
| jmarkel44 | 220:dbe21411f962 | 34 | } |
| jmarkel44 | 220:dbe21411f962 | 35 | |
| jmarkel44 | 164:7cecd731882e | 36 | bool load(std::string controlFile); |
| jmarkel44 | 220:dbe21411f962 | 37 | |
| jmarkel44 | 164:7cecd731882e | 38 | std::string getControlFile(void) const { |
| jmarkel44 | 164:7cecd731882e | 39 | return controlFile; |
| jmarkel44 | 164:7cecd731882e | 40 | } |
| jmarkel44 | 164:7cecd731882e | 41 | std::string getId(void) const { |
| jmarkel44 | 164:7cecd731882e | 42 | return id; |
| jmarkel44 | 164:7cecd731882e | 43 | } |
| jmarkel44 | 220:dbe21411f962 | 44 | |
| jmarkel44 | 220:dbe21411f962 | 45 | std::vector<std::string> getInputs(void) const; |
| jmarkel44 | 164:7cecd731882e | 46 | std::vector<std::string> getOutputs(void) const; |
| jmarkel44 | 220:dbe21411f962 | 47 | |
| jmarkel44 | 164:7cecd731882e | 48 | // unregister the control with the output task |
| jmarkel44 | 164:7cecd731882e | 49 | void unregisterControl(void); |
| jmarkel44 | 220:dbe21411f962 | 50 | |
| jmarkel44 | 220:dbe21411f962 | 51 | void display(void); |
| jmarkel44 | 164:7cecd731882e | 52 | }; |
| jmarkel44 | 164:7cecd731882e | 53 | |
| jmarkel44 | 164:7cecd731882e | 54 | #endif |
