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/OutputTask/OutputTask.h
- Committer:
- jmarkel44
- Date:
- 2016-09-19
- Revision:
- 74:03ccf04998b5
- Parent:
- 72:3754b352f156
- Child:
- 77:43e0a3d9e536
File content as of revision 74:03ccf04998b5:
#ifndef OUTPUTTASK_H #define OUTPUTTASK_H #include <string> #include <stdio.h> void OutputTask(void const *args); void DisplayOutputs(void); #define OUTPUT_STR "output" typedef enum { CONTROL_OFF = 0, CONTROL_ON = 1 } ControlState; /***************************************************************************** * Control class ****************************************************************************/ class Control { private: std::string id; unsigned int priority; ControlState state; public: Control(std::string id, unsigned int priority, ControlState state) : id(id), priority(priority), state(state) {} void display() { printf("[%s | %s | %u]", id.c_str(), (state == CONTROL_ON) ? "ON" : "OFF", priority); } //void setId(string id) id(id) { } std::string getId() { return id; } void setState(ControlState _state) { state = _state; } }; #endif