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()
72
72
, _get_ota_confirmation{nullptr }
73
73
#endif /* OTA_ENABLED */
74
74
{
75
-
75
+ cbor::encoder::iotcloud::commandEncoders ();
76
+ cbor::decoder::iotcloud::commandDecoders ();
76
77
}
77
78
78
79
/* *****************************************************************************
Original file line number Diff line number Diff line change @@ -176,3 +176,13 @@ static ThingUpdateCommandDecoder thingUpdateCommandDecoder;
176
176
static ThingDetachCommandDecoder thingDetachCommandDecoder;
177
177
static LastValuesUpdateCommandDecoder lastValuesUpdateCommandDecoder;
178
178
static 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 {
63
63
MessageDecoder::Status decode (CborValue* iter, Message *msg) override ;
64
64
};
65
65
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
+
66
74
#endif /* ARDUINO_CBOR_MESSAGE_DECODER_H_ */
Original file line number Diff line number Diff line change @@ -159,3 +159,14 @@ static LastValuesBeginCommandEncoder lastValuesBeginCommandEncoder;
159
159
static DeviceBeginCommandEncoder deviceBeginCommandEncoder;
160
160
static OtaProgressCommandUpEncoder otaProgressCommandUpEncoder;
161
161
static 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 {
71
71
MessageEncoder::Status encode (CborEncoder* encoder, Message *msg) override ;
72
72
};
73
73
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
+ }}}
74
81
75
82
#endif /* ARDUINO_CBOR_MESSAGE_ENCODER_H_ */
You can’t perform that action at this time.
0 commit comments