|
25 | 25 | #include <NotecardConnectionHandler.h> |
26 | 26 |
|
27 | 27 | #include "cbor/CBOREncoder.h" |
28 | | -#include "cbor/MessageDecoder.h" |
29 | | -#include "cbor/MessageEncoder.h" |
| 28 | +#include "cbor/IoTCloudMessageDecoder.h" |
| 29 | +#include "cbor/IoTCloudMessageEncoder.h" |
30 | 30 |
|
31 | 31 | /****************************************************************************** |
32 | 32 | * CONSTANTS |
@@ -309,7 +309,7 @@ void ArduinoIoTCloudNotecard::processCommand(const uint8_t *buf, size_t len) |
309 | 309 | DEBUG_VERBOSE("ArduinoIoTCloudNotecard::%s [%d] received %d bytes", __FUNCTION__, millis(), len); |
310 | 310 | CBORMessageDecoder decoder; |
311 | 311 |
|
312 | | - if (decoder.decode((Message*)&command, buf, len) != Decoder::Status::Error) { |
| 312 | + if (decoder.decode((Message*)&command, buf, len) != MessageDecoder::Status::Error) { |
313 | 313 | DEBUG_VERBOSE("ArduinoIoTCloudNotecard::%s [%d] received command id %d", __FUNCTION__, millis(), command.c.id); |
314 | 314 | switch (command.c.id) |
315 | 315 | { |
@@ -429,7 +429,7 @@ void ArduinoIoTCloudNotecard::sendCommandMsgToCloud(Message * msg_) |
429 | 429 | CBORMessageEncoder encoder; |
430 | 430 | NotecardConnectionHandler *notecard_connection = reinterpret_cast<NotecardConnectionHandler *>(_connection); |
431 | 431 |
|
432 | | - if (encoder.encode(msg_, data, bytes_encoded) == Encoder::Status::Complete) { |
| 432 | + if (encoder.encode(msg_, data, bytes_encoded) == MessageEncoder::Status::Complete) { |
433 | 433 | if (CBOR_LORA_PAYLOAD_MAX_SIZE < bytes_encoded) { |
434 | 434 | DEBUG_WARNING("Encoded %d bytes for Command Message. Exceeds maximum payload size of %d bytes, and cannot be sent to cloud.", bytes_encoded, CBOR_LORA_PAYLOAD_MAX_SIZE); |
435 | 435 | } else if (bytes_encoded > 0) { |
|
0 commit comments