Removes the indoorairquality and airquality interfaces as the
plugin isn't the right place for these sort of voncersion.
Instead, this PR specifies the individual compounds that
for the base for air quality measurements and ties them down
to export raw data.
It's the client apps responsibility to translate those values
into Air Quality Index scales based on the location of user. I.e.
while Europe would use the CAQI (Common Air Quality Index), the
US would use the EPA AQI etc.
It can happen that a plugin calls finish() in a slot which normally would be dispatched before the timeout
but due to high system load the slot is invoked only after the timeout. This in turn would cause Qt to also queue up
this timeout slot and by the time the system processes slots, the plugin comes in first and we'd fire an aborted()
signal in the plugin after it called finish(), potentially badly breaking the plugin as a plugin developer would not
expect this to happen. So we'll have to verify here that the plugin did not finish() by now before aborting.
nymea:app already implements this and many plugins do too. Apparently
most of the radiator thermostats support this, so it's worth making it
part of the interface.
This gives plugin developers a chance to finish() an info on their
own in an aborted() handler and set a custom error code and
displayMessage without causing a "finishing an already finished object"
warning.
CoIoT is a shelly specific extensions to CoAP:
It adds a new Request code which is not part of the CoAP spec
as well as using CoAP multicast (which is part of CoAP).
This commit
* renames "statusCode" to "reqRspCode" which describes
the actual field more precisely as it is in fact a Request or Response
code, not a status code.
* Allows joining multicast groups, by default using the CoAP specified
multicast address.
* Allows setting custom Request codes in requests, as well as
processing the PDUs Request/response code by the client.
* Fixed an indexOutOfRange warning when creating coap requests
because the first addOption() call was calling
m_options.insert(1) on an empty list.
* Old code was appending multiple UDP datagrams to a single big Coap
message, however, Coap is specified to only send s single datagram
per message. The datagram length specifies the payload size.
* some boolean member variables weren't initialized which resulted in
occational wrong flags.
* Parsing had issues with determining the option length in some occations
and also would crash when receiving coap messages without any options
or payload. To get rid of the complex and erraneous index calculations,
the entire package parsing is now using a DataStream.
(This makes it work with Shelly devices)
Fixes a theoretical memory leak (m_cacheSettings wasn't delete)
which isn't really an issue in practice but valgrind complains on it.
Fixes a typo: m_reties -> m_retries