-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add willCheckConsistency option to enable/disable message consistency…
… checking (#947) Currently, when a publisher/client sends a topic/request, it will check the consistency of the message to be sent. For example, the following code will lead to an exception: ```js const pub_ = this.node.createPublisher('sensor_msgs/msg/JointState', 'topic_js'); const stringMsgObject = rclnodejs.createMessageObject('sensor_msgs/msg/JointState'); stringMsgObject.header.frame_id = '0'; ``` Because the `stamp` in `header` is not initialized. This patch adds an additional option for node when initializing, which is `willCheckConsistency` (default is `false`), so the code above can run as expected with the `stamp` initialized with default value. Meanwhile, user can set it to `true` to check the consistency intentionally. To achieve, this patch implements: 1. Add `willCheckConsistency` to the node option. 2. Update `message.dot` accordingly to check the consistency based on the node option above. 3. Update the unit tests: - test/test-security-related.js Fix: #937
- Loading branch information
Showing
7 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters