@@ -53,10 +53,15 @@ class TembooChoreo : public Process {
53
53
void setSettingsFileToRead (const String& filePath) { addParameter (" -r" + filePath);}
54
54
void setGatewayAddress (const String& addr) { addParameter (" -s" + addr);}
55
55
void addInputExpression (const String& inputName, const String& inputValue) { addParameter (" -f" + inputName + " :" + inputValue);}
56
+ void addInputWithSensor (const String& inputName, const String& inputValue) { addParameter (" -f" + inputName + " :" + inputValue);}
56
57
void addSensorInput (const String& sensorName, long sensorValue, const String& conversion) {addParameter (" -n" + sensorName + " :" + String (sensorValue) + " :" + conversion);}
57
58
void addSensorInput (const String& sensorName, long sensorValue) {addParameter (" -v" + sensorName + " :" + String (sensorValue));}
58
59
void addSensorInput (const String& sensorName, long sensorValue, const String& conversion, const String& calibrationValue) {addParameter (" -b" + sensorName + " :" + String (sensorValue) + " :" + conversion + " :" + calibrationValue);}
59
60
void addSensorInput (const String& sensorName, long sensorValue, const String& rawLow, const String& rawHigh, const String& scaleLow, const String& scaleHigh) {addParameter (" -m" + sensorName + " :" + String (sensorValue) + " :" + rawLow+ " :" + rawHigh+ " :" + scaleLow+ " :" + scaleHigh);}
61
+ void addSensorValue (const String& sensorName, long sensorValue, const String& conversion) {addParameter (" -n" + sensorName + " :" + String (sensorValue) + " :" + conversion);}
62
+ void addSensorValue (const String& sensorName, long sensorValue) {addParameter (" -v" + sensorName + " :" + String (sensorValue));}
63
+ void addSensorValue (const String& sensorName, long sensorValue, const String& conversion, const String& calibrationValue) {addParameter (" -b" + sensorName + " :" + String (sensorValue) + " :" + conversion + " :" + calibrationValue);}
64
+ void addSensorValue (const String& sensorName, long sensorValue, const String& rawLow, const String& rawHigh, const String& scaleLow, const String& scaleHigh) {addParameter (" -m" + sensorName + " :" + String (sensorValue) + " :" + rawLow+ " :" + rawHigh+ " :" + scaleLow+ " :" + scaleHigh);}
60
65
void setDeviceName (const String& deviceName) {addParameter (" -d" + deviceName);}
61
66
void setDeviceType (const String& deviceType) {addParameter (" -t" + deviceType);}
62
67
};
@@ -112,12 +117,12 @@ class TembooChoreo : public Stream {
112
117
void setAppKey (const String& appKey);
113
118
void setAppKey (const char * appKey);
114
119
115
- // sets the name of the choreo to be executed.
120
+ // Sets the name of the choreo to be executed.
116
121
// (required)
117
122
void setChoreo (const String& choreoPath);
118
123
void setChoreo (const char * choreoPath);
119
124
120
- // sets the name of the saved inputs to use when executing the choreo
125
+ // Sets the name of the saved inputs to use when executing the choreo
121
126
// (optional)
122
127
void setSavedInputs (const String& savedInputsName);
123
128
void setSavedInputs (const char * savedInputsName);
@@ -134,25 +139,35 @@ class TembooChoreo : public Stream {
134
139
void setDeviceName (const String& deviceName);
135
140
void setDeviceName (const char * deviceName);
136
141
137
- // sets an input to be used when executing a choreo.
142
+ // Sets an input to be used when executing a choreo.
138
143
// (optional or required, depending on the choreo being executed.)
139
144
void addInput (const String& inputName, const String& inputValue);
140
145
void addInput (const char * inputName, const char * inputValue);
141
146
void addInput (const char * inputName, const String& inputValue);
142
147
void addInput (const String& inputName, const char * inputValue);
143
148
149
+ // Sets a Choreo input that contains a sensor value to be converted by Temboo
150
+ void addInputWithSensor (const String& inputName, const String& inputValue);
151
+ void addInputWithSensor (const char * inputName, const String& inputValue);
152
+ void addInputWithSensor (const char * inputName, const char * inputValue);
153
+ // Keeping legacy methods
144
154
void addInputExpression (const String& inputName, const String& inputValue);
145
155
void addInputExpression (const char * inputName, const String& inputValue);
146
156
void addInputExpression (const char * inputName, const char * inputValue);
147
157
148
- // sets in input that is using a sensor value. Different parameters are needed depending
158
+ // Sets in input that is using a sensor value. Different parameters are needed depending
149
159
// on the type of sensor being used.
160
+ void addSensorValue (const char * sensorName, int sensorValue, const char * conversion);
161
+ void addSensorValue (const char * sensorName, int sensorValue);
162
+ void addSensorValue (const char * sensorName, int sensorValue, const char * conversion, const char * calibrationValue);
163
+ void addSensorValue (const char * sensorName, int sensorValue, const char * rawLow, const char * rawHigh, const char * scaleLow, const char * scaleHigh);
164
+ // Keeping legacy methods
150
165
void addSensorInput (const char * sensorName, int sensorValue, const char * conversion);
151
166
void addSensorInput (const char * sensorName, int sensorValue);
152
167
void addSensorInput (const char * sensorName, int sensorValue, const char * conversion, const char * calibrationValue);
153
168
void addSensorInput (const char * sensorName, int sensorValue, const char * rawLow, const char * rawHigh, const char * scaleLow, const char * scaleHigh);
154
-
155
- // sets an output filter to be used to process the choreo output
169
+
170
+ // Sets an output filter to be used to process the choreo output
156
171
// (optional)
157
172
void addOutputFilter (const char * filterName, const char * filterPath, const char * variableName);
158
173
void addOutputFilter (const String& filterName, const char * filterPath, const char * variableName);
@@ -163,12 +178,12 @@ class TembooChoreo : public Stream {
163
178
void addOutputFilter (const char * filterName, const String& filterPath, const String& variableName);
164
179
void addOutputFilter (const String& filterName, const String& filterPath, const String& variableName);
165
180
166
- // run the choreo using the current input info
181
+ // Run the choreo using the current input info
167
182
int run ();
168
- // run the choreo with a user specified timeout
183
+ // Run the choreo with a user specified timeout
169
184
int run (uint16_t timeoutSecs);
170
185
171
- // run the choreo on the Temboo server at the given IP address and port
186
+ // Run the choreo on the Temboo server at the given IP address and port
172
187
int run (IPAddress addr, uint16_t port);
173
188
int run (IPAddress addr, uint16_t port, uint16_t timeoutSecs);
174
189
0 commit comments