Skip to content

Commit c254a15

Browse files
committed
Making release 9.0.0 (Ibis)
1 parent 5f3358d commit c254a15

File tree

5 files changed

+107
-75
lines changed

5 files changed

+107
-75
lines changed

CHANGELOG.md

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,2 @@
1-
# OB-USP-AGENT Changelog since Release 8.0.0
1+
# OB-USP-AGENT Changelog since Release 9.0.0
22

3-
## 2024-08-30 v8.0.9
4-
### Added
5-
- Application Layer Protocol Negotiation (ALPN) support for MQTT over TLS
6-
- Code maintenance improvements to MQTT MTP
7-
8-
## 2024-08-19 v8.0.8
9-
### Fixed
10-
- Dockerfile rewritten to use debian:stable and build libwebsockets [GH #95, #108]
11-
12-
## 2024-08-05 v8.0.7
13-
### Added
14-
- Improved MQTT MTP debug
15-
16-
### Fixed
17-
- USP Service acting as pure Controller does not accept responses unless Broker is in the USP Service's Controller table
18-
19-
## 2024-07-29 v8.0.6
20-
### Fixed
21-
- Get requests with max_depth >= 0x80000000 should return full sub-tree
22-
- USP Connect record not always sent immediately after connection on MQTT
23-
24-
### Removed
25-
- Unmaintained MQTT tests
26-
27-
## 2024-07-08 v8.0.5
28-
### Fixed
29-
- MQTT keep alive can now be completely disabled (if required) when linking with libmosquitto v2.0.x
30-
- OBUSPA should subscribe to all topics indicated by the subscribe-topic user properties in the CONNACK [R-MQTT.15]
31-
- OBUSPA should delete pending USP notifications (on MQTT MTP) if notification has expired whilst waiting to be sent
32-
- MQTT connection blocks for too long if server is unresponsive. To workaround the underlying issue in libmosquitto, OBUSPA tests for server responsiveness by transiently connecting, before proceeding with the libmosquitto connect (if responsive).
33-
- OBUSPA should disconnect if unable to subscribe to anything [R-MQTT.17]
34-
- Device.MQTT.Client.{i}.Name should be auto-assigned by the agent, if not given at creation time, and immutable thereafter
35-
- Device.MQTT.Client.{i}.RequestResponseInfo should control whether response information is requested in the CONNECT frame. Previously it was always requested, regardless of the value of the parameter
36-
- Removed unimplemented parameter: Device.MQTT.Client.{i}.RequestProblemInfo
37-
- Modifying MQTT KeepAliveTime should not force a reconnect
38-
- MQTTv5 Assigned Client Identifier is not being saved in Device.MQTT.Client.{i}.ClientID
39-
- MQTT ConnectRetryTime parameter modifications should apply at the next retry [GH #109]
40-
- MQTT CleanSession and CleanStart parameter modifications should apply at the next retry
41-
- STOMP ServerRetryMaxInterval parameter modifications should apply at the next retry
42-
43-
### Added
44-
- Device.LocalAgent.X_VANTIVA-COM_PreConnectTimeout controls how long to wait for the can_mtp_connect vendor hook to allow connection, before connecting anyway
45-
- USP_REGISTER_Object_UniqueKey() validates that the unique key parameters have not already been registered
46-
47-
## 2024-06-10 v8.0.4
48-
### Fixed
49-
- Compiling without UDS fails [GH#110]
50-
- WebSocket client does not send Boot! event (regression introduced in v8.0)
51-
- WebSocket client not started after MTP dynamically added to controller table (regression introduced in v8.0)
52-
53-
## 2024-05-13 v8.0.3
54-
### Added
55-
- USP Broker: CLI initiated gets have been optimized to pass through the path to the USP Service, when possible
56-
- USP Broker: Support a USP Service registering Device.DNS.SD before Device.DNS (in separate register messages)
57-
- USP Broker: Workaround for USP Services which have limitations on the number of parameters requested in a get
58-
- USP Broker: Support additional DM elements registered directly under Device.
59-
60-
### Fixed
61-
- Get instances failures during path resolution should be gracefully ignored
62-
- An unused variable warning seen during cmake based builds has been addressed
63-
64-
65-
## 2024-04-29 v8.0.2
66-
### Added
67-
- VALUE_CHANGE_WILL_IGNORE flag support
68-
69-
### Fixed
70-
- Prevent accidental CLI socket stealing
71-
72-
## 2024-04-15 v8.0.1
73-
### Fixed
74-
- USP Broker should not assume hierarchically ordered fields in GSDM and get instances responses
75-
- STOMP connects shouldn't block the data model thread

RELEASES.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# Release History
22

3+
## Release 9.0.0
4+
* MQTT
5+
* Application Layer Protocol Negotiation (ALPN) support for MQTT over TLS
6+
* Device.MQTT.Client.{i}.ForceReconnect() support added
7+
* MQTTv5 Assigned Client Identifier is not being saved in Device.MQTT.Client.{i}.ClientID
8+
* MQTT keep alive can now be completely disabled (if required) when linking with libmosquitto v2.0.x
9+
* OBUSPA should subscribe to all topics indicated by the subscribe-topic user properties in the CONNACK [R-MQTT.15]
10+
* OBUSPA should delete pending USP notifications (on MQTT MTP) if notification has expired whilst waiting to be sent
11+
* MQTT connection blocks for too long if server is unresponsive. To workaround the underlying issue in libmosquitto, OBUSPA tests for server responsiveness by transiently connecting, before proceeding with the libmosquitto connect (if responsive).
12+
* OBUSPA should disconnect if unable to subscribe to anything [R-MQTT.17]
13+
* Device.MQTT.Client.{i}.Name should be auto-assigned by the agent, if not given at creation time, and immutable thereafter
14+
* Device.MQTT.Client.{i}.RequestResponseInfo should control whether response information is requested in the CONNECT frame. Previously it was always requested, regardless of the value of the parameter
15+
* Removed unimplemented parameter: Device.MQTT.Client.{i}.RequestProblemInfo
16+
* Modifying MQTT KeepAliveTime should not force a reconnect
17+
* MQTT ConnectRetryTime parameter modifications should apply at the next retry [GH #109]
18+
* MQTT CleanSession and CleanStart parameter modifications should apply at the next retry
19+
* USP Connect record not always sent immediately after connection on MQTT
20+
* Improved MQTT MTP debug
21+
* Code maintenance improvements to MQTT MTP
22+
* Removed unmaintained MQTT tests
23+
24+
* Websockets
25+
* WebSocket client does not send Boot! event (regression introduced in v8.0)
26+
* WebSocket client not started after MTP dynamically added to controller table (regression introduced in v8.0)
27+
28+
* STOMP
29+
* STOMP connects shouldn't block the data model thread
30+
* STOMP ServerRetryMaxInterval parameter modifications should apply at the next retry
31+
32+
* USP Broker
33+
* CLI initiated gets have been optimized to pass through the path to the USP Service, when possible
34+
* Support a USP Service registering Device.DNS.SD before Device.DNS (in separate register messages)
35+
* Workaround for USP Services which have limitations on the number of parameters requested in a get
36+
* Support additional DM elements registered directly under Device.
37+
* USP Broker should not assume hierarchically ordered fields in GSDM and get instances responses
38+
* USP Service acting as pure Controller does not accept responses unless Broker is in the USP Service's Controller table
39+
40+
* Data model
41+
* VALUE_CHANGE_WILL_IGNORE flag support
42+
* Get requests with max_depth >= 0x80000000 should return full sub-tree
43+
* Get instances failures during path resolution should be gracefully ignored
44+
* Device.LocalAgent.X_VANTIVA-COM_PreConnectTimeout controls how long to wait for the can_mtp_connect vendor hook to allow connection, before connecting anyway
45+
* USP_REGISTER_Object_UniqueKey() validates that the unique key parameters have not already been registered
46+
47+
* Miscellaneous
48+
* Dockerfile rewritten to use debian:stable and build libwebsockets [GH #95, #108]
49+
* Compiling without UDS fails [GH#110]
50+
* An unused variable warning seen during cmake based builds has been addressed
51+
* Prevent accidental CLI socket stealing
52+
53+
354
## Release 8.0.0
455
* USP Services Support
556
* USP Broker functionality

src/core/device_mqtt.c

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ void ScheduleMqttReconnect(mqtt_conn_params_t *mp);
145145
void ScheduleMQTTResubscribe(client_t *mqttclient, mqtt_subs_config_t *sub);
146146
int ClientNumberOfEntries(void);
147147
int SubscriptionNumberofEntries(int instance);
148+
int Operate_MQTTForceReconnect(dm_req_t *req, char *command_key, kv_vector_t *input_args, kv_vector_t *output_args);
148149

149150
/*********************************************************************//**
150151
**
@@ -234,6 +235,8 @@ int DEVICE_MQTT_Init(void)
234235
char *name_unique_keys[] = { "Name" };
235236
err |= USP_REGISTER_Object_UniqueKey(DEVICE_MQTT_CLIENT ".{i}", name_unique_keys, NUM_ELEM(name_unique_keys));
236237

238+
err |= USP_REGISTER_SyncOperation(DEVICE_MQTT_CLIENT ".{i}.ForceReconnect()", Operate_MQTTForceReconnect);
239+
237240
// Exit if any errors occurred
238241
if (err != USP_ERR_OK)
239242
{
@@ -1854,6 +1857,48 @@ int NotifyChange_MQTTConnectRetryMaxInterval(dm_req_t *req, char *value)
18541857
return USP_ERR_OK;
18551858
}
18561859

1860+
/*********************************************************************//**
1861+
**
1862+
** Operate_MQTTForceReconnect
1863+
**
1864+
** Implements sync command Device.MQTT.Client.{i}.ForceReconnect()
1865+
**
1866+
** \param req - pointer to structure identifying the operation in the data model
1867+
** \param command_key - pointer to string containing the command key for this operation
1868+
** \param input_args - vector containing input arguments and their values
1869+
** \param output_args - vector to return output arguments in
1870+
**
1871+
** \return USP_ERR_OK if successful
1872+
**
1873+
**************************************************************************/
1874+
int Operate_MQTTForceReconnect(dm_req_t *req, char *command_key, kv_vector_t *input_args, kv_vector_t *output_args)
1875+
{
1876+
mqtt_conn_params_t *mp;
1877+
char *status;
1878+
1879+
// Determine mqtt client to be updated
1880+
mp = FindMqttParamsByInstance(inst1);
1881+
USP_ASSERT(mp != NULL);
1882+
1883+
// Exit if connection is disabled (reconnect only if the MQTT client is currently connected to the MQTT broker)
1884+
if (mp->enable == false)
1885+
{
1886+
return USP_ERR_OK;
1887+
}
1888+
1889+
// Exit if MQTT client is not currently connected to the MQTT broker (do nothing in this case)
1890+
status = (char *) MQTT_GetClientStatus(inst1);
1891+
if (strcmp(status, "Connected") != 0)
1892+
{
1893+
return USP_ERR_OK;
1894+
}
1895+
1896+
// Schedule a reconnect
1897+
ScheduleMqttReconnect(mp);
1898+
1899+
return USP_ERR_OK;
1900+
}
1901+
18571902
/*********************************************************************//**
18581903
**
18591904
** ScheduleMQTTReconnect

src/core/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@
4040
*/
4141

4242
/* Lines below main version may include patch version numbers */
43-
#define AGENT_SOFTWARE_VERSION "8.0.9"
43+
#define AGENT_SOFTWARE_VERSION "9.0.0"

src/vendor/CMakeLists.txt

100644100755
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,12 @@ target_include_directories(vendor
99
${PROJECT_SOURCE_DIR}/src/
1010
${PROJECT_SOURCE_DIR}/src/vendor
1111
${PROJECT_SOURCE_DIR}/src/include)
12+
13+
target_compile_definitions(vendor
14+
PRIVATE
15+
$<IF:$<BOOL:${ENABLE_STOMP}>,ENABLE_STOMP,DISABLE_STOMP> # DISABLE_STOMP is the define used in core
16+
$<$<BOOL:${ENABLE_MQTT}>:ENABLE_MQTT>
17+
$<$<BOOL:${ENABLE_COAP}>:ENABLE_COAP>
18+
$<$<BOOL:${ENABLE_WEBSOCKETS}>:ENABLE_WEBSOCKETS>
19+
$<$<BOOL:${ENABLE_UDS}>:ENABLE_UDS>
20+
_GNU_SOURCE=1)

0 commit comments

Comments
 (0)