Package org.ros.node.parameter
Interface ParameterTree
- All Known Implementing Classes:
AnonymousParmeterTree,DefaultParameterTree
public interface ParameterTree
Provides access to a
ParameterServer.
A parameter server is a shared, multi-variate dictionary that is accessible via network APIs. Nodes use this server to store and retrieve parameters at runtime. As it is not designed for high-performance, it is best used for static, non-binary data such as configuration parameters. It is meant to be globally viewable so that tools can easily inspect the configuration state of the system and modify if necessary.
- Author:
- damonkohler@google.com (Damon Kohler)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameterListener(String name, ParameterListener listener) voidaddParameterListener(GraphName name, ParameterListener listener) Subscribes to changes to the specified parameter.voidvoidDeletes a specified parameter.booleangetBoolean(String name) booleangetBoolean(String name, boolean defaultValue) booleangetBoolean(GraphName name) booleangetBoolean(GraphName name, boolean defaultValue) doubledoubledoubledoubleintgetInteger(String name) intgetInteger(String name, int defaultValue) intgetInteger(GraphName name) intgetInteger(GraphName name, int defaultValue) List<?>List<?>List<?>List<?>Map<?,?> Map<?,?> Map<?,?> Map<?,?> getNames()booleanbooleanSearch for parameter key on the Parameter Server.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Method Details
-
getBoolean
- Parameters:
name- the parameter name- Returns:
- the parameter value
- Throws:
ParameterNotFoundException- if the parameter is not foundParameterClassCastException- if the parameter is not the expected type
-
getBoolean
- See Also:
-
getBoolean
- Parameters:
name- the parameter namedefaultValue- the default value- Returns:
- the parameter value or the default value if the parameter does not exist
- Throws:
ParameterClassCastException- if the parameter exists and is not the expected type
-
getBoolean
- See Also:
-
getInteger
- Parameters:
name- the parameter name- Returns:
- the parameter value
- Throws:
ParameterNotFoundException- if the parameter is not foundParameterClassCastException- if the parameter is not the expected type
-
getInteger
- See Also:
-
getInteger
- Parameters:
name- the parameter namedefaultValue- the default value- Returns:
- the parameter value or the default value if the parameter does not exist
- Throws:
ParameterClassCastException- if the parameter exists and is not the expected type
-
getInteger
- See Also:
-
getDouble
- Parameters:
name- the parameter name- Returns:
- the parameter value
- Throws:
ParameterNotFoundException- if the parameter is not foundParameterClassCastException- if the parameter is not the expected type
-
getDouble
- See Also:
-
getDouble
- Parameters:
name- the parameter namedefaultValue- the default value- Returns:
- the parameter value or the default value if the parameter does not exist
- Throws:
ParameterClassCastException- if the parameter exists and is not the expected type
-
getDouble
- See Also:
-
getString
- Parameters:
name- the parameter name- Returns:
- the parameter value:w
- Throws:
ParameterNotFoundException- if the parameter is not foundParameterClassCastException- if the parameter is not the expected type
-
getString
- See Also:
-
getString
- Parameters:
name- the parameter namedefaultValue- the default value- Returns:
- the parameter value or the default value if the parameter does not exist
- Throws:
ParameterClassCastException- if the parameter exists and is not the expected type
-
getString
- See Also:
-
getList
- Parameters:
name- the parameter name- Returns:
- the parameter value
- Throws:
ParameterNotFoundException- if the parameter is not foundParameterClassCastException- if the parameter is not the expected type
-
getList
- See Also:
-
getList
- Parameters:
name- the parameter namedefaultValue- the default value- Returns:
- the parameter value or the default value if the parameter does not exist
- Throws:
ParameterClassCastException- if the parameter exists and is not the expected type
-
getList
- See Also:
-
getMap
- Parameters:
name- the parameter name- Returns:
- the parameter value
- Throws:
ParameterNotFoundException- if the parameter is not foundParameterClassCastException- if the parameter is not the expected type
-
getMap
- See Also:
-
getMap
- Parameters:
name- the parameter namedefaultValue- the default value- Returns:
- the parameter value or the default value if the parameter does not exist
- Throws:
ParameterClassCastException- if the parameter exists and is not the expected type
-
getMap
- See Also:
-
set
- Parameters:
name- the parameter namevalue- the value that the parameter will be set to
-
set
- See Also:
-
set
- Parameters:
name- the parameter namevalue- the value that the parameter will be set to
-
set
- See Also:
-
set
- Parameters:
name- the parameter namevalue- the value that the parameter will be set to
-
set
- See Also:
-
set
- Parameters:
name- the parameter namevalue- the value that the parameter will be set to
-
set
- See Also:
-
set
- Parameters:
name- the parameter namevalue- the value that the parameter will be set to
-
set
- See Also:
-
set
- Parameters:
name- the parameter namevalue- the value that the parameter will be set to
-
set
- See Also:
-
has
- Parameters:
name- the parameter name- Returns:
trueif a parameter with the given name exists,falseotherwise
-
has
- See Also:
-
delete
Deletes a specified parameter.- Parameters:
name- the parameter name
-
delete
- See Also:
-
search
Search for parameter key on the Parameter Server. Search starts in caller's namespace and proceeds upwards through parent namespaces until theParameterServerfinds a matching key.- Parameters:
name- the parameter name to search for- Returns:
- the name of the found parameter or
nullif no matching parameter was found
-
search
- See Also:
-
getNames
Collection<GraphName> getNames()- Returns:
- all known parameter names
-
addParameterListener
Subscribes to changes to the specified parameter.- Parameters:
name- the parameter name to subscribe tolistener- aParameterListenerthat will be called when the subscribed parameter changes
-
addParameterListener
-