Interface: tos.interfaces.ResourceDefaultOwner

interface ResourceDefaultOwner

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

Author:
Kevin Klues (klues@tkn.tu-berlin.edu)
Version:
$ $
Date:
$Date: 2007/02/04 20:06:42 $

Commands
command bool isOwner() Check if the user of this interface is the current owner of the Resource
command error_t release() Release control of the resource

Events
event void granted() Event sent to the resource controller giving it control whenever a resource goes idle.
event void immediateRequested() This event is signalled whenever the user of this interface currently has control of the resource, and another user requests it through the Resource.immediateRequest() command.
event void requested() This event is signalled whenever the user of this interface currently has control of the resource, and another user requests it through the Resource.request() command.

Commands - Details

isOwner

command bool isOwner()

Check if the user of this interface is the current owner of the Resource

Returns:
TRUE It is the owner
FALSE It is not the owner

release

command error_t release()

Release control of the resource

Returns:
SUCCESS The resource has been released and pending requests can resume.
FAIL You tried to release but you are not the owner of the resource

Events - Details

granted

event void granted()

Event sent to the resource controller giving it control whenever a resource goes idle. That is to say, whenever no one currently owns the resource, and there are no more pending requests

immediateRequested

event void immediateRequested()

This event is signalled whenever the user of this interface currently has control of the resource, and another user requests it through the Resource.immediateRequest() command. You may want to consider releasing a resource based on this event

requested

event void requested()

This event is signalled whenever the user of this interface currently has control of the resource, and another user requests it through the Resource.request() command. You may want to consider releasing a resource based on this event