This class can be used in a Jupyter Notebook to create and configure a protocol
To create it use the add_protocol method on another protocol
Functions
Initialize self. See help(type(self)) for accurate signature.
Name | Type | Default value | Description |
---|---|---|---|
protocol_model | ProtocolModel |
Add a connector between to process of this protocol
Exemple : protocol.add_connector(create.get_output_port('robot'), sub_proto.get_input_port('robot_i')) OR protocol.add_connector(create >> 'robot', sub_proto << 'robot_i')
Name | Type | Default value | Description |
---|---|---|---|
out_port | ProcessWithPort | ||
in_port | ProcessWithPort |
Add a connector between to process of this protocol
Exemple : protocol.add_connector('create', 'robot', 'sub_proto','robot_i')
Name | Type | Default value | Description |
---|---|---|---|
from_process_name | str | ||
from_port_name | str | ||
to_process_name | str | ||
to_port_name | str |
Add multiple connector inside the protocol
Exemple : protocol.add_connectors([ (create >> 'robot', sub_proto << 'robot_i'), (sub_proto.get_output_port('robot_o'), robot_travel.get_input_port('robot')) ])
Name | Type | Default value | Description |
---|---|---|---|
connectors | List |
Add an empty protocol to this protocol
Name | Type | Default value | Description |
---|---|---|---|
instance_name | str |
ProtocolProxy |
Add an interface to link an input of the protocol to the input of one of the protocol's process
Name | Type | Default value | Description |
---|---|---|---|
name | str | Name of the interface | |
from_process_name | str | ||
process_input_name | str | Name of the process input to plug |
Add an outerface to link the output of one of the protocol's process to the output of the protocol
Name | Type | Default value | Description |
---|---|---|---|
name | str | Name of the interface | |
to_process_name | str | ||
process_ouput_name | str | Name of the process output to plug |
Add an output task to the protocol that receive the out_port resource
Name | Type | Default value | Description |
---|---|---|---|
instance_name | str | Instance name of the task | |
out_port | ProcessWithPort | Out_port connect to connect to the output task outport | |
flag_resource | bool | True | Flag the resource, defaults to true , optional |
TaskProxy |
Add a process (task or protocol) to this protocol. This process is automatically saved in the database
Name | Type | Default value | Description |
---|---|---|---|
process_type | Type | ||
instance_name | str | ||
config_params | Dict |
ProcessProxy |
Add a protocol from a protocol type
Name | Type | Default value | Description |
---|---|---|---|
protocol_type | Type | ||
instance_name | str | ||
config_params | Dict |
ProtocolProxy |
Add a resource to the protocol and connected it to the in_port
Name | Type | Default value | Description |
---|---|---|---|
instance_name | str | Instance name of the task | |
resource_model_id | str | The id of the resource model the source will provided as input | |
in_port | ProcessWithPort | The in port that should receive the resource. if none, the resource is added to the protocol without connection inport |
TaskProxy |
Add an output task to the protocol that receive the out_port resource
Name | Type | Default value | Description |
---|---|---|---|
instance_name | str | Instance name of the task | |
out_port | ProcessWithPort | Out_port connect to connect to the output task outport | |
flag_resource | bool | True | Flag the resource, defaults to true , optional |
TaskProxy |
Add a Source task to the protocol and connected it to the in_port
Name | Type | Default value | Description |
---|---|---|---|
instance_name | str | Instance name of the task | |
resource_model_id | str | The id of the resource model the source will provided as input | |
in_port | ProcessWithPort | The in port that should receive the resource inport |
TaskProxy |
Add a task to this
Name | Type | Default value | Description |
---|---|---|---|
task_type | Type | ||
instance_name | str | ||
config_params | Dict |
TaskProxy |
Delete an interface of the protocol
Name | Type | Default value | Description |
---|---|---|---|
name | str |
Delete an outerface of the protocol
Name | Type | Default value | Description |
---|---|---|---|
name | str |
Name | Type | Default value | Description |
---|---|---|---|
instance_name | str |
ProcessWithPort |
ProcessWithPort |
retrieve the resource of the input
Name | Type | Default value | Description |
---|---|---|---|
name | str | [description] |
Resource |
Access input port information of a process to create connectors in protocol
Name | Type | Default value | Description |
---|---|---|---|
port_name | str |
ProcessWithPort |
retrieve the resource model of the input
Name | Type | Default value | Description |
---|---|---|---|
name | str | [description] |
ResourceModel |
ProtocolModel |
str |
retrieve the resource of the output
Name | Type | Default value | Description |
---|---|---|---|
name | str | [description] |
Resource |
Access output port information of a process to create connectors in protocol
Name | Type | Default value | Description |
---|---|---|---|
port_name | str |
ProcessWithPort |
retrieve the resource model of the output
Name | Type | Default value | Description |
---|---|---|---|
name | str | [description] |
ResourceModel |
Name | Type | Default value | Description |
---|---|---|---|
name | str |
Any |
retreive a protocol or a task in this protocol
:raises Exception: [description]
Name | Type | Default value | Description |
---|---|---|---|
instance_name | str | [description] |
ProcessProxy |
Type[Process] |
ProcessProxy |
Set the config param values
Name | Type | Default value | Description |
---|---|---|---|
config_params | Dict |
Set the resource of an input. If you want to manually set the input resource of a process
Name | Type | Default value | Description |
---|---|---|---|
name | str | [description] | |
resource | Resource | [description] |
Set the param value
Name | Type | Default value | Description |
---|---|---|---|
param_name | str | ||
value | Any |
Name | Type | Default value | Description |
---|---|---|---|
id | str |
ProtocolProxy |