Interface: tos.interfaces.ArbiterInfo

interface ArbiterInfo

Please refer to TEP 108 for more information about this interface and its intended use.

The ArbiterInfo interface allows a component to query the current status of an arbiter. It must be provided by ALL arbiter implementations, and can be used for a variety of different purposes. Normally it will be used in conjunction with the Resource interface for performing run time checks on access rights to a particular shared resource.

Author:
Kevin Klues (klueska@cs.wustl.edu)

Commands
command bool inUse() Check whether a resource is currently allocated.
command uint8_t userId() Get the id of the client currently using a resource.

Commands - Details

inUse

command bool inUse()

Check whether a resource is currently allocated.

Returns:
TRUE If the resource being arbitrated is currently allocated to any of its users
FALSE Otherwise.

userId

command uint8_t userId()

Get the id of the client currently using a resource.

Returns:
Id of the current owner of the resource
0xFF if no one currently owns the resource