aboutsummaryrefslogtreecommitdiff
path: root/libraries/Bridge/Bridge.cpp
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-06-26 22:12:09 +0200
committerCristian Maglie <c.maglie@bug.st>2013-06-26 22:12:09 +0200
commit363a2c59946e1b6193372a34954a9c5e0d4f46fe (patch)
tree9c06c58d928e5905b6b1185c4eca5377a24d9fb1 /libraries/Bridge/Bridge.cpp
parent70bfc2f3300613119da419cbd6724e443037b1b0 (diff)
Moved Bridge.message* method on their own class.
Diffstat (limited to 'libraries/Bridge/Bridge.cpp')
-rw-r--r--libraries/Bridge/Bridge.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/libraries/Bridge/Bridge.cpp b/libraries/Bridge/Bridge.cpp
index 6e9cafc..c929ed8 100644
--- a/libraries/Bridge/Bridge.cpp
+++ b/libraries/Bridge/Bridge.cpp
@@ -58,32 +58,6 @@ void BridgeClass::begin() {
while (true);
}
-unsigned int BridgeClass::readMessage(uint8_t *buff, unsigned int size) {
- uint8_t tmp[] = { 'm' };
- return transfer(tmp, 1, buff, size);
-}
-
-void BridgeClass::writeMessage(const uint8_t *buff, unsigned int size) {
- uint8_t cmd[] = {'M'};
- transfer(cmd, 1, buff, size, NULL, 0);
-}
-
-void BridgeClass::writeMessage(const String& str) {
- writeMessage((uint8_t*) str.c_str(), str.length());
-}
-
-void BridgeClass::writeJSON(const String& str) {
- uint8_t cmd[] = {'J'};
- transfer(cmd, 1, (uint8_t*) str.c_str(), str.length(), NULL, 0);
-}
-
-unsigned int BridgeClass::messageAvailable() {
- uint8_t tmp[] = {'n'};
- uint8_t res[2];
- transfer(tmp, 1, res, 2);
- return (res[0] << 8) + res[1];
-}
-
void BridgeClass::put(const char *key, const char *value) {
// TODO: do it in a more efficient way
String cmd = "D";