@@ -53,10 +53,15 @@ class TembooChoreo : public Process {
5353 void setSettingsFileToRead (const String& filePath) { addParameter (" -r" + filePath);}
5454 void setGatewayAddress (const String& addr) { addParameter (" -s" + addr);}
5555 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);}
5657 void addSensorInput (const String& sensorName, long sensorValue, const String& conversion) {addParameter (" -n" + sensorName + " :" + String (sensorValue) + " :" + conversion);}
5758 void addSensorInput (const String& sensorName, long sensorValue) {addParameter (" -v" + sensorName + " :" + String (sensorValue));}
5859 void addSensorInput (const String& sensorName, long sensorValue, const String& conversion, const String& calibrationValue) {addParameter (" -b" + sensorName + " :" + String (sensorValue) + " :" + conversion + " :" + calibrationValue);}
5960 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);}
6065 void setDeviceName (const String& deviceName) {addParameter (" -d" + deviceName);}
6166 void setDeviceType (const String& deviceType) {addParameter (" -t" + deviceType);}
6267};
@@ -112,12 +117,12 @@ class TembooChoreo : public Stream {
112117 void setAppKey (const String& appKey);
113118 void setAppKey (const char * appKey);
114119
115- // sets the name of the choreo to be executed.
120+ // Sets the name of the choreo to be executed.
116121 // (required)
117122 void setChoreo (const String& choreoPath);
118123 void setChoreo (const char * choreoPath);
119124
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
121126 // (optional)
122127 void setSavedInputs (const String& savedInputsName);
123128 void setSavedInputs (const char * savedInputsName);
@@ -134,25 +139,35 @@ class TembooChoreo : public Stream {
134139 void setDeviceName (const String& deviceName);
135140 void setDeviceName (const char * deviceName);
136141
137- // sets an input to be used when executing a choreo.
142+ // Sets an input to be used when executing a choreo.
138143 // (optional or required, depending on the choreo being executed.)
139144 void addInput (const String& inputName, const String& inputValue);
140145 void addInput (const char * inputName, const char * inputValue);
141146 void addInput (const char * inputName, const String& inputValue);
142147 void addInput (const String& inputName, const char * inputValue);
143148
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
144154 void addInputExpression (const String& inputName, const String& inputValue);
145155 void addInputExpression (const char * inputName, const String& inputValue);
146156 void addInputExpression (const char * inputName, const char * inputValue);
147157
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
149159 // 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
150165 void addSensorInput (const char * sensorName, int sensorValue, const char * conversion);
151166 void addSensorInput (const char * sensorName, int sensorValue);
152167 void addSensorInput (const char * sensorName, int sensorValue, const char * conversion, const char * calibrationValue);
153168 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
156171 // (optional)
157172 void addOutputFilter (const char * filterName, const char * filterPath, const char * variableName);
158173 void addOutputFilter (const String& filterName, const char * filterPath, const char * variableName);
@@ -163,12 +178,12 @@ class TembooChoreo : public Stream {
163178 void addOutputFilter (const char * filterName, const String& filterPath, const String& variableName);
164179 void addOutputFilter (const String& filterName, const String& filterPath, const String& variableName);
165180
166- // run the choreo using the current input info
181+ // Run the choreo using the current input info
167182 int run ();
168- // run the choreo with a user specified timeout
183+ // Run the choreo with a user specified timeout
169184 int run (uint16_t timeoutSecs);
170185
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
172187 int run (IPAddress addr, uint16_t port);
173188 int run (IPAddress addr, uint16_t port, uint16_t timeoutSecs);
174189
0 commit comments