Package rst.communicationpatterns¶
Not documented
Messages¶
Message ResourceAllocation¶
-
class
rst.communicationpatterns.
ResourceAllocation
¶ Allocate resources for exclusive access with a certain priority and estimated duration.
The type is meant to be exchanged between a scheduling component and its clients based on the current state in the allocations life cycle. Target resources can be specified by one or more string identifiers. In order to allow a scheduling component to arbitrate between allocations, also an initiator (human or system), and a conflict resolution strategy have to be specified.
Code author: Patrick Holthaus <patrick.holthaus@uni-bielefeld.de>
-
id
¶ Type: ASCII-STRING
Identifier of the current resource allocation attempt, i.e., not the resource itself.
-
state
¶ Type: rst.communicationpatterns.ResourceAllocation.State
Current state of resource allocation.
-
priority
¶ Type: rst.communicationpatterns.ResourceAllocation.Priority
Priority of resource allocation.
-
initiator
¶ Type: rst.communicationpatterns.ResourceAllocation.Initiator
Initiator of resource allocation.
-
policy
¶ Type: rst.communicationpatterns.ResourceAllocation.Policy
Conflict resolution policy.
-
slot
¶ Type: rst.timing.Interval
Expected starting point and end of resource allocation.
-
constraints
¶ Type: rst.timing.Interval
In case of conflicts, outer limits for shifting the interval can be specified using a constraint interval.
-
resource_ids
¶ Type: array of ASCII-STRING
Specifies the resources that are requested for allocation.
The collection must contain at least one element. Elements can be specified in an arbitrary order. Given resources are treated in their entirety, i.e., if one element causes a conflict, the whole allocation is affected.
-
description
¶ Type: ASCII-STRING
A description of or reason for the resource allocation request.
-
message ResourceAllocation {
/**
* Life cycle of a single allocation attempt.
*/
enum State {
/**
* Initial state: Resource requested for allocation in by a
* client component.
*/
REQUESTED = 10;
/**
* Resource allocation scheduled by the server component when
* being requested.
*/
SCHEDULED = 20;
/**
* Resource allocation rejected by the server component when
* being requested, e.g. if the resource is busy.
*/
REJECTED = 30;
/**
* Resource allocation cancelled while scheduled (before
* allocation) by either server or client.
*/
CANCELLED = 40;
/**
* Resource is now allocated for the client at the server.
*/
ALLOCATED = 50;
/**
* Resource allocation aborted abnormally (during allocation)
* by either server or client.
*/
ABORTED = 60;
/**
* Resource released normally (after allocation) by either
* server or client.
*/
RELEASED = 70;
}
/**
* Priority ranking scheme for resource allocation when
* interacting with humans.
*
* Greater numeric values indicate higher priority.
*/
enum Priority {
/**
* No priority or unspecified.
*
* May be dismissed or cancelled at any time; dismiss if
* resource busy.
*/
NO = 0; //
/**
* Interaction not affected or no user interaction.
*
* Allowed to begin at later times.
*/
LOW = 1;
/**
* Interaction affected non-critically.
*
* Subsequent interactions only affected marginally; should
* start immediately.
*/
NORMAL = 2;
/**
* Interaction severely affected.
*
* Has to be be completed to ensure intact communication and
* common conceptions; start immediately.
*/
HIGH = 3;
/**
* Required for continued interaction or system operation.
*
* Start immediately.
*/
URGENT = 4;
/**
* Human or hardware safety threatened.
*
* Begin immediately; divert resources as necessary; overtime
* may be authorized.
*/
EMERGENCY = 5;
}
/**
* Specifies the request's initiator.
*
* Automatically or periodically occurring allocations can
* generally be considered system-initiated while e.g. routines
* invoked from verbal interactions are initiated by a human.
*/
enum Initiator {
/**
* Resource is required by a system component.
*/
SYSTEM = 0;
/**
* Resource is requested by a human interaction partner.
*/
HUMAN = 10;
}
/**
* Specifies a request's conflict resolution policy.
*
* I.e., gives the scheduler a hint how it is allowed to modify
* the request in case of conflicts.
*/
enum Policy {
/**
* Only allocate as a single, unmodified interval.
*/
PRESERVE = 0;
/**
* Allocate maximum amount of time available, shrink interval
* if needed.
*/
MAXIMUM = 10;
/**
* Allocate the first time slot available, shrink interval if
* needed.
*/
FIRST = 20;
}
/**
* Identifier of the current resource allocation attempt, i.e., not the
* resource itself.
*/
required string id = 10;
/**
* Current state of resource allocation.
*/
required State state = 20;
/**
* Priority of resource allocation.
*/
required Priority priority = 30;
/**
* Initiator of resource allocation.
*/
required Initiator initiator = 40;
/**
* Conflict resolution policy.
*/
required Policy policy = 50;
/**
* Expected starting point and end of resource allocation.
*/
required .rst.timing.Interval slot = 60;
/**
* In case of conflicts, outer limits for shifting the interval can be
* specified using a constraint interval.
*/
optional .rst.timing.Interval constraints = 70;
/**
* Specifies the resources that are requested for allocation.
*
* The collection must contain at least one element. Elements can
* be specified in an arbitrary order. Given resources are treated
* in their entirety, i.e., if one element causes a conflict, the
* whole allocation is affected.
*/
repeated string resource_ids = 80;
/**
* A description of or reason for the resource allocation request.
*/
optional string description = 90;
}
Message State¶
-
class
rst.communicationpatterns.ResourceAllocation.
State
¶ Life cycle of a single allocation attempt.
-
REQUESTED
¶ -
= 10
Initial state: Resource requested for allocation in by a client component.
-
SCHEDULED
¶ -
= 20
Resource allocation scheduled by the server component when being requested.
-
REJECTED
¶ -
= 30
Resource allocation rejected by the server component when being requested, e.g. if the resource is busy.
-
CANCELLED
¶ -
= 40
Resource allocation cancelled while scheduled (before allocation) by either server or client.
-
ALLOCATED
¶ -
= 50
Resource is now allocated for the client at the server.
-
ABORTED
¶ -
= 60
Resource allocation aborted abnormally (during allocation) by either server or client.
-
RELEASED
¶ -
= 70
Resource released normally (after allocation) by either server or client.
-
enum State {
/**
* Initial state: Resource requested for allocation in by a
* client component.
*/
REQUESTED = 10;
/**
* Resource allocation scheduled by the server component when
* being requested.
*/
SCHEDULED = 20;
/**
* Resource allocation rejected by the server component when
* being requested, e.g. if the resource is busy.
*/
REJECTED = 30;
/**
* Resource allocation cancelled while scheduled (before
* allocation) by either server or client.
*/
CANCELLED = 40;
/**
* Resource is now allocated for the client at the server.
*/
ALLOCATED = 50;
/**
* Resource allocation aborted abnormally (during allocation)
* by either server or client.
*/
ABORTED = 60;
/**
* Resource released normally (after allocation) by either
* server or client.
*/
RELEASED = 70;
}
Message Priority¶
-
class
rst.communicationpatterns.ResourceAllocation.
Priority
¶ Priority ranking scheme for resource allocation when interacting with humans.
Greater numeric values indicate higher priority.
-
NO
¶ -
= 0
No priority or unspecified.
May be dismissed or cancelled at any time; dismiss if resource busy.
-
LOW
¶ -
= 1
Interaction not affected or no user interaction.
Allowed to begin at later times.
-
NORMAL
¶ -
= 2
Interaction affected non-critically.
Subsequent interactions only affected marginally; should start immediately.
-
HIGH
¶ -
= 3
Interaction severely affected.
Has to be be completed to ensure intact communication and common conceptions; start immediately.
-
URGENT
¶ -
= 4
Required for continued interaction or system operation.
Start immediately.
-
EMERGENCY
¶ -
= 5
Human or hardware safety threatened.
Begin immediately; divert resources as necessary; overtime may be authorized.
-
enum Priority {
/**
* No priority or unspecified.
*
* May be dismissed or cancelled at any time; dismiss if
* resource busy.
*/
NO = 0; //
/**
* Interaction not affected or no user interaction.
*
* Allowed to begin at later times.
*/
LOW = 1;
/**
* Interaction affected non-critically.
*
* Subsequent interactions only affected marginally; should
* start immediately.
*/
NORMAL = 2;
/**
* Interaction severely affected.
*
* Has to be be completed to ensure intact communication and
* common conceptions; start immediately.
*/
HIGH = 3;
/**
* Required for continued interaction or system operation.
*
* Start immediately.
*/
URGENT = 4;
/**
* Human or hardware safety threatened.
*
* Begin immediately; divert resources as necessary; overtime
* may be authorized.
*/
EMERGENCY = 5;
}
Message Initiator¶
-
class
rst.communicationpatterns.ResourceAllocation.
Initiator
¶ Specifies the request’s initiator.
Automatically or periodically occurring allocations can generally be considered system-initiated while e.g. routines invoked from verbal interactions are initiated by a human.
-
SYSTEM
¶ -
= 0
Resource is required by a system component.
-
HUMAN
¶ -
= 10
Resource is requested by a human interaction partner.
-
enum Initiator {
/**
* Resource is required by a system component.
*/
SYSTEM = 0;
/**
* Resource is requested by a human interaction partner.
*/
HUMAN = 10;
}
Message Policy¶
-
class
rst.communicationpatterns.ResourceAllocation.
Policy
¶ Specifies a request’s conflict resolution policy.
I.e., gives the scheduler a hint how it is allowed to modify the request in case of conflicts.
-
PRESERVE
¶ -
= 0
Only allocate as a single, unmodified interval.
-
MAXIMUM
¶ -
= 10
Allocate maximum amount of time available, shrink interval if needed.
-
FIRST
¶ -
= 20
Allocate the first time slot available, shrink interval if needed.
-
enum Policy {
/**
* Only allocate as a single, unmodified interval.
*/
PRESERVE = 0;
/**
* Allocate maximum amount of time available, shrink interval
* if needed.
*/
MAXIMUM = 10;
/**
* Allocate the first time slot available, shrink interval if
* needed.
*/
FIRST = 20;
}