Skip to content

Commit 366b395

Browse files
Merge ea78cbb into 613ccb9
2 parents 613ccb9 + ea78cbb commit 366b395

File tree

3 files changed

+34
-21
lines changed

3 files changed

+34
-21
lines changed

Diff for: README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,17 @@ MQTT communication is done via 3 MQTT topics:
6767
## selfupdate/currentstate
6868
| Topic| Direction | Description |
6969
|------| -------- | ----------- |
70-
| selfupdate/currentstate | OUT | This message is being sent once, on SUA start. It contains information about currently installed OS version.
70+
| selfupdate/currentstate | OUT | This message is being sent either once on SUA start or as an answer to response received by selfupdate/currentstate/get. It contains information about currently installed OS version. |
71+
72+
## selfupdate/currentstate/get
73+
| Topic| Direction | Description |
74+
|------| -------- | ----------- |
75+
| selfupdate/currentstate/get | IN | This message can be received at any point of time. Indicates that SUA should send back version of installed OS as current state. |
7176

7277
## selfupdate/desiredstatefeedback
7378
| Topic| Direction | Description |
7479
|------| -------- | ----------- |
75-
| selfupdate/desiredstatefeedback | OUT | This message is being sent by SUA to share current progress of triggered update process. This is the *OUT* counterpart of *selfupdate/desiredstate* input message.
80+
| selfupdate/desiredstatefeedback | OUT | This message is being sent by SUA to share current progress of triggered update process. This is the *OUT* counterpart of *selfupdate/desiredstate* input message. |
7681

7782
SUA supports 2 protocols depending on configuration: [link](docs/k8s.md) for Kubernetes-based Custom Objects or [link](docs/bfb.md) for Update Agent API.Default protocol is bfb.
7883

Diff for: docs/bfb.md

+22-19
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
11
# Detailed description of bfb (binding-for-backend) communication protocol
22

33
## Current state message
4-
5-
This is retained message sent by SUA on start-up.
6-
MQTT Topic: selfupdate/desiredstate
4+
This is retained message sent by SUA on start-up or as an answer to response for current state (then it is supplied with activityId field).
5+
MQTT Topic: selfupdate/currentstate
76
```
87
{
9-
"activityId": "",
8+
"activityId": "random-uuid",
109
"timestamp": 123456789,
1110
"payload": {
12-
"domains": [
11+
"softwareNodes": [
1312
{
14-
"id": "self-update",
15-
"components": [
16-
{
17-
"id": "os-image",
18-
"version": "1.0"
19-
}
20-
]
13+
"id": "os-image",
14+
"version": "1.0",
15+
"name": "System Image",
16+
"type": "IMAGE",
17+
"parameters": []
2118
}
22-
]
19+
],
20+
"hardwareNodes": [],
21+
"associations": []
2322
}
2423
}
2524
```
2625

27-
## Desired state
26+
## Current state request
27+
This message is a trigger to send back version of installed OS. Can be received at any point of time.
28+
MQTT Topic: selfupdate/currentstate/get
29+
```
30+
{
31+
"activityId": "random-uuid",
32+
"timestamp": 123456789
33+
}
34+
```
2835

36+
## Desired state
2937
This message indicates that SUA needs to perform an update operation.
3038
MQTT Topic: selfupdate/desiredstate
31-
3239
```
3340
{
3441
"activityId": "random-uuid",
@@ -56,10 +63,8 @@ MQTT Topic: selfupdate/desiredstate
5663
```
5764

5865
## Desired state feedback
59-
6066
This message contains information about SUA state - what agent is doing - installing, downloading or idle.
6167
MQTT Topic: selfupdate/desiredstatefeedback
62-
6368
```
6469
{
6570
"activityId": "random-uuid",
@@ -83,7 +88,6 @@ MQTT Topic: selfupdate/desiredstatefeedback
8388
```
8489

8590
## Description of statuses
86-
8791
Following combination of payload_status and action_status are possible:
8892
| payload_status | action_status | Description |
8993
|----------------|---------------|-------------|
@@ -96,7 +100,6 @@ Following combination of payload_status and action_status are possible:
96100
| COMPLETED | UPDATE_SUCCESS | Self-update succeeded |
97101

98102
## Description of other fields
99-
100103
| name | description |
101104
|------|-------------|
102105
| activityId | Random UUID as string (needs to be taken from desiredstate message and passed back in all feedback messages) |

Diff for: docs/testing/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ mosquitto_sub -t "selfupdate/currentstate"
6767
mosquitto_sub -t "selfupdate/desiredstatefeedback"
6868
```
6969

70+
## Trigger current state request
71+
```
72+
mosquitto_pub -t "selfupdate/currentstate/get" -f docs/testing/mqtt/current-state-get.json
73+
```
74+
7075
# Container
7176

7277
For testing the container variant, it shall be ensured that all the components are connected to the same network and using proper ports mapping, so that they would be able to communicate with each other.

0 commit comments

Comments
 (0)