You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes the issue that we previously did not define what the server should respond, when it does not have corresponding field registered. To fix this I added a status field to the response messages
Additionally i've added a ci script, so that you can run and fix formatting/linting issues locally. See: ci-rust.sh
The repository includes a CI script (`ci-rust.sh`) that runs all quality checks on the Rust implementation. This script is used both locally and in GitHub Actions
34
+
35
+
**Run all checks:**
36
+
```bash
37
+
./ci-rust.sh
38
+
# or explicitly
39
+
./ci-rust.sh all
40
+
```
41
+
42
+
**Run individual checks:**
43
+
```bash
44
+
./ci-rust.sh build # Build the project
45
+
./ci-rust.sh test# Run tests
46
+
./ci-rust.sh test-macros # Run macro tests
47
+
./ci-rust.sh fmt # Check code formatting
48
+
./ci-rust.sh clippy # Run clippy linter
49
+
./ci-rust.sh clippy-macros # Run clippy on macros
50
+
```
51
+
You can fix formatting or linter issues by adding the -fix suffix to the command. e.g: `./ci-rust.sh clippy-fix`
Other bus members can send a \texttt{parameter\_set\_req} message, which includes the field ID of the parameter and the new value.
84
-
Once the node receives the request, it attempts to set the internal parameter value and responds with a \texttt{parameter\_set\_confirmation} message containing a status code, the parameter ID, and the actual value. The status field indicates whether the operation was successful or provides an error code (see ParameterSetStatus enum in \ref{subsec:ParameterSetStatus}). The value field should contain the actual value read back from the parameter, not simply the value that was received in the request.
84
+
Once the node receives the request, it attempts to set the internal parameter value and responds with a \texttt{parameter\_set\_confirmation} message containing a status code, a field status, the parameter ID, and the actual value. The status field indicates whether the operation was successful or provides an error code (see ParameterSetStatus enum in \ref{subsec:ParameterSetStatus}). The \texttt{field\_status} indicates whether the parameter exists. If the parameter was not found (field\_status = NotFound) the status field should return InvalidParameterID. Otherwise, the value field should contain the actual value read back from the parameter and not simply the value that was received in the request.
85
+
85
86
86
87
When a parameter is internally modified through some automated system, the updated value must be sent as a \texttt{parameter\_set\_confirmation} message to the server with a \texttt{NodeToNodeModification} status code.
A parameter can optionally be locked through a \texttt{parameter\_set\_lock\_req} message .
90
91
After a parameter has been locked, it cannot be modified by an external node.
91
-
A parameter can only be unlocked by the locking node or the server.To lock a parameter, a node sends a \texttt{parameter\_set\_lock\_req} with the fieldID and the locking status (0=unlocked, 1=locked). The recieving node responds with a \texttt{parameter\_set\_lock\_confirmation}, confirming the sent fieldIDand the locking status. The receiving node also sends a \texttt{parameter\_set\_lock\_confirmation} to the server to update it on the locking status of the parameter.
92
+
A parameter can only be unlocked by the locking node or the server.To lock a parameter, a node sends a \texttt{parameter\_set\_lock\_req} with the fieldID and the locking status (0=unlocked, 1=locked). The recieving node responds with a \texttt{parameter\_set\_lock\_confirmation}, confirming the sent fieldID, the locking status, and a field status (see FieldStatus enum in \ref{subsec:FieldStatus}). If the parameter is not found the node should respond with a not found status(field\_status = NotFound) and the erroneous field id. The receiving node also sends a \texttt{parameter\_set\_lock\_confirmation} to the server to update it on the locking status of the parameter. When a parameter was not found, it does not communicate this with the server.
92
93
\paragraph{}
93
94
\subsubsection{Requesting Field Data}\label{subsubsec:requesting-field-data}
94
95
A field can be accessed through a \texttt{field\_get\_req} message, which contains the field ID.
95
-
Nodes respond with a \texttt{field\_get\_res} message, containing the field IDand the value of the field.
96
+
Nodes respond with a \texttt{field\_get\_res} message, containing the field ID, a field status (see FieldStatus enum in \ref{subsec:FieldStatus}), and the value of the field. If the field is not found (field\_status = NotFound), the field\_id should still contain the requested field ID from the request message, and the value field content is undefined.
96
97
97
98
\subsubsection{Field name Lookup}\label{subsubsec:field-name-lookup}
98
-
The field name lookup covers the case where nodes need to access fields from other nodes. Since they don't recieve the \texttt{field\_registration} messages, they don't know the fieldIDs of the named fields they want to access. \texttt{field\_id\_lookup\_req} messages contain the remote field name. The Node responds with a \texttt{field\_id\_lookup\_res} message, containing the fielID and the datatype of the field. A fieldID of 0 indicates that the field was not found.
99
+
The field name lookup covers the case where nodes need to access fields from other nodes. Since they don't recieve the \texttt{field\_registration} messages, they don't know the fieldIDs of the named fields they want to access. \texttt{field\_id\_lookup\_req} messages contain the remote field name. The Node responds with a \texttt{field\_id\_lookup\_res} message, containing the fieldID, the datatype of the field, and a field status (see FieldStatus enum in \ref{subsec:FieldStatus}). If the field is not found (field\_status = NotFound), the field\_id should still contain the requested field ID from the request message.
0 commit comments