getParameter
Syntax
Description
returns paramValue
= getParameter(nodeObj
,paramName
)paramValue
, that contains the value of the specified parameter
paramName
associated with the ROS 2 node
nodeObj
. If it fails to return the parameter value, this syntax
displays an error.
[
returns a paramValue
,status
] = getParameter(nodeObj
,paramName
)status
indicating whether the function was able to
successfully return the parameter value. If it fails to return the parameter value, this
syntax returns the paramValue
as an empty double
,
and the status
as false
without displaying an
error.
[
specifies the expected return datatype of paramValue
,status
] = getParameter(nodeObj
,paramName
,Datatype=dtype)paramValue
in the generated
code using the name-value argument Datatype
. You must specify this
syntax for code generation. This syntax supports the returned datatype to be
int64
, logical
, string
,
char
or double
.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2022b