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/TimerControl.cpp@28:c410a61238bb, 2016-09-08 (annotated)
- Committer:
- jmarkel44
- Date:
- Thu Sep 08 20:12:04 2016 +0000
- Revision:
- 28:c410a61238bb
- Parent:
- 19:9bc8fabeddfa
- Child:
- 33:cb765aefa1b5
- Child:
- 35:6235ef67faa1
implement the load function; ;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmarkel44 | 19:9bc8fabeddfa | 1 | /****************************************************************************** |
jmarkel44 | 19:9bc8fabeddfa | 2 | * |
jmarkel44 | 19:9bc8fabeddfa | 3 | * File: TimerControl.cpp |
jmarkel44 | 19:9bc8fabeddfa | 4 | * Desciption: ICE Setpoint Control Class implementation |
jmarkel44 | 19:9bc8fabeddfa | 5 | * |
jmarkel44 | 19:9bc8fabeddfa | 6 | *****************************************************************************/ |
jmarkel44 | 19:9bc8fabeddfa | 7 | #include "TimerControl.h" |
jmarkel44 | 19:9bc8fabeddfa | 8 | #include "mDot.h" |
jmarkel44 | 19:9bc8fabeddfa | 9 | |
jmarkel44 | 19:9bc8fabeddfa | 10 | extern mDot *GLOBAL_mdot; |
jmarkel44 | 19:9bc8fabeddfa | 11 | |
jmarkel44 | 28:c410a61238bb | 12 | bool TimerControl::load(string _controlFile){ |
jmarkel44 | 19:9bc8fabeddfa | 13 | controlFile = _controlFile; |
jmarkel44 | 19:9bc8fabeddfa | 14 | |
jmarkel44 | 19:9bc8fabeddfa | 15 | // try to open the control file |
jmarkel44 | 19:9bc8fabeddfa | 16 | mDot::mdot_file file = GLOBAL_mdot->openUserFile(controlFile.c_str(), mDot::FM_RDONLY); |
jmarkel44 | 19:9bc8fabeddfa | 17 | if ( file.fd < 0 ) return false; |
jmarkel44 | 19:9bc8fabeddfa | 18 | |
jmarkel44 | 19:9bc8fabeddfa | 19 | return true; |
jmarkel44 | 19:9bc8fabeddfa | 20 | } |
jmarkel44 | 19:9bc8fabeddfa | 21 |