Undocumented
| Class | |
Context object for storing MsgSpec instances and related metadata. |
| Exception | |
Undocumented |
| Function | convert |
Convert constant value declaration to python value. Does not do type-checking, so ValueError or other exceptions may be raised. |
| Function | get |
Determine the file system path for the specified .msg on search_path. |
| Function | get |
Determine the file system path for the specified .srv on path. |
| Function | load |
Compute dependencies of spec and load their MsgSpec dependencies into msg_context. |
| Function | load |
Load message specification for specified type. |
| Function | load |
Add the list of message types that spec depends on to depends. |
| Function | load |
Convert the .msg representation in the file to a MsgSpec instance. |
| Function | load |
Load message specification from a string. |
| Function | load |
Load service specification for specified type. |
| Function | load |
Convert the .srv representation in the file to a SrvSpec instance. |
| Function | load |
Load SrvSpec from the .srv file. |
| Function | _load |
No summary |
| Function | _load |
No summary |
| Function | _strip |
Undocumented |
Convert constant value declaration to python value. Does not do type-checking, so ValueError or other exceptions may be raised.
| Parameters | |
| field | ROS field type, str |
| val | string representation of constant, str |
| Raises | |
Unknown exception | ValueError If unable to convert to python representation |
Unknown exception | InvalidMsgSpec If value exceeds specified integer width |
Determine the file system path for the specified .msg on search_path.
| Parameters | |
| package | name of package file is in, str |
| base | type name of message, e.g. 'Point2DFloat32', str |
| search | dictionary mapping message namespaces to a directory locations |
| ext | msg file extension. Override with EXT_SRV to search for services instead. |
| Returns | |
| filesystem path of requested file, str | |
| Raises | |
Unknown exception | MsgNotFound If message cannot be located. |
Determine the file system path for the specified .srv on path.
| Parameters | |
| package | name of package .srv file is in, str |
| base | type name of service, e.g. 'Empty', str |
| search | dictionary mapping message namespaces to a directory locations |
| Returns | |
| file path of .srv file in specified package, str | |
| Raises | |
Unknown exception | MsgNotFound If service file cannot be located. |
Compute dependencies of spec and load their MsgSpec dependencies into msg_context.
NOTE: msg_search_path is only for finding .msg files. .srv files have a separate and distinct search path. As services cannot depend on other services, it is not necessary to provide the srv search path here.
| Parameters | |
| msg | MsgContext instance to load dependencies into/from. |
| spec | MsgSpec or SrvSpec instance to load dependencies for. |
| msg | dictionary mapping message namespaces to a directory locations. |
| Raises | |
Unknown exception | MsgNotFound If dependency cannot be located. |
Load message specification for specified type.
NOTE: this will register the message in the msg_context.
| Parameters | |
| msg | MsgContext for finding loaded dependencies |
| msg | relative or full message type. |
| search | dictionary mapping message namespaces to a directory locations |
| Returns | |
MsgSpec instance, (str, MsgSpec) | |
| Raises | |
Unknown exception | MsgNotFound If message cannot be located. |
Add the list of message types that spec depends on to depends.
| Parameters | |
| msg | MsgContext instance to load dependencies into/from. |
| spec | message to compute dependencies for, MsgSpec/SrvSpec |
| search | dictionary mapping message namespaces to a directory locations |
| deps | for recursion use only, do not set |
| Returns | |
| list of dependency names, [str] | |
| Raises | |
Unknown exception | MsgNotFound If dependency cannot be located. |
Convert the .msg representation in the file to a MsgSpec instance.
NOTE: this will register the message in the msg_context.
| Parameters | |
| msg | Undocumented |
| file | path of file to load from, str |
| full | Undocumented |
| Returns | |
MsgSpec instance | |
| Raises | |
Unknown exception | InvalidMsgSpec: if syntax errors or other problems are detected in file |
Load message specification from a string.
NOTE: this will register the message in the msg_context.
| Parameters | |
| msg | MsgContext for finding loaded dependencies |
| text | .msg text , str |
| full | Undocumented |
| Returns | |
MsgSpec specification | |
| Raises | |
Unknown exception | InvalidMsgSpec If syntax errors or other problems are detected in file |
Load service specification for specified type.
NOTE: services are never registered in a MsgContext.
| Parameters | |
| msg | MsgContext for finding loaded dependencies |
| srv | relative or full message type. |
| search | dictionary mapping message namespaces to a directory locations |
| Returns | |
MsgSpec instance, (str, MsgSpec) | |
| Raises | |
Unknown exception | MsgNotFound If message cannot be located. |
Convert the .srv representation in the file to a SrvSpec instance.
| Parameters | |
| msg | MsgContext instance to load request/response messages into. |
| file | Undocumented |
| full | Undocumented |
| file | name of file to load from, str |
| Returns | |
SrvSpec instance | |
| Raises | |
Unknown exception | InvalidMsgSpec If syntax errors or other problems are detected in file |
Load SrvSpec from the .srv file.
:raises InvalidMsgSpec If syntax errors or other problems are detected in file
| Parameters | |
| msg | MsgContext instance to load request/response messages into. |
| text | .msg text , str |
| full | Undocumented |
| package | context to use for msg type name, i.e. the package name, or '' to use local naming convention. str |
| Returns | |
SrvSpec instance | |