Erick / Mbed 2 deprecated ICE-F412

Dependencies:   mbed-rtos mbed

Committer:
jmarkel44
Date:
Tue Jan 24 19:06:45 2017 +0000
Revision:
1:b2e90cda7a5a
Parent:
0:61364762ee0e
Port from IAR F412 project

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jmarkel44 0:61364762ee0e 1 #ifndef CMDUTILS_H
jmarkel44 0:61364762ee0e 2 #define CMDUTILS_H
jmarkel44 0:61364762ee0e 3
jmarkel44 0:61364762ee0e 4 #include "global.h"
jmarkel44 0:61364762ee0e 5 #include <string>
jmarkel44 0:61364762ee0e 6 #include <stdio.h>
jmarkel44 0:61364762ee0e 7 #include <stdint.h>
jmarkel44 0:61364762ee0e 8
jmarkel44 0:61364762ee0e 9 typedef struct vregFile_tag {
jmarkel44 0:61364762ee0e 10 std::string fname;
jmarkel44 0:61364762ee0e 11 std::string id;
jmarkel44 0:61364762ee0e 12 float value;
jmarkel44 0:61364762ee0e 13 } VregFile_t;
jmarkel44 0:61364762ee0e 14
jmarkel44 0:61364762ee0e 15 typedef struct ioFile_tag {
jmarkel44 0:61364762ee0e 16 std::string fname;
jmarkel44 0:61364762ee0e 17 std::string id;
jmarkel44 0:61364762ee0e 18 std::string name;
jmarkel44 0:61364762ee0e 19 float min;
jmarkel44 0:61364762ee0e 20 float max;
jmarkel44 0:61364762ee0e 21 unsigned char node;
jmarkel44 0:61364762ee0e 22 unsigned char rtype;
jmarkel44 0:61364762ee0e 23 unsigned char type;
jmarkel44 0:61364762ee0e 24 unsigned char size;
jmarkel44 0:61364762ee0e 25 unsigned char order;
jmarkel44 0:61364762ee0e 26 unsigned char rfreq;
jmarkel44 0:61364762ee0e 27 unsigned char argc;
jmarkel44 0:61364762ee0e 28 uint32_t reg;
jmarkel44 0:61364762ee0e 29 RegisterType_t regType;
jmarkel44 0:61364762ee0e 30 } IOFile_t;
jmarkel44 0:61364762ee0e 31
jmarkel44 0:61364762ee0e 32 typedef struct setpointControlFile_tag {
jmarkel44 0:61364762ee0e 33 std::string controlFile;
jmarkel44 0:61364762ee0e 34 std::string id; // control identifier
jmarkel44 0:61364762ee0e 35 int priority; // control priority
jmarkel44 0:61364762ee0e 36 std::string input; // control input
jmarkel44 0:61364762ee0e 37 std::string output; // control output
jmarkel44 0:61364762ee0e 38 double setpoint; // setpoint value
jmarkel44 0:61364762ee0e 39 double productFactor; // unused
jmarkel44 0:61364762ee0e 40 bool actingDir; // acting direction
jmarkel44 0:61364762ee0e 41 double tolerance;
jmarkel44 0:61364762ee0e 42
jmarkel44 0:61364762ee0e 43 } SetpointControlFile_t;
jmarkel44 0:61364762ee0e 44
jmarkel44 0:61364762ee0e 45 typedef struct timerControlFile_tag {
jmarkel44 0:61364762ee0e 46 std::string controlFile; // file containing control data
jmarkel44 0:61364762ee0e 47 std::string id; // timer identifier
jmarkel44 0:61364762ee0e 48 std::string output; // output to control
jmarkel44 0:61364762ee0e 49 unsigned int priority; // control priority
jmarkel44 0:61364762ee0e 50 unsigned int day;
jmarkel44 0:61364762ee0e 51 unsigned int startHour; // start hour (0-23)
jmarkel44 0:61364762ee0e 52 unsigned int startMin; // start minute (0-59)
jmarkel44 0:61364762ee0e 53 unsigned int startSec; // start second (0-59)
jmarkel44 0:61364762ee0e 54 unsigned int duration; // duration in seconds
jmarkel44 0:61364762ee0e 55 unsigned int week; // every week, first week, ...
jmarkel44 0:61364762ee0e 56 } TimerControlFile_t;
jmarkel44 0:61364762ee0e 57
jmarkel44 0:61364762ee0e 58 void createVregFile(VregFile_t&);
jmarkel44 0:61364762ee0e 59 void createIOFile(IOFile_t&);
jmarkel44 0:61364762ee0e 60 void createSetpointControlFile(SetpointControlFile_t&);
jmarkel44 0:61364762ee0e 61 void createTimerControlFile(TimerControlFile_t&);
jmarkel44 0:61364762ee0e 62 #endif