generated from AMRC-FactoryPlus/acs-template
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a Driver connection type #280
Merged
Merged
Commits on Jun 20, 2024
-
This makes TypeScript a bit more bearable.
Configuration menu - View commit details
-
Copy full SHA for 668e52f - Browse repository at this point
Copy the full SHA 668e52fView commit details -
Run a broker for drivers to connect to
We are using the Aedes broker library. Create a broker and perform auth on clients. The broker URL to listen on and the location of the passwords for the drivers are taken from the environment rather than from the config as these will need to be synchronised with the driver deployment. This means they are Helm values rather than edge agent config items.
Configuration menu - View commit details
-
Copy full SHA for f8e14df - Browse repository at this point
Copy the full SHA f8e14dfView commit details -
Emit structured driver messages
The messages from a driver are too complicated to try to emit as positional arguments; emit an object instead. This means we can pull out and validate the data topic name too.
Configuration menu - View commit details
-
Copy full SHA for df852b7 - Browse repository at this point
Copy the full SHA df852b7View commit details -
These tasks are too small to go in Jira, and some will probably outlive this project.
Configuration menu - View commit details
-
Copy full SHA for 1c65a6b - Browse repository at this point
Copy the full SHA 1c65a6bView commit details -
Device represents a Sparkplug Device, and clearly lives on the Edge Agent side of the divide. It should not have any connection-specific functionality. Where there was specific code, this was concerned with arranging to subscribe to addresses on the southbound connection. Handle this in the Connection class instead.
Configuration menu - View commit details
-
Copy full SHA for 81f4942 - Browse repository at this point
Copy the full SHA 81f4942View commit details -
Configuration menu - View commit details
-
Copy full SHA for d89ac3d - Browse repository at this point
Copy the full SHA d89ac3dView commit details -
Implement a Driver connection type
This sits alongside the other connection types, for now, and speaks my new driver protocol. This doesn't handle CMDs or errors correctly yet, but otherwise works. I'm not entirely sure how to handle drivers that want to poll themselves. Currently the EA keeps sending poll messages regardless, and drivers like OPCUA can just not subscribe, and use the group poll instruction instead. I have disabled the watchdog timeout; it fires much too quickly when you're pretending to be a device manually. I'm not sure a fixed timeout with no ping is the right thing to do anyway; there are valid reasons why a connection might not speak for 10s.
Configuration menu - View commit details
-
Copy full SHA for f332d35 - Browse repository at this point
Copy the full SHA f332d35View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b10386 - Browse repository at this point
Copy the full SHA 0b10386View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.