#include <qptc10simulator.h>
|
void | reply (QString rply) |
|
Definition at line 9 of file qptc10simulator.h.
Definition at line 8 of file qptc10simulator.cpp.
QPidSimulator(QObject *parent=0)
QPTC10DeviceWPtr m_Device
QPTC10Simulator::~QPTC10Simulator |
( |
| ) |
|
|
virtual |
bool QPTC10Simulator::canReadLine |
( |
| ) |
const |
|
protected |
void QPTC10Simulator::printMessage |
( |
QString |
msg, |
|
|
QDateTime |
ts = QDateTime::currentDateTime() |
|
) |
| const |
|
protected |
qint64 QPTC10Simulator::readData |
( |
char * |
data, |
|
|
qint64 |
maxlen |
|
) |
| |
|
protected |
qint64 QPTC10Simulator::readLineData |
( |
char * |
data, |
|
|
qint64 |
maxlen |
|
) |
| |
|
protected |
void QPTC10Simulator::reply |
( |
QString |
rply | ) |
|
|
private |
bool QPTC10Simulator::waitForReadyRead |
( |
int |
msecs | ) |
|
|
protected |
qint64 QPTC10Simulator::writeData |
( |
const char * |
data, |
|
|
qint64 |
len |
|
) |
| |
|
protected |
Definition at line 42 of file qptc10simulator.cpp.
References DEBUG_PTC10SIM, m_Enabled, m_LoopEnabled, m_OutputLevel, m_RampPoint, m_RampRate, m_SetPoint, m_Temperature, printMessage(), and reply().
47 printMessage(tr(
"QPTC10Simulator::writeData %1, %2, %3").arg(data).arg(strlen(data)).arg(len));
50 if (cmd ==
"\"Control.PID.Mode?\"\n") {
52 }
else if (cmd ==
"\"Control.PID.Setpoint?\"\n") {
54 }
else if (cmd ==
"\"Control.PID.RampT?\"\n") {
56 }
else if (cmd ==
"\"Control.PID.Ramp?\"\n") {
58 }
else if (cmd ==
"outputEnable?\n") {
60 }
else if (cmd ==
"\"Control?\"\n") {
62 }
else if (cmd ==
"\"TC?\"\n") {
64 }
else if (cmd ==
"getOutput\n") {
66 }
else if (cmd ==
"getOutput.names\n") {
67 reply(
"Control, TC, Chan C, Chan D");
68 }
else if (cmd ==
"getOutput.units\n") {
69 reply(
"%, degC, V, W");
70 }
else if (cmd ==
"system.com.verbose medium\n") {
71 }
else if (cmd ==
"\"TC.PID.Mode?\"\n") {
72 reply(
"Error: non-exist");
73 }
else if (cmd ==
"\"Chan C.PID.Mode?\"\n") {
74 reply(
"Error: non-exist");
75 }
else if (cmd ==
"\"Chan D.PID.Mode?\"\n") {
78 QRegExp regex(
"\"Control\\.PID\\.Setpoint\"\\s+(\\S*)\\n");
80 if (regex.exactMatch(cmd)) {
85 QRegExp regex(
"\"Control\\.PID\\.Ramp\"\\s+(\\S*)\\n");
87 if (regex.exactMatch(cmd)) {
92 QRegExp regex(
"\"Control\\.PID\\.Mode\"\\s+(\\S*)\\n");
94 if (regex.exactMatch(cmd)) {
99 QRegExp regex(
"outputEnable\\s+(\\S*)\\n");
101 if (regex.exactMatch(cmd)) {
110 printMessage(tr(
"Unrecognized PTC10 Command %1").arg(cmd));
112 reply(tr(
"Error: %1").arg(cmd));
void printMessage(QString msg, QDateTime ts=QDateTime::currentDateTime()) const
QString QPTC10Simulator::m_CtrlMode |
|
private |
QString QPTC10Simulator::m_Enabled |
|
private |
QString QPTC10Simulator::m_LoopEnabled |
|
private |
QString QPTC10Simulator::m_OutputLevel |
|
private |
QString QPTC10Simulator::m_RampPoint |
|
private |
QString QPTC10Simulator::m_RampRate |
|
private |
QStringList QPTC10Simulator::m_Replies |
|
private |
QString QPTC10Simulator::m_SetPoint |
|
private |
QString QPTC10Simulator::m_Temperature |
|
private |
The documentation for this class was generated from the following files: