class MethodBinding(AwaitedBinding):
A ROS2 service exposed as a Method on the declaring Component.
The request becomes the Method's Parameters (written before Call) and the response its FinalResultData. There is no Monitoring, since a service has no feedback. opensmi's Call takes no input arguments and returns a bare status code, so anything richer than a status is in FinalResultData when the call returns.
Two failures reach a client differently. A transport failure (nobody serving the path, or a server that went quiet) means the call did not happen and returns a real UA status code. An application failure (the service answered no) is Good plus the response in FinalResultData, unless success_field names the field carrying the verdict.
| Method | __post |
Refuse a custom implementation class that is not a subclass of the stock one. |
| Class Variable | kind |
Undocumented |
| Instance Variable | call |
Seconds to wait for the answer once the request has gone. Separate from server_timeout because "nothing is there" and "it is stuck" reach a client as different status codes. |
| Instance Variable | exclude |
Field patterns removing request fields, after include has narrowed. A selection that leaves the request unbuildable is refused at init instead of filled from a default. |
| Instance Variable | include |
Field patterns narrowing the request; empty means every field. |
| Instance Variable | method |
A subclass of opensmi.ros2.server.method.ROS2ServiceMethod, or None for the stock one. Python-only; refused when the Binding is constructed if it is not a subclass. |
| Instance Variable | name |
The Binding's name, also the Method's name. Its variables are named for the field path alone. |
| Instance Variable | path |
The ROS2 service. |
| Instance Variable | rename |
New browse names by field path, as on MonitoringBinding. |
| Instance Variable | request |
Builds the request from the Parameters, or None for the default. Python-only. |
| Instance Variable | required |
Whether the StartupSkill waits for the service server to be discovered before Running. |
| Instance Variable | response |
Field patterns removing response fields. |
| Instance Variable | response |
Field patterns narrowing the response. |
| Instance Variable | response |
New browse names for response fields, as rename does. |
| Instance Variable | response |
Turns the response into FinalResultData values, or None for the default. Python-only. |
| Instance Variable | server |
Seconds Call waits for a service server before giving up. |
| Instance Variable | service |
The ROS2 service type, package/srv/Name. Required, so the address space does not depend on start-up timing. A type whose package is not installed is fatal at init. |
| Instance Variable | startup |
Seconds that wait lasts, or None for the deployment's default. Refused when the Binding is constructed without required. |
| Instance Variable | success |
The name of a bool response field carrying the service's own verdict, or None. Never auto-detected: ROS2 has no standard success field. A field the response lacks, or one that is not a bool, is fatal at init. |
| Property | needs |
Return False: the declaration carries its type. |
| Property | response |
Return the response's field selection. |
| Property | selection |
Return the request's field selection. |
Refuse a custom implementation class that is not a subclass of the stock one.
| Raises | |
ImplementationClassError | When method_type does not derive from
opensmi.ros2.server.method.ROS2ServiceMethod. |
RequiredDeclarationError | When startup_timeout is declared without required, or is not positive. |
Seconds to wait for the answer once the request has gone. Separate from server_timeout because "nothing is there" and "it is stuck" reach a client as different status codes.
Field patterns removing request fields, after include has narrowed. A selection that leaves the request unbuildable is refused at init instead of filled from a default.
A subclass of opensmi.ros2.server.method.ROS2ServiceMethod, or None
for the stock one. Python-only; refused when the Binding is constructed if it is not a
subclass.
The Binding's name, also the Method's name. Its variables are named for the field path alone.
The ROS2 service type, package/srv/Name. Required, so the address space does not depend on start-up timing. A type whose package is not installed is fatal at init.
Seconds that wait lasts, or None for the deployment's default. Refused when the Binding is constructed without required.