This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
forked from RobotWebTools/roslibjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize and improve docstring (RobotWebTools#562)
* Standardize JSDoc format and add proper types to JSDoc - Fix typos - For method JSDoc starting with a verb, standardize the verbs to be without the `-s` suffix - Add proper capitalization to JSDoc - Rephrase some JSDoc to make it clearer - Add parameter and return types to JSDoc - Add proper indication of optional parameters to JSDoc * Remove dead code in ActionListener * Lint whitespace and align ActionServer param name with JSDoc * Refactor Ros.js to align callback parameters with JSDoc * Update check-topics tests * Fix check-topics example test * Revert breaking changes and align docstring to impl as source of truth * Remove 'An object with the following keys' * Specify default param values explicitly in docstring Co-authored-by: Matthijs van der Burgh <[email protected]> * Fix typos * Specify more default param values Co-authored-by: Matthijs van der Burgh <[email protected]> Co-authored-by: Matthijs van der Burgh <[email protected]>
- Loading branch information
1 parent
c74032b
commit 4519171
Showing
33 changed files
with
400 additions
and
381 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/** | ||
* @fileoverview | ||
* @fileOverview | ||
* @author Brandon Alexander - [email protected] | ||
*/ | ||
|
||
|
@@ -9,7 +9,7 @@ var assign = require('object-assign'); | |
* Message objects are used for publishing and subscribing to and from topics. | ||
* | ||
* @constructor | ||
* @param values - object matching the fields defined in the .msg definition file | ||
* @param {Object} values - An object matching the fields defined in the .msg definition file. | ||
*/ | ||
function Message(values) { | ||
assign(this, values); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/** | ||
* @fileoverview | ||
* @fileOverview | ||
* @author Brandon Alexander - [email protected] | ||
*/ | ||
|
||
|
@@ -10,9 +10,9 @@ var ServiceRequest = require('./ServiceRequest'); | |
* A ROS parameter. | ||
* | ||
* @constructor | ||
* @param options - possible keys include: | ||
* * ros - the ROSLIB.Ros connection handle | ||
* * name - the param name, like max_vel_x | ||
* @param {Object} options | ||
* @param {Ros} options.ros - The ROSLIB.Ros connection handle. | ||
* @param {string} options.name - The param name, like max_vel_x. | ||
*/ | ||
function Param(options) { | ||
options = options || {}; | ||
|
@@ -21,10 +21,10 @@ function Param(options) { | |
} | ||
|
||
/** | ||
* Fetches the value of the param. | ||
* Fetch the value of the param. | ||
* | ||
* @param callback - function with the following params: | ||
* * value - the value of the param from ROS. | ||
* @param {function} callback - Function with the following params: | ||
* @param {Object} callback.value - The value of the param from ROS. | ||
*/ | ||
Param.prototype.get = function(callback) { | ||
var paramClient = new Service({ | ||
|
@@ -44,9 +44,10 @@ Param.prototype.get = function(callback) { | |
}; | ||
|
||
/** | ||
* Sets the value of the param in ROS. | ||
* Set the value of the param in ROS. | ||
* | ||
* @param value - value to set param to. | ||
* @param {Object} value - The value to set param to. | ||
* @param {function} callback - The callback function. | ||
*/ | ||
Param.prototype.set = function(value, callback) { | ||
var paramClient = new Service({ | ||
|
@@ -65,6 +66,8 @@ Param.prototype.set = function(value, callback) { | |
|
||
/** | ||
* Delete this parameter on the ROS server. | ||
* | ||
* @param {function} callback - The callback function. | ||
*/ | ||
Param.prototype.delete = function(callback) { | ||
var paramClient = new Service({ | ||
|
@@ -80,4 +83,4 @@ Param.prototype.delete = function(callback) { | |
paramClient.callService(request, callback); | ||
}; | ||
|
||
module.exports = Param; | ||
module.exports = Param; |
Oops, something went wrong.