Package rst.communicationpatterns¶
Data types related to communication at the integration level.
One example is TaskState
which is
used in the task state pattern.
See also
- Corresponding data types in ROS
- http://www.ros.org/wiki/actionlib_msgs
Messages¶
Message TaskStateCollection¶
-
class
rst.communicationpatterns.
TaskStateCollection
¶ Collection of
TaskState
instances.Auto-generated.
-
element
¶ Type: array of rst.communicationpatterns.TaskState
The individual elements of the collection.
Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific.
-
message TaskStateCollection {
/**
* The individual elements of the collection.
*
* Constraints regarding the empty collection, sorting, duplicated
* entries etc. are use case specific.
*/
repeated TaskState element = 1;
}
Message TaskState¶
-
class
rst.communicationpatterns.
TaskState
¶ Represents the initiation or update of a potentially long-running task.
The task is represented as a current state (
state
field) and a datum or “specification” (represented by thewire_schema
andpayload
fields).See also
- A detailed description of the task state protocol
- http://opensource.cit-ec.de/projects/xtt/wiki/TaskStateProtocol
Code author: Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
@create_collection
-
origin
¶ Type: rst.communicationpatterns.TaskState.Origin
Describes the origin of the update.
Has to be SUBMITTER when the task is being initiated.
-
state
¶ Type: rst.communicationpatterns.TaskState.State
State to which the task should be updated.
Has to be INITIATED when the task is being initiated.
-
serial
¶ Type: UINT32
TODO
-
wire_schema
¶ Type: OCTET-VECTOR
Type of the payload blob.
This field and the
payload
field are intended to be processed by a (de)serialization mechanism that decodes/encodes the payload blob according to the type information in wireSchema.Todo
type should be ascii-string
-
payload
¶ Type: OCTET-VECTOR
See
wire_schema
.
message TaskState {
/**
* Possible states of the task an update of which the @ref
* .TaskState object represents.
*
* Initial task submission:
*
* Applicable in states: none (since initial submission)
*
* Possible values of @ref .state:
*
* * @ref .INITIATED
* * @ref .ACCEPTED
* * @ref .REJECTED
*
* Updated of an accepted task:
*
* Applicable in states: @ref .ACCEPTED
*
* Possible values of @ref .state:
*
* * @ref .UPDATE
* * @ref .UPDATE_REJECTED
*
* Aborting an accepted task:
*
* Applicable in states: @ref .ACCEPTED
*
* Possible values of @ref .state:
*
* * @ref .ABORT
* * @ref .ABORTED
* * @ref .ABORT_FAILED
*
* Final states:
*
* * @ref .RESULT_AVAILABLE
* * @ref .COMPLETED
* * @ref .FAILED
*
*/
enum State {
/**
* Client submits specification with @ref .INITIATED state.
*
* Server accepts or rejects task and publishes specification
* with @ref .ACCEPTED or @ref .REJECTED state accordingly.
*/
INITIATED = 0;
/**
* See @ref .INITIATED.
*/
ACCEPTED = 1;
/**
* See @ref .INITIATED.
*/
REJECTED = 2;
/**
* Client publishes (modified) specification with @ref .UPDATE
* state.
*
* Server accepts or rejects the update and publishes
* specification with @ref .ACCEPTED or @ref .UPDATE_REJECTED
* state accordingly.
*/
UPDATE = 3;
/**
* See @ref .UPDATE.
*/
UPDATE_REJECTED = 4;
/**
* Client publishes specification with @ref .ABORT state to
* request execution of the task to be aborted.
*
* Server accept or rejects this and publishes specification
* with @ref .ABORTED or @ref .ABORT_FAILED state accordingly.
*/
ABORT = 5;
/**
* See @ref .ABORT.
*/
ABORTED = 6;
/**
* See @ref .ABORT.
*/
ABORT_FAILED = 7;
/**
* @todo document
*/
RESULT_AVAILABLE = 8;
/**
* See @ref .RESULT_AVAILABLE.
*/
COMPLETED = 9;
/**
* See @ref .RESULT_AVAILABLE.
*/
FAILED = 10;
}
/**
* Describes the role of the component doing the update.
*/
enum Origin {
/**
* The task state update is performed by the submitter.
*/
SUBMITTER = 0;
/**
* The task state update is performed by the handler.
*/
HANDLER = 1;
}
/**
* Describes the origin of the update.
*
* Has to be @ref .Origin.SUBMITTER when the task is being
* initiated.
*/
required Origin origin = 1;
/**
* State to which the task should be updated.
*
* Has to be @ref .State.INITIATED when the task is being
* initiated.
*/
required State state = 2;
/**
* TODO
*/
required uint32 serial = 3;
/**
* Type of the payload blob.
*
* This field and the @ref .payload field are intended to be
* processed by a (de)serialization mechanism that decodes/encodes
* the payload blob according to the type information in
* wireSchema.
*
* @todo "type should be ascii-string"
*/
required bytes wire_schema = 4;
/**
* See @ref .wire_schema.
*/
required bytes payload = 5;
}
Message State¶
-
class
rst.communicationpatterns.TaskState.
State
¶ Possible states of the task an update of which the
TaskState
object represents.Initial task submission:
Applicable in states: none (since initial submission)
Possible values of
state
:- INITIATED
- ACCEPTED
- REJECTED
Updated of an accepted task:
Aborting an accepted task:
Final states:
- RESULT_AVAILABLE
- COMPLETED
- FAILED
-
INITIATED
¶ -
= 0
Client submits specification with INITIATED state.
Server accepts or rejects task and publishes specification with ACCEPTED or REJECTED state accordingly.
-
ACCEPTED
¶ -
= 1
See INITIATED.
-
REJECTED
¶ -
= 2
See INITIATED.
-
UPDATE
¶ -
= 3
Client publishes (modified) specification with UPDATE state.
Server accepts or rejects the update and publishes specification with ACCEPTED or UPDATE_REJECTED state accordingly.
-
UPDATE_REJECTED
¶ -
= 4
See UPDATE.
-
ABORT
¶ -
= 5
Client publishes specification with ABORT state to request execution of the task to be aborted.
Server accept or rejects this and publishes specification with ABORTED or ABORT_FAILED state accordingly.
-
ABORTED
¶ -
= 6
See ABORT.
-
ABORT_FAILED
¶ -
= 7
See ABORT.
-
RESULT_AVAILABLE
¶ -
= 8
Todo
document
-
COMPLETED
¶ -
= 9
See RESULT_AVAILABLE.
-
FAILED
¶ -
= 10
See RESULT_AVAILABLE.
enum State {
/**
* Client submits specification with @ref .INITIATED state.
*
* Server accepts or rejects task and publishes specification
* with @ref .ACCEPTED or @ref .REJECTED state accordingly.
*/
INITIATED = 0;
/**
* See @ref .INITIATED.
*/
ACCEPTED = 1;
/**
* See @ref .INITIATED.
*/
REJECTED = 2;
/**
* Client publishes (modified) specification with @ref .UPDATE
* state.
*
* Server accepts or rejects the update and publishes
* specification with @ref .ACCEPTED or @ref .UPDATE_REJECTED
* state accordingly.
*/
UPDATE = 3;
/**
* See @ref .UPDATE.
*/
UPDATE_REJECTED = 4;
/**
* Client publishes specification with @ref .ABORT state to
* request execution of the task to be aborted.
*
* Server accept or rejects this and publishes specification
* with @ref .ABORTED or @ref .ABORT_FAILED state accordingly.
*/
ABORT = 5;
/**
* See @ref .ABORT.
*/
ABORTED = 6;
/**
* See @ref .ABORT.
*/
ABORT_FAILED = 7;
/**
* @todo document
*/
RESULT_AVAILABLE = 8;
/**
* See @ref .RESULT_AVAILABLE.
*/
COMPLETED = 9;
/**
* See @ref .RESULT_AVAILABLE.
*/
FAILED = 10;
}
Message Origin¶
enum Origin {
/**
* The task state update is performed by the submitter.
*/
SUBMITTER = 0;
/**
* The task state update is performed by the handler.
*/
HANDLER = 1;
}