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.
This pull request includes several updates across multiple files in the project, focusing on copyright updates, improved functionality for handling commands, and minor refactoring to streamline the code. Below is a summary of the most important changes:
Command Handling Enhancements:
cmd
method in the southbound driver, allowing the handling of device commands with a data object passed as a buffer (lib/js-edge-driver/docs/driver.md
,lib/js-edge-driver/lib/driver.js
) [1] [2].Driver
class to route command messages (cmd/#
) to the appropriate handler, ensuring proper processing of device commands (lib/js-edge-driver/lib/driver.js
) [1] [2].Code Refactoring and Cleanup:
fs
,sparkplugValue
,util
,Long
) and streamlined existing imports to improve code readability (acs-edge/lib/device.ts
,acs-edge/lib/devices/driver.ts
,acs-edge/lib/sparkplugNode.ts
) [1] [2] [3].writeMetrics
in theDriverConnection
class by adding logic to find and validate addresses, and to publish payloads (acs-edge/lib/devices/driver.ts
).Minor Functional Updates:
writeValToBuffer
by writing1
or0
based on the metric value (acs-edge/lib/helpers/typeHandler.ts
).DriverBroker
class to handle wildcard commands (cmd/#
) (acs-edge/lib/driverBroker.ts
).Documentation and Buffer Enhancements:
cmd
method for southbound drivers (lib/js-edge-driver/docs/driver.md
).BufferX
utilities to include methods for converting buffers to JSON and other types (lib/js-edge-driver/lib/bufferx.js
).