Skip to content

Addressing Issue #552 #554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ArduinoIoTCloudTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ ArduinoIoTCloudTCP::ArduinoIoTCloudTCP()
, _get_ota_confirmation{nullptr}
#endif /* OTA_ENABLED */
{

cbor::encoder::iotcloud::commandEncoders();
cbor::decoder::iotcloud::commandDecoders();
}

/******************************************************************************
Expand Down
10 changes: 10 additions & 0 deletions src/cbor/IoTCloudMessageDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,13 @@
static ThingDetachCommandDecoder thingDetachCommandDecoder;
static LastValuesUpdateCommandDecoder lastValuesUpdateCommandDecoder;
static TimezoneCommandDownDecoder timezoneCommandDownDecoder;

namespace cbor { namespace decoder { namespace iotcloud {
void commandDecoders() {

Check warning on line 181 in src/cbor/IoTCloudMessageDecoder.cpp

View check run for this annotation

Codecov / codecov/patch

src/cbor/IoTCloudMessageDecoder.cpp#L181

Added line #L181 was not covered by tests
(void) otaUpdateCommandDecoder;
(void) thingUpdateCommandDecoder;
(void) thingDetachCommandDecoder;
(void) lastValuesUpdateCommandDecoder;
(void) timezoneCommandDownDecoder;
}

Check warning on line 187 in src/cbor/IoTCloudMessageDecoder.cpp

View check run for this annotation

Codecov / codecov/patch

src/cbor/IoTCloudMessageDecoder.cpp#L187

Added line #L187 was not covered by tests
}}}
8 changes: 8 additions & 0 deletions src/cbor/IoTCloudMessageDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,12 @@ class TimezoneCommandDownDecoder: public CBORMessageDecoderInterface {
MessageDecoder::Status decode(CborValue* iter, Message *msg) override;
};

namespace cbor { namespace decoder { namespace iotcloud {
/**
* Some link time optimization may exclude these classes to be instantiated
* thus it may be required to reference them from outside of this file
*/
void commandDecoders();
}}}

#endif /* ARDUINO_CBOR_MESSAGE_DECODER_H_ */
11 changes: 11 additions & 0 deletions src/cbor/IoTCloudMessageEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,14 @@
static DeviceBeginCommandEncoder deviceBeginCommandEncoder;
static OtaProgressCommandUpEncoder otaProgressCommandUpEncoder;
static TimezoneCommandUpEncoder timezoneCommandUpEncoder;

namespace cbor { namespace encoder { namespace iotcloud {
void commandEncoders() {

Check warning on line 164 in src/cbor/IoTCloudMessageEncoder.cpp

View check run for this annotation

Codecov / codecov/patch

src/cbor/IoTCloudMessageEncoder.cpp#L164

Added line #L164 was not covered by tests
(void) otaBeginCommandEncoder;
(void) thingBeginCommandEncoder;
(void) lastValuesBeginCommandEncoder;
(void) deviceBeginCommandEncoder;
(void) otaProgressCommandUpEncoder;
(void) timezoneCommandUpEncoder;
}

Check warning on line 171 in src/cbor/IoTCloudMessageEncoder.cpp

View check run for this annotation

Codecov / codecov/patch

src/cbor/IoTCloudMessageEncoder.cpp#L171

Added line #L171 was not covered by tests
}}}
7 changes: 7 additions & 0 deletions src/cbor/IoTCloudMessageEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,12 @@ class TimezoneCommandUpEncoder: public CBORMessageEncoderInterface {
MessageEncoder::Status encode(CborEncoder* encoder, Message *msg) override;
};

namespace cbor { namespace encoder { namespace iotcloud {
/**
* Some link time optimization may exclude these classes to be instantiated
* thus it may be required to reference them from outside of this file
*/
void commandEncoders();
}}}

#endif /* ARDUINO_CBOR_MESSAGE_ENCODER_H_ */
Loading