AccessControl
JAUS inherently supports the concept of exclusive control of a service via the AccessControl
service. Typically, exclusive control is applied to command and control services such that one and only one client is allowed to modify the state of the vehicle at any time. For example, only one client can control vehicle movement, or change a sensor configuration. This prevents conflicting commands from multiple clients. In practice, due to the structure of JAUS, exclusive control occurs at the JAUS Component level, such that a client has exclusive control of all services on a Component. Therefore, support for cooperative control (where two clients independently control different capabilities) is highly-dependent on the JAUS Subsystem design.
Authority Codes
As part of the AccessControl
service, JAUS uses the concept of authority codes (or levels) to manage which clients are allowed to have exclusive control of a Component. These values range from 0 to 255 with 0 being the lowest authority and 255 being the highest. Every Component has an initial default authority code which dictates the minimum authority that a client must have before it is allowed to take control of the Component. The client's requesting authority must be higher than that of the Component's default authority. Therefore, a default authority of 255 indicates that no-one is allowed to take control of a component, and a default authority of 0 indicates that (almost) anyone is.
If a Component is already controlled, then clients with a requesting authority that is higher than or equal to the current contoller's authority can take control away from current controller.
Example: * If there is a Component (A1) with a default authority of 128, then only client's with an authority in the range [129, 255] can take control of Component A1. * If a client (C1) with an authority of 200 takes control of Component A1 then clients with an authority in the range [200, 255] can take control away from client C1, while clients with an authority in the range [129, 199] will be rejected.
Control Timeout
One consideration when dealing with exclusive control, is what happens if the current controller becomes unresponsive or goes offline. Based on the authority codes used in the System, this could prevent another client from taking control of the Component and could lead to unsafe sitations. To prevent this, JAUS supports the ability for a Component to release the current controller if does not re-assert control within the timeout interval. This timeout period is dictated by the Component and it's the client's responsibility to ensure that it re-asserts control before the timeout expires. A timeout value of 0 indicates that this functionality not supported by the Component.