|
| 1 | +/* |
| 2 | +############################################################################### |
| 3 | +# |
| 4 | +# Temboo Arduino library |
| 5 | +# |
| 6 | +# Copyright 2015, Temboo Inc. |
| 7 | +# |
| 8 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | +# you may not use this file except in compliance with the License. |
| 10 | +# You may obtain a copy of the License at |
| 11 | +# |
| 12 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | +# |
| 14 | +# Unless required by applicable law or agreed to in writing, |
| 15 | +# software distributed under the License is distributed on an |
| 16 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, |
| 17 | +# either express or implied. See the License for the specific |
| 18 | +# language governing permissions and limitations under the License. |
| 19 | +# |
| 20 | +############################################################################### |
| 21 | +*/ |
| 22 | + |
| 23 | +#ifndef TEMBOOYUNSHIELD_H_ |
| 24 | +#define TEMBOOYUNSHIELD_H_ |
| 25 | + |
| 26 | +#include <Arduino.h> |
| 27 | + |
| 28 | +/////////////////////////////////////////////////////// |
| 29 | +// BEGIN ARDUINO YUN SHIELD SUPPORT |
| 30 | +/////////////////////////////////////////////////////// |
| 31 | + |
| 32 | +#include <Process.h> |
| 33 | + |
| 34 | +class TembooYunShieldChoreo : public Process { |
| 35 | + |
| 36 | + public: |
| 37 | + void begin() {Process::begin("temboo");} |
| 38 | + void setAccountName(const String& accountName) { addParameter("-a" + accountName);} |
| 39 | + void setAppKeyName(const String& appKeyName) { addParameter("-u" + appKeyName);} |
| 40 | + void setAppKey(const String& appKey) { addParameter("-p" + appKey);} |
| 41 | + void setChoreo(const String& choreo) { addParameter("-c" + choreo);} |
| 42 | + void setCredential(const String& credentialName) { addParameter("-e" + credentialName);} |
| 43 | + void setSavedInputs(const String& savedInputsName) { addParameter("-e" + savedInputsName);} |
| 44 | + void setProfile(const String& profileName) { addParameter("-e" + profileName);} |
| 45 | + void addInput(const String& inputName, const String& inputValue) { addParameter("-i" + inputName + ":" + inputValue);} |
| 46 | + void addOutputFilter(const String& filterName, const String& filterPath, const String& variableName) { addParameter("-o" + filterName + ":" + filterPath + ":" + variableName);} |
| 47 | + void setSettingsFileToWrite(const String& filePath) { addParameter("-w" + filePath);} |
| 48 | + void setSettingsFileToRead(const String& filePath) { addParameter("-r" + filePath);} |
| 49 | + void setGatewayAddress(const String& addr) { addParameter("-s" + addr);} |
| 50 | + |
| 51 | +}; |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +#endif //TEMBOOYUNSHIELD_H_ |
0 commit comments