Class SwitchControllerServiceRequest
The SwitchController service allows you stop a number of controllers and start a number of controllers, all in one single timestep of the controller_manager control loop.
To switch controllers, specify
- the list of controller names to start,
- the list of controller names to stop, and
- the strictness (BEST_EFFORT or STRICT)
- STRICT means that switching will fail if anything goes wrong (an invalid controller name, a controller that failed to start, etc. )
- BEST_EFFORT means that even when something goes wrong with on controller, the service will still try to start/stop the remaining controllers
- start the controllers as soon as their hardware dependencies are ready, will wait for all interfaces to be ready otherwise
- the timeout in seconds before aborting pending controllers. Zero for infinite
The return value "ok" indicates if the controllers were switched successfully or not. The meaning of success depends on the specified strictness.
Inheritance
System.Object
SwitchControllerServiceRequest
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZO.ROS.MessageTypes.ControllerManager
Assembly: Unity.ZeroSim.dll
Syntax
public class SwitchControllerServiceRequest : ZOROSMessageInterface
Constructors
| Improve this Doc View SourceSwitchControllerServiceRequest()
Declaration
public SwitchControllerServiceRequest()
SwitchControllerServiceRequest(String[], String[], Int32, Boolean, Double)
Declaration
public SwitchControllerServiceRequest(string[] start_controllers, string[] stop_controllers, int strictness, bool start_asap, double timeout)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | start_controllers | |
System.String[] | stop_controllers | |
System.Int32 | strictness | |
System.Boolean | start_asap | |
System.Double | timeout |
Fields
| Improve this Doc View SourceBEST_EFFORT
Declaration
public const int BEST_EFFORT = 1
Field Value
Type | Description |
---|---|
System.Int32 |
STRICT
Declaration
public const int STRICT = 2
Field Value
Type | Description |
---|---|
System.Int32 |
Type
Declaration
[JsonIgnore]
public static string Type
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceMessageType
Declaration
[JsonIgnore]
public string MessageType { get; }
Property Value
Type | Description |
---|---|
System.String |
start_asap
Declaration
public bool start_asap { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
start_controllers
Declaration
public string[] start_controllers { get; set; }
Property Value
Type | Description |
---|---|
System.String[] |
stop_controllers
Declaration
public string[] stop_controllers { get; set; }
Property Value
Type | Description |
---|---|
System.String[] |
strictness
Declaration
public int strictness { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
timeout
Declaration
public double timeout { get; set; }
Property Value
Type | Description |
---|---|
System.Double |