File tree Expand file tree Collapse file tree 5 files changed +38
-1
lines changed Expand file tree Collapse file tree 5 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ ArduinoIoTCloudTCP::ArduinoIoTCloudTCP()
7272, _get_ota_confirmation{nullptr }
7373#endif /* OTA_ENABLED */
7474{
75-
75+ cbor::encoder::iotcloud::commandEncoders ();
76+ cbor::decoder::iotcloud::commandDecoders ();
7677}
7778
7879/* *****************************************************************************
Original file line number Diff line number Diff line change @@ -176,3 +176,13 @@ static ThingUpdateCommandDecoder thingUpdateCommandDecoder;
176176static ThingDetachCommandDecoder thingDetachCommandDecoder;
177177static LastValuesUpdateCommandDecoder lastValuesUpdateCommandDecoder;
178178static TimezoneCommandDownDecoder timezoneCommandDownDecoder;
179+
180+ namespace cbor { namespace decoder { namespace iotcloud {
181+ void commandDecoders () {
182+ (void ) otaUpdateCommandDecoder;
183+ (void ) thingUpdateCommandDecoder;
184+ (void ) thingDetachCommandDecoder;
185+ (void ) lastValuesUpdateCommandDecoder;
186+ (void ) timezoneCommandDownDecoder;
187+ }
188+ }}}
Original file line number Diff line number Diff line change @@ -63,4 +63,12 @@ class TimezoneCommandDownDecoder: public CBORMessageDecoderInterface {
6363 MessageDecoder::Status decode (CborValue* iter, Message *msg) override ;
6464};
6565
66+ namespace cbor { namespace decoder { namespace iotcloud {
67+ /* *
68+ * Some link time optimization may exclude these classes to be instantiated
69+ * thus it may be required to reference them from outside of this file
70+ */
71+ void commandDecoders ();
72+ }}}
73+
6674#endif /* ARDUINO_CBOR_MESSAGE_DECODER_H_ */
Original file line number Diff line number Diff line change @@ -159,3 +159,14 @@ static LastValuesBeginCommandEncoder lastValuesBeginCommandEncoder;
159159static DeviceBeginCommandEncoder deviceBeginCommandEncoder;
160160static OtaProgressCommandUpEncoder otaProgressCommandUpEncoder;
161161static TimezoneCommandUpEncoder timezoneCommandUpEncoder;
162+
163+ namespace cbor { namespace encoder { namespace iotcloud {
164+ void commandEncoders () {
165+ (void ) otaBeginCommandEncoder;
166+ (void ) thingBeginCommandEncoder;
167+ (void ) lastValuesBeginCommandEncoder;
168+ (void ) deviceBeginCommandEncoder;
169+ (void ) otaProgressCommandUpEncoder;
170+ (void ) timezoneCommandUpEncoder;
171+ }
172+ }}}
Original file line number Diff line number Diff line change @@ -71,5 +71,12 @@ class TimezoneCommandUpEncoder: public CBORMessageEncoderInterface {
7171 MessageEncoder::Status encode (CborEncoder* encoder, Message *msg) override ;
7272};
7373
74+ namespace cbor { namespace encoder { namespace iotcloud {
75+ /* *
76+ * Some link time optimization may exclude these classes to be instantiated
77+ * thus it may be required to reference them from outside of this file
78+ */
79+ void commandEncoders ();
80+ }}}
7481
7582#endif /* ARDUINO_CBOR_MESSAGE_ENCODER_H_ */
You can’t perform that action at this time.
0 commit comments