repository_name
stringlengths
7
55
func_path_in_repository
stringlengths
4
223
func_name
stringlengths
1
134
whole_func_string
stringlengths
75
104k
language
stringclasses
1 value
func_code_string
stringlengths
75
104k
func_code_tokens
listlengths
19
28.4k
func_documentation_string
stringlengths
1
46.9k
func_documentation_tokens
listlengths
1
1.97k
split_name
stringclasses
1 value
func_code_url
stringlengths
87
315
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.set_start_state
def set_start_state(self, state): """Sets the start state of a container state :param state: The state_id of a state or a direct reference ot he state (that was already added to the container) that will be the start state of this container state. """ if state is Non...
python
def set_start_state(self, state): """Sets the start state of a container state :param state: The state_id of a state or a direct reference ot he state (that was already added to the container) that will be the start state of this container state. """ if state is Non...
[ "def", "set_start_state", "(", "self", ",", "state", ")", ":", "if", "state", "is", "None", ":", "self", ".", "start_state_id", "=", "None", "elif", "isinstance", "(", "state", ",", "State", ")", ":", "self", ".", "start_state_id", "=", "state", ".", "...
Sets the start state of a container state :param state: The state_id of a state or a direct reference ot he state (that was already added to the container) that will be the start state of this container state.
[ "Sets", "the", "start", "state", "of", "a", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1074-L1086
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_start_state
def get_start_state(self, set_final_outcome=False): """Get the start state of the container state :param set_final_outcome: if the final_outcome of the state should be set if the income directly connects to an outcome :return: the start state """ ...
python
def get_start_state(self, set_final_outcome=False): """Get the start state of the container state :param set_final_outcome: if the final_outcome of the state should be set if the income directly connects to an outcome :return: the start state """ ...
[ "def", "get_start_state", "(", "self", ",", "set_final_outcome", "=", "False", ")", ":", "# overwrite the start state in the case that a specific start state is specific e.g. by start_from_state", "if", "self", ".", "get_path", "(", ")", "in", "state_machine_execution_engine", ...
Get the start state of the container state :param set_final_outcome: if the final_outcome of the state should be set if the income directly connects to an outcome :return: the start state
[ "Get", "the", "start", "state", "of", "the", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1088-L1118
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.remove
def remove(self, state_element, recursive=True, force=False, destroy=True): """Remove item from state :param StateElement state_element: State or state element to be removed :param bool recursive: Only applies to removal of state and decides whether the removal should be called recu...
python
def remove(self, state_element, recursive=True, force=False, destroy=True): """Remove item from state :param StateElement state_element: State or state element to be removed :param bool recursive: Only applies to removal of state and decides whether the removal should be called recu...
[ "def", "remove", "(", "self", ",", "state_element", ",", "recursive", "=", "True", ",", "force", "=", "False", ",", "destroy", "=", "True", ")", ":", "if", "isinstance", "(", "state_element", ",", "State", ")", ":", "return", "self", ".", "remove_state",...
Remove item from state :param StateElement state_element: State or state element to be removed :param bool recursive: Only applies to removal of state and decides whether the removal should be called recursively on all child states :param bool force: if the removal should be forced ...
[ "Remove", "item", "from", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1121-L1139
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.check_transition_id
def check_transition_id(self, transition_id): """ Check the transition id and calculate a new one if its None :param transition_id: The transition-id to check :return: The new transition id :raises exceptions.AttributeError: if transition.transition_id already exists """ ...
python
def check_transition_id(self, transition_id): """ Check the transition id and calculate a new one if its None :param transition_id: The transition-id to check :return: The new transition id :raises exceptions.AttributeError: if transition.transition_id already exists """ ...
[ "def", "check_transition_id", "(", "self", ",", "transition_id", ")", ":", "if", "transition_id", "is", "not", "None", ":", "if", "transition_id", "in", "self", ".", "_transitions", ".", "keys", "(", ")", ":", "raise", "AttributeError", "(", "\"The transition ...
Check the transition id and calculate a new one if its None :param transition_id: The transition-id to check :return: The new transition id :raises exceptions.AttributeError: if transition.transition_id already exists
[ "Check", "the", "transition", "id", "and", "calculate", "a", "new", "one", "if", "its", "None" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1145-L1159
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.check_if_outcome_already_connected
def check_if_outcome_already_connected(self, from_state_id, from_outcome): """ check if outcome of from state is not already connected :param from_state_id: The source state of the transition :param from_outcome: The outcome of the source state to connect the transition to :raises excep...
python
def check_if_outcome_already_connected(self, from_state_id, from_outcome): """ check if outcome of from state is not already connected :param from_state_id: The source state of the transition :param from_outcome: The outcome of the source state to connect the transition to :raises excep...
[ "def", "check_if_outcome_already_connected", "(", "self", ",", "from_state_id", ",", "from_outcome", ")", ":", "for", "trans_key", ",", "transition", "in", "self", ".", "transitions", ".", "items", "(", ")", ":", "if", "transition", ".", "from_state", "==", "f...
check if outcome of from state is not already connected :param from_state_id: The source state of the transition :param from_outcome: The outcome of the source state to connect the transition to :raises exceptions.AttributeError: if the outcome of the state with the state_id==from_state_id ...
[ "check", "if", "outcome", "of", "from", "state", "is", "not", "already", "connected" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1164-L1176
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.create_transition
def create_transition(self, from_state_id, from_outcome, to_state_id, to_outcome, transition_id): """ Creates a new transition. Lookout: Check the parameters first before creating a new transition :param from_state_id: The source state of the transition :param from_outcome: The outcome...
python
def create_transition(self, from_state_id, from_outcome, to_state_id, to_outcome, transition_id): """ Creates a new transition. Lookout: Check the parameters first before creating a new transition :param from_state_id: The source state of the transition :param from_outcome: The outcome...
[ "def", "create_transition", "(", "self", ",", "from_state_id", ",", "from_outcome", ",", "to_state_id", ",", "to_outcome", ",", "transition_id", ")", ":", "# get correct states", "if", "from_state_id", "is", "not", "None", ":", "if", "from_state_id", "==", "self",...
Creates a new transition. Lookout: Check the parameters first before creating a new transition :param from_state_id: The source state of the transition :param from_outcome: The outcome of the source state to connect the transition to :param to_state_id: The target state of the transiti...
[ "Creates", "a", "new", "transition", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1179-L1223
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.add_transition
def add_transition(self, from_state_id, from_outcome, to_state_id, to_outcome, transition_id=None): """Adds a transition to the container state Note: Either the toState or the toOutcome needs to be "None" :param from_state_id: The source state of the transition :param from_outcome: The...
python
def add_transition(self, from_state_id, from_outcome, to_state_id, to_outcome, transition_id=None): """Adds a transition to the container state Note: Either the toState or the toOutcome needs to be "None" :param from_state_id: The source state of the transition :param from_outcome: The...
[ "def", "add_transition", "(", "self", ",", "from_state_id", ",", "from_outcome", ",", "to_state_id", ",", "to_outcome", ",", "transition_id", "=", "None", ")", ":", "transition_id", "=", "self", ".", "check_transition_id", "(", "transition_id", ")", "# Set from_st...
Adds a transition to the container state Note: Either the toState or the toOutcome needs to be "None" :param from_state_id: The source state of the transition :param from_outcome: The outcome id of the source state to connect the transition to :param to_state_id: The target state of th...
[ "Adds", "a", "transition", "to", "the", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1227-L1254
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_transition_for_outcome
def get_transition_for_outcome(self, state, outcome): """Determines the next transition of a state. :param state: The state for which the transition is determined :param outcome: The outcome of the state, that is given in the first parameter :return: the transition specified by the the ...
python
def get_transition_for_outcome(self, state, outcome): """Determines the next transition of a state. :param state: The state for which the transition is determined :param outcome: The outcome of the state, that is given in the first parameter :return: the transition specified by the the ...
[ "def", "get_transition_for_outcome", "(", "self", ",", "state", ",", "outcome", ")", ":", "if", "not", "isinstance", "(", "state", ",", "State", ")", ":", "raise", "TypeError", "(", "\"state must be of type State\"", ")", "if", "not", "isinstance", "(", "outco...
Determines the next transition of a state. :param state: The state for which the transition is determined :param outcome: The outcome of the state, that is given in the first parameter :return: the transition specified by the the state and the outcome :raises exceptions.TypeError: if th...
[ "Determines", "the", "next", "transition", "of", "a", "state", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1256-L1272
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.remove_transition
def remove_transition(self, transition_id, destroy=True): """Removes a transition from the container state :param transition_id: the id of the transition to remove :raises exceptions.AttributeError: if the transition_id is already used """ if transition_id == -1 or transition_id...
python
def remove_transition(self, transition_id, destroy=True): """Removes a transition from the container state :param transition_id: the id of the transition to remove :raises exceptions.AttributeError: if the transition_id is already used """ if transition_id == -1 or transition_id...
[ "def", "remove_transition", "(", "self", ",", "transition_id", ",", "destroy", "=", "True", ")", ":", "if", "transition_id", "==", "-", "1", "or", "transition_id", "==", "-", "2", ":", "raise", "AttributeError", "(", "\"The transition_id must not be -1 (Aborted) o...
Removes a transition from the container state :param transition_id: the id of the transition to remove :raises exceptions.AttributeError: if the transition_id is already used
[ "Removes", "a", "transition", "from", "the", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1276-L1288
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.remove_outcome_hook
def remove_outcome_hook(self, outcome_id): """Removes internal transition going to the outcome """ for transition_id in list(self.transitions.keys()): transition = self.transitions[transition_id] if transition.to_outcome == outcome_id and transition.to_state == self.state...
python
def remove_outcome_hook(self, outcome_id): """Removes internal transition going to the outcome """ for transition_id in list(self.transitions.keys()): transition = self.transitions[transition_id] if transition.to_outcome == outcome_id and transition.to_state == self.state...
[ "def", "remove_outcome_hook", "(", "self", ",", "outcome_id", ")", ":", "for", "transition_id", "in", "list", "(", "self", ".", "transitions", ".", "keys", "(", ")", ")", ":", "transition", "=", "self", ".", "transitions", "[", "transition_id", "]", "if", ...
Removes internal transition going to the outcome
[ "Removes", "internal", "transition", "going", "to", "the", "outcome" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1291-L1297
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.check_data_flow_id
def check_data_flow_id(self, data_flow_id): """ Check the data flow id and calculate a new one if its None :param data_flow_id: The data flow id to check :return: The new data flow id :raises exceptions.AttributeError: if data_flow.data_flow_id already exists """ if data...
python
def check_data_flow_id(self, data_flow_id): """ Check the data flow id and calculate a new one if its None :param data_flow_id: The data flow id to check :return: The new data flow id :raises exceptions.AttributeError: if data_flow.data_flow_id already exists """ if data...
[ "def", "check_data_flow_id", "(", "self", ",", "data_flow_id", ")", ":", "if", "data_flow_id", "is", "not", "None", ":", "if", "data_flow_id", "in", "self", ".", "_data_flows", ".", "keys", "(", ")", ":", "raise", "AttributeError", "(", "\"The data_flow id %s ...
Check the data flow id and calculate a new one if its None :param data_flow_id: The data flow id to check :return: The new data flow id :raises exceptions.AttributeError: if data_flow.data_flow_id already exists
[ "Check", "the", "data", "flow", "id", "and", "calculate", "a", "new", "one", "if", "its", "None" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1307-L1321
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.add_data_flow
def add_data_flow(self, from_state_id, from_data_port_id, to_state_id, to_data_port_id, data_flow_id=None): """Adds a data_flow to the container state :param from_state_id: The id source state of the data_flow :param from_data_port_id: The output_key of the source state :param to_state_...
python
def add_data_flow(self, from_state_id, from_data_port_id, to_state_id, to_data_port_id, data_flow_id=None): """Adds a data_flow to the container state :param from_state_id: The id source state of the data_flow :param from_data_port_id: The output_key of the source state :param to_state_...
[ "def", "add_data_flow", "(", "self", ",", "from_state_id", ",", "from_data_port_id", ",", "to_state_id", ",", "to_data_port_id", ",", "data_flow_id", "=", "None", ")", ":", "data_flow_id", "=", "self", ".", "check_data_flow_id", "(", "data_flow_id", ")", "self", ...
Adds a data_flow to the container state :param from_state_id: The id source state of the data_flow :param from_data_port_id: The output_key of the source state :param to_state_id: The id target state of the data_flow :param to_data_port_id: The input_key of the target state :par...
[ "Adds", "a", "data_flow", "to", "the", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1326-L1339
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.remove_data_flow
def remove_data_flow(self, data_flow_id, destroy=True): """ Removes a data flow from the container state :param int data_flow_id: the id of the data_flow to remove :raises exceptions.AttributeError: if the data_flow_id does not exist """ if data_flow_id not in self._data_flows: ...
python
def remove_data_flow(self, data_flow_id, destroy=True): """ Removes a data flow from the container state :param int data_flow_id: the id of the data_flow to remove :raises exceptions.AttributeError: if the data_flow_id does not exist """ if data_flow_id not in self._data_flows: ...
[ "def", "remove_data_flow", "(", "self", ",", "data_flow_id", ",", "destroy", "=", "True", ")", ":", "if", "data_flow_id", "not", "in", "self", ".", "_data_flows", ":", "raise", "AttributeError", "(", "\"The data_flow_id %s does not exist\"", "%", "str", "(", "da...
Removes a data flow from the container state :param int data_flow_id: the id of the data_flow to remove :raises exceptions.AttributeError: if the data_flow_id does not exist
[ "Removes", "a", "data", "flow", "from", "the", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1343-L1353
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.remove_data_flows_with_data_port_id
def remove_data_flows_with_data_port_id(self, data_port_id): """Remove an data ports whose from_key or to_key equals the passed data_port_id :param int data_port_id: the id of a data_port of which all data_flows should be removed, the id can be a input or output data port id...
python
def remove_data_flows_with_data_port_id(self, data_port_id): """Remove an data ports whose from_key or to_key equals the passed data_port_id :param int data_port_id: the id of a data_port of which all data_flows should be removed, the id can be a input or output data port id...
[ "def", "remove_data_flows_with_data_port_id", "(", "self", ",", "data_port_id", ")", ":", "# delete all data flows in parent related to data_port_id and self.state_id = external data flows", "# checking is_root_state_of_library is only necessary in case of scoped variables, as the scoped variables...
Remove an data ports whose from_key or to_key equals the passed data_port_id :param int data_port_id: the id of a data_port of which all data_flows should be removed, the id can be a input or output data port id
[ "Remove", "an", "data", "ports", "whose", "from_key", "or", "to_key", "equals", "the", "passed", "data_port_id" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1356-L1384
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_scoped_variable_from_name
def get_scoped_variable_from_name(self, name): """ Get the scoped variable for a unique name :param name: the unique name of the scoped variable :return: the scoped variable specified by the name :raises exceptions.AttributeError: if the name is not in the the scoped_variables dictionar...
python
def get_scoped_variable_from_name(self, name): """ Get the scoped variable for a unique name :param name: the unique name of the scoped variable :return: the scoped variable specified by the name :raises exceptions.AttributeError: if the name is not in the the scoped_variables dictionar...
[ "def", "get_scoped_variable_from_name", "(", "self", ",", "name", ")", ":", "for", "scoped_variable_id", ",", "scoped_variable", "in", "self", ".", "scoped_variables", ".", "items", "(", ")", ":", "if", "scoped_variable", ".", "name", "==", "name", ":", "retur...
Get the scoped variable for a unique name :param name: the unique name of the scoped variable :return: the scoped variable specified by the name :raises exceptions.AttributeError: if the name is not in the the scoped_variables dictionary
[ "Get", "the", "scoped", "variable", "for", "a", "unique", "name" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1390-L1400
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.add_scoped_variable
def add_scoped_variable(self, name, data_type=None, default_value=None, scoped_variable_id=None): """ Adds a scoped variable to the container state :param name: The name of the scoped variable :param data_type: An optional data type of the scoped variable :param default_value: An option...
python
def add_scoped_variable(self, name, data_type=None, default_value=None, scoped_variable_id=None): """ Adds a scoped variable to the container state :param name: The name of the scoped variable :param data_type: An optional data type of the scoped variable :param default_value: An option...
[ "def", "add_scoped_variable", "(", "self", ",", "name", ",", "data_type", "=", "None", ",", "default_value", "=", "None", ",", "scoped_variable_id", "=", "None", ")", ":", "if", "scoped_variable_id", "is", "None", ":", "# All data port ids have to passed to the id g...
Adds a scoped variable to the container state :param name: The name of the scoped variable :param data_type: An optional data type of the scoped variable :param default_value: An optional default value of the scoped variable :param scoped_variable_id: An optional scoped variable id of t...
[ "Adds", "a", "scoped", "variable", "to", "the", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1404-L1427
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.remove_scoped_variable
def remove_scoped_variable(self, scoped_variable_id, destroy=True): """Remove a scoped variable from the container state :param scoped_variable_id: the id of the scoped variable to remove :raises exceptions.AttributeError: if the id of the scoped variable already exists """ if s...
python
def remove_scoped_variable(self, scoped_variable_id, destroy=True): """Remove a scoped variable from the container state :param scoped_variable_id: the id of the scoped variable to remove :raises exceptions.AttributeError: if the id of the scoped variable already exists """ if s...
[ "def", "remove_scoped_variable", "(", "self", ",", "scoped_variable_id", ",", "destroy", "=", "True", ")", ":", "if", "scoped_variable_id", "not", "in", "self", ".", "_scoped_variables", ":", "raise", "AttributeError", "(", "\"A scoped variable with id %s does not exist...
Remove a scoped variable from the container state :param scoped_variable_id: the id of the scoped variable to remove :raises exceptions.AttributeError: if the id of the scoped variable already exists
[ "Remove", "a", "scoped", "variable", "from", "the", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1431-L1446
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_data_port
def get_data_port(self, state_id, port_id): """Searches for a data port The data port specified by the state id and data port id is searched in the state itself and in its children. :param str state_id: The id of the state the port is in :param int port_id: The id of the port ...
python
def get_data_port(self, state_id, port_id): """Searches for a data port The data port specified by the state id and data port id is searched in the state itself and in its children. :param str state_id: The id of the state the port is in :param int port_id: The id of the port ...
[ "def", "get_data_port", "(", "self", ",", "state_id", ",", "port_id", ")", ":", "if", "state_id", "==", "self", ".", "state_id", ":", "return", "self", ".", "get_data_port_by_id", "(", "port_id", ")", "for", "child_state_id", ",", "child_state", "in", "self"...
Searches for a data port The data port specified by the state id and data port id is searched in the state itself and in its children. :param str state_id: The id of the state the port is in :param int port_id: The id of the port :return: The searched port or None if it is not found
[ "Searches", "for", "a", "data", "port" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1462-L1479
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_data_port_by_id
def get_data_port_by_id(self, data_port_id): """Search for the given data port id in the data ports of the state The method tries to find a data port in the input and output data ports as well as in the scoped variables. :param data_port_id: the unique id of the data port :return: the ...
python
def get_data_port_by_id(self, data_port_id): """Search for the given data port id in the data ports of the state The method tries to find a data port in the input and output data ports as well as in the scoped variables. :param data_port_id: the unique id of the data port :return: the ...
[ "def", "get_data_port_by_id", "(", "self", ",", "data_port_id", ")", ":", "data_port", "=", "super", "(", "ContainerState", ",", "self", ")", ".", "get_data_port_by_id", "(", "data_port_id", ")", "if", "data_port", ":", "return", "data_port", "if", "data_port_id...
Search for the given data port id in the data ports of the state The method tries to find a data port in the input and output data ports as well as in the scoped variables. :param data_port_id: the unique id of the data port :return: the data port with the searched id or None if not found
[ "Search", "for", "the", "given", "data", "port", "id", "in", "the", "data", "ports", "of", "the", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1481-L1494
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_inputs_for_state
def get_inputs_for_state(self, state): """Retrieves all input data of a state. If several data flows are connected to an input port the most current data is used for the specific input port. :param state: the state of which the input data is determined :return: the input data of the tar...
python
def get_inputs_for_state(self, state): """Retrieves all input data of a state. If several data flows are connected to an input port the most current data is used for the specific input port. :param state: the state of which the input data is determined :return: the input data of the tar...
[ "def", "get_inputs_for_state", "(", "self", ",", "state", ")", ":", "result_dict", "=", "{", "}", "tmp_dict", "=", "self", ".", "get_default_input_values_for_state", "(", "state", ")", "result_dict", ".", "update", "(", "tmp_dict", ")", "for", "input_port_key", ...
Retrieves all input data of a state. If several data flows are connected to an input port the most current data is used for the specific input port. :param state: the state of which the input data is determined :return: the input data of the target state
[ "Retrieves", "all", "input", "data", "of", "a", "state", ".", "If", "several", "data", "flows", "are", "connected", "to", "an", "input", "port", "the", "most", "current", "data", "is", "used", "for", "the", "specific", "input", "port", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1503-L1533
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.add_input_data_to_scoped_data
def add_input_data_to_scoped_data(self, dictionary): """Add a dictionary to the scoped data As the input_data dictionary maps names to values, the functions looks for the proper data_ports keys in the input_data_ports dictionary :param dictionary: The dictionary that is added to the sc...
python
def add_input_data_to_scoped_data(self, dictionary): """Add a dictionary to the scoped data As the input_data dictionary maps names to values, the functions looks for the proper data_ports keys in the input_data_ports dictionary :param dictionary: The dictionary that is added to the sc...
[ "def", "add_input_data_to_scoped_data", "(", "self", ",", "dictionary", ")", ":", "for", "dict_key", ",", "value", "in", "dictionary", ".", "items", "(", ")", ":", "for", "input_data_port_key", ",", "data_port", "in", "list", "(", "self", ".", "input_data_port...
Add a dictionary to the scoped data As the input_data dictionary maps names to values, the functions looks for the proper data_ports keys in the input_data_ports dictionary :param dictionary: The dictionary that is added to the scoped data :param state: The state to which the input_dat...
[ "Add", "a", "dictionary", "to", "the", "scoped", "data" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1540-L1561
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.add_state_execution_output_to_scoped_data
def add_state_execution_output_to_scoped_data(self, dictionary, state): """Add a state execution output to the scoped data :param dictionary: The dictionary that is added to the scoped data :param state: The state that finished execution and provide the dictionary """ for output...
python
def add_state_execution_output_to_scoped_data(self, dictionary, state): """Add a state execution output to the scoped data :param dictionary: The dictionary that is added to the scoped data :param state: The state that finished execution and provide the dictionary """ for output...
[ "def", "add_state_execution_output_to_scoped_data", "(", "self", ",", "dictionary", ",", "state", ")", ":", "for", "output_name", ",", "value", "in", "dictionary", ".", "items", "(", ")", ":", "for", "output_data_port_key", ",", "data_port", "in", "list", "(", ...
Add a state execution output to the scoped data :param dictionary: The dictionary that is added to the scoped data :param state: The state that finished execution and provide the dictionary
[ "Add", "a", "state", "execution", "output", "to", "the", "scoped", "data" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1564-L1580
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.add_default_values_of_scoped_variables_to_scoped_data
def add_default_values_of_scoped_variables_to_scoped_data(self): """Add the scoped variables default values to the scoped_data dictionary """ for key, scoped_var in self.scoped_variables.items(): self.scoped_data[str(scoped_var.data_port_id) + self.state_id] = \ Scop...
python
def add_default_values_of_scoped_variables_to_scoped_data(self): """Add the scoped variables default values to the scoped_data dictionary """ for key, scoped_var in self.scoped_variables.items(): self.scoped_data[str(scoped_var.data_port_id) + self.state_id] = \ Scop...
[ "def", "add_default_values_of_scoped_variables_to_scoped_data", "(", "self", ")", ":", "for", "key", ",", "scoped_var", "in", "self", ".", "scoped_variables", ".", "items", "(", ")", ":", "self", ".", "scoped_data", "[", "str", "(", "scoped_var", ".", "data_port...
Add the scoped variables default values to the scoped_data dictionary
[ "Add", "the", "scoped", "variables", "default", "values", "to", "the", "scoped_data", "dictionary" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1583-L1590
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.update_scoped_variables_with_output_dictionary
def update_scoped_variables_with_output_dictionary(self, dictionary, state): """Update the values of the scoped variables with the output dictionary of a specific state. :param: the dictionary to update the scoped variables with :param: the state the output dictionary belongs to """ ...
python
def update_scoped_variables_with_output_dictionary(self, dictionary, state): """Update the values of the scoped variables with the output dictionary of a specific state. :param: the dictionary to update the scoped variables with :param: the state the output dictionary belongs to """ ...
[ "def", "update_scoped_variables_with_output_dictionary", "(", "self", ",", "dictionary", ",", "state", ")", ":", "for", "key", ",", "value", "in", "dictionary", ".", "items", "(", ")", ":", "output_data_port_key", "=", "None", "# search for the correct output data por...
Update the values of the scoped variables with the output dictionary of a specific state. :param: the dictionary to update the scoped variables with :param: the state the output dictionary belongs to
[ "Update", "the", "values", "of", "the", "scoped", "variables", "with", "the", "output", "dictionary", "of", "a", "specific", "state", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1593-L1617
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.change_state_id
def change_state_id(self, state_id=None): """ Changes the id of the state to a new id. This functions replaces the old state_id with the new state_id in all data flows and transitions. :param state_id: The new state if of the state """ old_state_id = self.state_id ...
python
def change_state_id(self, state_id=None): """ Changes the id of the state to a new id. This functions replaces the old state_id with the new state_id in all data flows and transitions. :param state_id: The new state if of the state """ old_state_id = self.state_id ...
[ "def", "change_state_id", "(", "self", ",", "state_id", "=", "None", ")", ":", "old_state_id", "=", "self", ".", "state_id", "super", "(", "ContainerState", ",", "self", ")", ".", "change_state_id", "(", "state_id", ")", "# Use private variables to change ids to p...
Changes the id of the state to a new id. This functions replaces the old state_id with the new state_id in all data flows and transitions. :param state_id: The new state if of the state
[ "Changes", "the", "id", "of", "the", "state", "to", "a", "new", "id", ".", "This", "functions", "replaces", "the", "old", "state_id", "with", "the", "new", "state_id", "in", "all", "data", "flows", "and", "transitions", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1624-L1646
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_state_for_transition
def get_state_for_transition(self, transition): """Calculate the target state of a transition :param transition: The transition of which the target state is determined :return: the to-state of the transition :raises exceptions.TypeError: if the transition parameter is of wrong type ...
python
def get_state_for_transition(self, transition): """Calculate the target state of a transition :param transition: The transition of which the target state is determined :return: the to-state of the transition :raises exceptions.TypeError: if the transition parameter is of wrong type ...
[ "def", "get_state_for_transition", "(", "self", ",", "transition", ")", ":", "if", "not", "isinstance", "(", "transition", ",", "Transition", ")", ":", "raise", "TypeError", "(", "\"transition must be of type Transition\"", ")", "# the to_state is None when the transition...
Calculate the target state of a transition :param transition: The transition of which the target state is determined :return: the to-state of the transition :raises exceptions.TypeError: if the transition parameter is of wrong type
[ "Calculate", "the", "target", "state", "of", "a", "transition" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1648-L1661
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.write_output_data
def write_output_data(self, specific_output_dictionary=None): """ Write the scoped data to output of the state. Called before exiting the container state. :param specific_output_dictionary: an optional dictionary to write the output data in :return: """ if isinstance(specific_ou...
python
def write_output_data(self, specific_output_dictionary=None): """ Write the scoped data to output of the state. Called before exiting the container state. :param specific_output_dictionary: an optional dictionary to write the output data in :return: """ if isinstance(specific_ou...
[ "def", "write_output_data", "(", "self", ",", "specific_output_dictionary", "=", "None", ")", ":", "if", "isinstance", "(", "specific_output_dictionary", ",", "dict", ")", ":", "output_dict", "=", "specific_output_dictionary", "else", ":", "output_dict", "=", "self"...
Write the scoped data to output of the state. Called before exiting the container state. :param specific_output_dictionary: an optional dictionary to write the output data in :return:
[ "Write", "the", "scoped", "data", "to", "output", "of", "the", "state", ".", "Called", "before", "exiting", "the", "container", "state", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1663-L1699
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.check_child_validity
def check_child_validity(self, child): """Check validity of passed child object The method is called by state child objects (transitions, data flows) when these are initialized or changed. The method checks the type of the child and then checks its validity in the context of the state. ...
python
def check_child_validity(self, child): """Check validity of passed child object The method is called by state child objects (transitions, data flows) when these are initialized or changed. The method checks the type of the child and then checks its validity in the context of the state. ...
[ "def", "check_child_validity", "(", "self", ",", "child", ")", ":", "# First let the state do validity checks for outcomes and data ports", "valid", ",", "message", "=", "super", "(", "ContainerState", ",", "self", ")", ".", "check_child_validity", "(", "child", ")", ...
Check validity of passed child object The method is called by state child objects (transitions, data flows) when these are initialized or changed. The method checks the type of the child and then checks its validity in the context of the state. :param object child: The child of the state that ...
[ "Check", "validity", "of", "passed", "child", "object" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1705-L1725
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.check_data_port_connection
def check_data_port_connection(self, check_data_port): """Checks the connection validity of a data port The method is called by a child state to check the validity of a data port in case it is connected with data flows. The data port does not belong to 'self', but to one of self.states. ...
python
def check_data_port_connection(self, check_data_port): """Checks the connection validity of a data port The method is called by a child state to check the validity of a data port in case it is connected with data flows. The data port does not belong to 'self', but to one of self.states. ...
[ "def", "check_data_port_connection", "(", "self", ",", "check_data_port", ")", ":", "for", "data_flow", "in", "self", ".", "data_flows", ".", "values", "(", ")", ":", "# Check whether the data flow connects the given port", "from_port", "=", "self", ".", "get_data_por...
Checks the connection validity of a data port The method is called by a child state to check the validity of a data port in case it is connected with data flows. The data port does not belong to 'self', but to one of self.states. If the data port is connected to a data flow, the method checks, ...
[ "Checks", "the", "connection", "validity", "of", "a", "data", "port" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1727-L1747
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_data_port_id
def _check_data_port_id(self, data_port): """Checks the validity of a data port id Checks whether the id of the given data port is already used by anther data port (input, output, scoped vars) within the state. :param rafcon.core.data_port.DataPort data_port: The data port to be checke...
python
def _check_data_port_id(self, data_port): """Checks the validity of a data port id Checks whether the id of the given data port is already used by anther data port (input, output, scoped vars) within the state. :param rafcon.core.data_port.DataPort data_port: The data port to be checke...
[ "def", "_check_data_port_id", "(", "self", ",", "data_port", ")", ":", "# First check inputs and outputs", "valid", ",", "message", "=", "super", "(", "ContainerState", ",", "self", ")", ".", "_check_data_port_id", "(", "data_port", ")", "if", "not", "valid", ":...
Checks the validity of a data port id Checks whether the id of the given data port is already used by anther data port (input, output, scoped vars) within the state. :param rafcon.core.data_port.DataPort data_port: The data port to be checked :return bool validity, str message: validit...
[ "Checks", "the", "validity", "of", "a", "data", "port", "id" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1749-L1767
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_data_port_name
def _check_data_port_name(self, data_port): """Checks the validity of a data port name Checks whether the name of the given data port is already used by anther data port within the state. Names must be unique with input data ports, output data ports and scoped variables. :param rafcon....
python
def _check_data_port_name(self, data_port): """Checks the validity of a data port name Checks whether the name of the given data port is already used by anther data port within the state. Names must be unique with input data ports, output data ports and scoped variables. :param rafcon....
[ "def", "_check_data_port_name", "(", "self", ",", "data_port", ")", ":", "# First check inputs and outputs", "valid", ",", "message", "=", "super", "(", "ContainerState", ",", "self", ")", ".", "_check_data_port_name", "(", "data_port", ")", "if", "not", "valid", ...
Checks the validity of a data port name Checks whether the name of the given data port is already used by anther data port within the state. Names must be unique with input data ports, output data ports and scoped variables. :param rafcon.core.data_port.DataPort data_port: The data port to be ...
[ "Checks", "the", "validity", "of", "a", "data", "port", "name" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1769-L1789
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_data_flow_validity
def _check_data_flow_validity(self, check_data_flow): """Checks the validity of a data flow Calls further checks to inspect the id, ports and data types. :param rafcon.core.data_flow.DataFlow check_data_flow: The data flow to be checked :return bool validity, str message: validity is T...
python
def _check_data_flow_validity(self, check_data_flow): """Checks the validity of a data flow Calls further checks to inspect the id, ports and data types. :param rafcon.core.data_flow.DataFlow check_data_flow: The data flow to be checked :return bool validity, str message: validity is T...
[ "def", "_check_data_flow_validity", "(", "self", ",", "check_data_flow", ")", ":", "valid", ",", "message", "=", "self", ".", "_check_data_flow_id", "(", "check_data_flow", ")", "if", "not", "valid", ":", "return", "False", ",", "message", "valid", ",", "messa...
Checks the validity of a data flow Calls further checks to inspect the id, ports and data types. :param rafcon.core.data_flow.DataFlow check_data_flow: The data flow to be checked :return bool validity, str message: validity is True, when the data flow is valid, False else. message gives ...
[ "Checks", "the", "validity", "of", "a", "data", "flow" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1791-L1808
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_data_flow_id
def _check_data_flow_id(self, data_flow): """Checks the validity of a data flow id Checks whether the id of the given data flow is already by anther data flow used within the state. :param rafcon.core.data_flow.DataFlow data_flow: The data flow to be checked :return bool validity, str ...
python
def _check_data_flow_id(self, data_flow): """Checks the validity of a data flow id Checks whether the id of the given data flow is already by anther data flow used within the state. :param rafcon.core.data_flow.DataFlow data_flow: The data flow to be checked :return bool validity, str ...
[ "def", "_check_data_flow_id", "(", "self", ",", "data_flow", ")", ":", "data_flow_id", "=", "data_flow", ".", "data_flow_id", "if", "data_flow_id", "in", "self", ".", "data_flows", "and", "data_flow", "is", "not", "self", ".", "data_flows", "[", "data_flow_id", ...
Checks the validity of a data flow id Checks whether the id of the given data flow is already by anther data flow used within the state. :param rafcon.core.data_flow.DataFlow data_flow: The data flow to be checked :return bool validity, str message: validity is True, when the data flow is vali...
[ "Checks", "the", "validity", "of", "a", "data", "flow", "id" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1810-L1822
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_data_flow_ports
def _check_data_flow_ports(self, data_flow): """Checks the validity of the ports of a data flow Checks whether the ports of a data flow are existing and whether it is allowed to connect these ports. :param rafcon.core.data_flow.DataFlow data_flow: The data flow to be checked :return bo...
python
def _check_data_flow_ports(self, data_flow): """Checks the validity of the ports of a data flow Checks whether the ports of a data flow are existing and whether it is allowed to connect these ports. :param rafcon.core.data_flow.DataFlow data_flow: The data flow to be checked :return bo...
[ "def", "_check_data_flow_ports", "(", "self", ",", "data_flow", ")", ":", "from_state_id", "=", "data_flow", ".", "from_state", "to_state_id", "=", "data_flow", ".", "to_state", "from_data_port_id", "=", "data_flow", ".", "from_key", "to_data_port_id", "=", "data_fl...
Checks the validity of the ports of a data flow Checks whether the ports of a data flow are existing and whether it is allowed to connect these ports. :param rafcon.core.data_flow.DataFlow data_flow: The data flow to be checked :return bool validity, str message: validity is True, when the dat...
[ "Checks", "the", "validity", "of", "the", "ports", "of", "a", "data", "flow" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1824-L1888
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_data_flow_types
def _check_data_flow_types(self, check_data_flow): """Checks the validity of the data flow connection Checks whether the ports of a data flow have matching data types. :param rafcon.core.data_flow.DataFlow check_data_flow: The data flow to be checked :return bool validity, str message:...
python
def _check_data_flow_types(self, check_data_flow): """Checks the validity of the data flow connection Checks whether the ports of a data flow have matching data types. :param rafcon.core.data_flow.DataFlow check_data_flow: The data flow to be checked :return bool validity, str message:...
[ "def", "_check_data_flow_types", "(", "self", ",", "check_data_flow", ")", ":", "# Check whether the data types or origin and target fit", "from_data_port", "=", "self", ".", "get_data_port", "(", "check_data_flow", ".", "from_state", ",", "check_data_flow", ".", "from_key"...
Checks the validity of the data flow connection Checks whether the ports of a data flow have matching data types. :param rafcon.core.data_flow.DataFlow check_data_flow: The data flow to be checked :return bool validity, str message: validity is True, when the data flow is valid, False else. me...
[ "Checks", "the", "validity", "of", "the", "data", "flow", "connection" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1890-L1916
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_transition_validity
def _check_transition_validity(self, check_transition): """Checks the validity of a transition Calls further checks to inspect the id, origin, target and connection of the transition. :param rafcon.core.transition.Transition check_transition: The transition to be checked :return bool v...
python
def _check_transition_validity(self, check_transition): """Checks the validity of a transition Calls further checks to inspect the id, origin, target and connection of the transition. :param rafcon.core.transition.Transition check_transition: The transition to be checked :return bool v...
[ "def", "_check_transition_validity", "(", "self", ",", "check_transition", ")", ":", "valid", ",", "message", "=", "self", ".", "_check_transition_id", "(", "check_transition", ")", "if", "not", "valid", ":", "return", "False", ",", "message", "# Separate check fo...
Checks the validity of a transition Calls further checks to inspect the id, origin, target and connection of the transition. :param rafcon.core.transition.Transition check_transition: The transition to be checked :return bool validity, str message: validity is True, when the transition is vali...
[ "Checks", "the", "validity", "of", "a", "transition" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1918-L1943
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_transition_id
def _check_transition_id(self, transition): """Checks the validity of a transition id Checks whether the transition id is already used by another transition within the state :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str mes...
python
def _check_transition_id(self, transition): """Checks the validity of a transition id Checks whether the transition id is already used by another transition within the state :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str mes...
[ "def", "_check_transition_id", "(", "self", ",", "transition", ")", ":", "transition_id", "=", "transition", ".", "transition_id", "if", "transition_id", "in", "self", ".", "transitions", "and", "transition", "is", "not", "self", ".", "transitions", "[", "transi...
Checks the validity of a transition id Checks whether the transition id is already used by another transition within the state :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str message: validity is True, when the transition is valid, F...
[ "Checks", "the", "validity", "of", "a", "transition", "id" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1945-L1957
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_start_transition
def _check_start_transition(self, start_transition): """Checks the validity of a start transition Checks whether the given transition is a start transition a whether it is the only one within the state. :param rafcon.core.transition.Transition start_transition: The transition to be checked ...
python
def _check_start_transition(self, start_transition): """Checks the validity of a start transition Checks whether the given transition is a start transition a whether it is the only one within the state. :param rafcon.core.transition.Transition start_transition: The transition to be checked ...
[ "def", "_check_start_transition", "(", "self", ",", "start_transition", ")", ":", "for", "transition", "in", "self", ".", "transitions", ".", "values", "(", ")", ":", "if", "transition", ".", "from_state", "is", "None", ":", "if", "start_transition", "is", "...
Checks the validity of a start transition Checks whether the given transition is a start transition a whether it is the only one within the state. :param rafcon.core.transition.Transition start_transition: The transition to be checked :return bool validity, str message: validity is True, when ...
[ "Checks", "the", "validity", "of", "a", "start", "transition" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1959-L1976
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_transition_target
def _check_transition_target(self, transition): """Checks the validity of a transition target Checks whether the transition target is valid. :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str message: validity is True, when the ...
python
def _check_transition_target(self, transition): """Checks the validity of a transition target Checks whether the transition target is valid. :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str message: validity is True, when the ...
[ "def", "_check_transition_target", "(", "self", ",", "transition", ")", ":", "to_state_id", "=", "transition", ".", "to_state", "to_outcome_id", "=", "transition", ".", "to_outcome", "if", "to_state_id", "==", "self", ".", "state_id", ":", "if", "to_outcome_id", ...
Checks the validity of a transition target Checks whether the transition target is valid. :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str message: validity is True, when the transition is valid, False else. message gives ...
[ "Checks", "the", "validity", "of", "a", "transition", "target" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L1978-L2000
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_transition_origin
def _check_transition_origin(self, transition): """Checks the validity of a transition origin Checks whether the transition origin is valid. :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str message: validity is True, when the ...
python
def _check_transition_origin(self, transition): """Checks the validity of a transition origin Checks whether the transition origin is valid. :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str message: validity is True, when the ...
[ "def", "_check_transition_origin", "(", "self", ",", "transition", ")", ":", "from_state_id", "=", "transition", ".", "from_state", "from_outcome_id", "=", "transition", ".", "from_outcome", "if", "from_state_id", "==", "self", ".", "state_id", ":", "return", "Fal...
Checks the validity of a transition origin Checks whether the transition origin is valid. :param rafcon.core.transition.Transition transition: The transition to be checked :return bool validity, str message: validity is True, when the transition is valid, False else. message gives ...
[ "Checks", "the", "validity", "of", "a", "transition", "origin" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2002-L2025
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState._check_transition_connection
def _check_transition_connection(self, check_transition): """Checks the validity of a transition connection Checks whether the transition is allowed to connect the origin with the target. :param rafcon.core.transition.Transition check_transition: The transition to be checked :return bo...
python
def _check_transition_connection(self, check_transition): """Checks the validity of a transition connection Checks whether the transition is allowed to connect the origin with the target. :param rafcon.core.transition.Transition check_transition: The transition to be checked :return bo...
[ "def", "_check_transition_connection", "(", "self", ",", "check_transition", ")", ":", "from_state_id", "=", "check_transition", ".", "from_state", "from_outcome_id", "=", "check_transition", ".", "from_outcome", "to_state_id", "=", "check_transition", ".", "to_state", ...
Checks the validity of a transition connection Checks whether the transition is allowed to connect the origin with the target. :param rafcon.core.transition.Transition check_transition: The transition to be checked :return bool validity, str message: validity is True, when the transition is va...
[ "Checks", "the", "validity", "of", "a", "transition", "connection" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2027-L2051
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_states_statistics
def get_states_statistics(self, hierarchy_level): """ Returns the numer of child states :return: """ number_of_all_child_states = 0 max_child_hierarchy_level = 0 for s in self.states.values(): child_hierarchy_level = 0 number_of_child_state...
python
def get_states_statistics(self, hierarchy_level): """ Returns the numer of child states :return: """ number_of_all_child_states = 0 max_child_hierarchy_level = 0 for s in self.states.values(): child_hierarchy_level = 0 number_of_child_state...
[ "def", "get_states_statistics", "(", "self", ",", "hierarchy_level", ")", ":", "number_of_all_child_states", "=", "0", "max_child_hierarchy_level", "=", "0", "for", "s", "in", "self", ".", "states", ".", "values", "(", ")", ":", "child_hierarchy_level", "=", "0"...
Returns the numer of child states :return:
[ "Returns", "the", "numer", "of", "child", "states", ":", "return", ":" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2057-L2071
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.get_number_of_transitions
def get_number_of_transitions(self): """ Returns the numer of child states :return: """ number_of_all_transitions = 0 for s in self.states.values(): number_of_all_transitions += s.get_number_of_transitions() return number_of_all_transitions + len(self....
python
def get_number_of_transitions(self): """ Returns the numer of child states :return: """ number_of_all_transitions = 0 for s in self.states.values(): number_of_all_transitions += s.get_number_of_transitions() return number_of_all_transitions + len(self....
[ "def", "get_number_of_transitions", "(", "self", ")", ":", "number_of_all_transitions", "=", "0", "for", "s", "in", "self", ".", "states", ".", "values", "(", ")", ":", "number_of_all_transitions", "+=", "s", ".", "get_number_of_transitions", "(", ")", "return",...
Returns the numer of child states :return:
[ "Returns", "the", "numer", "of", "child", "states", ":", "return", ":" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2073-L2081
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.states
def states(self, states): """ Setter for _states field See property :param states: Dictionary of States :raises exceptions.TypeError: if the states parameter is of wrong type :raises exceptions.AttributeError: if the keys of the dictionary and the state_ids in the dictionary do...
python
def states(self, states): """ Setter for _states field See property :param states: Dictionary of States :raises exceptions.TypeError: if the states parameter is of wrong type :raises exceptions.AttributeError: if the keys of the dictionary and the state_ids in the dictionary do...
[ "def", "states", "(", "self", ",", "states", ")", ":", "if", "not", "isinstance", "(", "states", ",", "dict", ")", ":", "raise", "TypeError", "(", "\"states must be of type dict\"", ")", "if", "[", "state_id", "for", "state_id", ",", "state", "in", "states...
Setter for _states field See property :param states: Dictionary of States :raises exceptions.TypeError: if the states parameter is of wrong type :raises exceptions.AttributeError: if the keys of the dictionary and the state_ids in the dictionary do not match
[ "Setter", "for", "_states", "field" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2101-L2129
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.transitions
def transitions(self, transitions): """ Setter for _transitions field See property :param: transitions: Dictionary transitions[transition_id] of :class:`rafcon.core.transition.Transition` :raises exceptions.TypeError: if the transitions parameter has the wrong type :raises exce...
python
def transitions(self, transitions): """ Setter for _transitions field See property :param: transitions: Dictionary transitions[transition_id] of :class:`rafcon.core.transition.Transition` :raises exceptions.TypeError: if the transitions parameter has the wrong type :raises exce...
[ "def", "transitions", "(", "self", ",", "transitions", ")", ":", "if", "not", "isinstance", "(", "transitions", ",", "dict", ")", ":", "raise", "TypeError", "(", "\"transitions must be of type dict\"", ")", "if", "[", "t_id", "for", "t_id", ",", "transition", ...
Setter for _transitions field See property :param: transitions: Dictionary transitions[transition_id] of :class:`rafcon.core.transition.Transition` :raises exceptions.TypeError: if the transitions parameter has the wrong type :raises exceptions.AttributeError: if the keys of the transi...
[ "Setter", "for", "_transitions", "field" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2148-L2186
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.data_flows
def data_flows(self, data_flows): """ Setter for _data_flows field See property :param dict data_flows: Dictionary data_flows[data_flow_id] of :class:`rafcon.core.data_flow.DataFlow` :raises exceptions.TypeError: if the data_flows parameter has the wrong type :raises exceptions...
python
def data_flows(self, data_flows): """ Setter for _data_flows field See property :param dict data_flows: Dictionary data_flows[data_flow_id] of :class:`rafcon.core.data_flow.DataFlow` :raises exceptions.TypeError: if the data_flows parameter has the wrong type :raises exceptions...
[ "def", "data_flows", "(", "self", ",", "data_flows", ")", ":", "if", "not", "isinstance", "(", "data_flows", ",", "dict", ")", ":", "raise", "TypeError", "(", "\"data_flows must be of type dict\"", ")", "if", "[", "df_id", "for", "df_id", ",", "data_flow", "...
Setter for _data_flows field See property :param dict data_flows: Dictionary data_flows[data_flow_id] of :class:`rafcon.core.data_flow.DataFlow` :raises exceptions.TypeError: if the data_flows parameter has the wrong type :raises exceptions.AttributeError: if the keys of the data_flows...
[ "Setter", "for", "_data_flows", "field" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2205-L2243
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.start_state_id
def start_state_id(self): """ The start state is the state to which the first transition goes to. The setter-method creates a unique first transition to the state with the given id. Existing first transitions are removed. If the given state id is None, the first transition is removed. ...
python
def start_state_id(self): """ The start state is the state to which the first transition goes to. The setter-method creates a unique first transition to the state with the given id. Existing first transitions are removed. If the given state id is None, the first transition is removed. ...
[ "def", "start_state_id", "(", "self", ")", ":", "for", "transition_id", "in", "self", ".", "transitions", ":", "if", "self", ".", "transitions", "[", "transition_id", "]", ".", "from_state", "is", "None", ":", "to_state", "=", "self", ".", "transitions", "...
The start state is the state to which the first transition goes to. The setter-method creates a unique first transition to the state with the given id. Existing first transitions are removed. If the given state id is None, the first transition is removed. :return: The id of the start state
[ "The", "start", "state", "is", "the", "state", "to", "which", "the", "first", "transition", "goes", "to", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2246-L2261
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.start_state_id
def start_state_id(self, start_state_id, to_outcome=None): """Set the start state of the container state See property :param start_state_id: The state id of the state which should be executed first in the Container state :raises exceptions.ValueError: if the start_state_id does not exi...
python
def start_state_id(self, start_state_id, to_outcome=None): """Set the start state of the container state See property :param start_state_id: The state id of the state which should be executed first in the Container state :raises exceptions.ValueError: if the start_state_id does not exi...
[ "def", "start_state_id", "(", "self", ",", "start_state_id", ",", "to_outcome", "=", "None", ")", ":", "if", "start_state_id", "is", "not", "None", "and", "start_state_id", "not", "in", "self", ".", "states", ":", "raise", "ValueError", "(", "\"start_state_id ...
Set the start state of the container state See property :param start_state_id: The state id of the state which should be executed first in the Container state :raises exceptions.ValueError: if the start_state_id does not exist in :py:attr:`rafcon.core.states...
[ "Set", "the", "start", "state", "of", "the", "container", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2266-L2293
DLR-RM/RAFCON
source/rafcon/core/states/container_state.py
ContainerState.scoped_variables
def scoped_variables(self, scoped_variables): """ Setter for _scoped_variables field See property :param dict scoped_variables: Dictionary scoped_variables[data_port_id] of :class:`rafcon.core.scope.ScopedVariable` :raises exceptions.TypeError: if the scoped_variables parameter has the...
python
def scoped_variables(self, scoped_variables): """ Setter for _scoped_variables field See property :param dict scoped_variables: Dictionary scoped_variables[data_port_id] of :class:`rafcon.core.scope.ScopedVariable` :raises exceptions.TypeError: if the scoped_variables parameter has the...
[ "def", "scoped_variables", "(", "self", ",", "scoped_variables", ")", ":", "if", "not", "isinstance", "(", "scoped_variables", ",", "dict", ")", ":", "raise", "TypeError", "(", "\"scoped_variables must be of type dict\"", ")", "if", "[", "sv_id", "for", "sv_id", ...
Setter for _scoped_variables field See property :param dict scoped_variables: Dictionary scoped_variables[data_port_id] of :class:`rafcon.core.scope.ScopedVariable` :raises exceptions.TypeError: if the scoped_variables parameter has the wrong type :raises exceptions.AttributeError: if ...
[ "Setter", "for", "_scoped_variables", "field" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/container_state.py#L2312-L2342
DLR-RM/RAFCON
source/rafcon/core/states/execution_state.py
ExecutionState._execute
def _execute(self, execute_inputs, execute_outputs, backward_execution=False): """Calls the custom execute function of the script.py of the state """ self._script.build_module() outcome_item = self._script.execute(self, execute_inputs, execute_outputs, backward_execution) # in...
python
def _execute(self, execute_inputs, execute_outputs, backward_execution=False): """Calls the custom execute function of the script.py of the state """ self._script.build_module() outcome_item = self._script.execute(self, execute_inputs, execute_outputs, backward_execution) # in...
[ "def", "_execute", "(", "self", ",", "execute_inputs", ",", "execute_outputs", ",", "backward_execution", "=", "False", ")", ":", "self", ".", "_script", ".", "build_module", "(", ")", "outcome_item", "=", "self", ".", "_script", ".", "execute", "(", "self",...
Calls the custom execute function of the script.py of the state
[ "Calls", "the", "custom", "execute", "function", "of", "the", "script", ".", "py", "of", "the", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/execution_state.py#L104-L130
DLR-RM/RAFCON
source/rafcon/core/states/execution_state.py
ExecutionState.run
def run(self): """ This defines the sequence of actions that are taken when the execution state is executed :return: """ if self.is_root_state: self.execution_history.push_call_history_item(self, CallType.EXECUTE, None, self.input_data) logger.debug("Running {0}{1}"...
python
def run(self): """ This defines the sequence of actions that are taken when the execution state is executed :return: """ if self.is_root_state: self.execution_history.push_call_history_item(self, CallType.EXECUTE, None, self.input_data) logger.debug("Running {0}{1}"...
[ "def", "run", "(", "self", ")", ":", "if", "self", ".", "is_root_state", ":", "self", ".", "execution_history", ".", "push_call_history_item", "(", "self", ",", "CallType", ".", "EXECUTE", ",", "None", ",", "self", ".", "input_data", ")", "logger", ".", ...
This defines the sequence of actions that are taken when the execution state is executed :return:
[ "This", "defines", "the", "sequence", "of", "actions", "that", "are", "taken", "when", "the", "execution", "state", "is", "executed" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/execution_state.py#L132-L173
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.register_view
def register_view(self, view): """Called when the view was registered""" super(StateMachineTreeController, self).register_view(view) self.view.connect('button_press_event', self.mouse_click) self.view_is_registered = True self.update(with_expand=True)
python
def register_view(self, view): """Called when the view was registered""" super(StateMachineTreeController, self).register_view(view) self.view.connect('button_press_event', self.mouse_click) self.view_is_registered = True self.update(with_expand=True)
[ "def", "register_view", "(", "self", ",", "view", ")", ":", "super", "(", "StateMachineTreeController", ",", "self", ")", ".", "register_view", "(", "view", ")", "self", ".", "view", ".", "connect", "(", "'button_press_event'", ",", "self", ".", "mouse_click...
Called when the view was registered
[ "Called", "when", "the", "view", "was", "registered" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L84-L89
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.register_actions
def register_actions(self, shortcut_manager): """Register callback methods for triggered actions :param rafcon.gui.shortcut_manager.ShortcutManager shortcut_manager: Shortcut Manager Object holding mappings between shortcuts and actions. """ shortcut_manager.add_callback_for...
python
def register_actions(self, shortcut_manager): """Register callback methods for triggered actions :param rafcon.gui.shortcut_manager.ShortcutManager shortcut_manager: Shortcut Manager Object holding mappings between shortcuts and actions. """ shortcut_manager.add_callback_for...
[ "def", "register_actions", "(", "self", ",", "shortcut_manager", ")", ":", "shortcut_manager", ".", "add_callback_for_action", "(", "\"delete\"", ",", "self", ".", "_delete_selection", ")", "shortcut_manager", ".", "add_callback_for_action", "(", "\"add\"", ",", "part...
Register callback methods for triggered actions :param rafcon.gui.shortcut_manager.ShortcutManager shortcut_manager: Shortcut Manager Object holding mappings between shortcuts and actions.
[ "Register", "callback", "methods", "for", "triggered", "actions" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L91-L102
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.register
def register(self): """Change the state machine that is observed for new selected states to the selected state machine.""" self._do_selection_update = True # relieve old model if self.__my_selected_sm_id is not None: # no old models available self.relieve_model(self._selecte...
python
def register(self): """Change the state machine that is observed for new selected states to the selected state machine.""" self._do_selection_update = True # relieve old model if self.__my_selected_sm_id is not None: # no old models available self.relieve_model(self._selecte...
[ "def", "register", "(", "self", ")", ":", "self", ".", "_do_selection_update", "=", "True", "# relieve old model", "if", "self", ".", "__my_selected_sm_id", "is", "not", "None", ":", "# no old models available", "self", ".", "relieve_model", "(", "self", ".", "_...
Change the state machine that is observed for new selected states to the selected state machine.
[ "Change", "the", "state", "machine", "that", "is", "observed", "for", "new", "selected", "states", "to", "the", "selected", "state", "machine", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L104-L121
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.paste_action_callback
def paste_action_callback(self, *event): """Callback method for paste action""" if react_to_event(self.view, self.tree_view, event): sm_selection, _ = self.get_state_machine_selection() # only list specific elements are cut by widget if len(sm_selection.states) == 1: ...
python
def paste_action_callback(self, *event): """Callback method for paste action""" if react_to_event(self.view, self.tree_view, event): sm_selection, _ = self.get_state_machine_selection() # only list specific elements are cut by widget if len(sm_selection.states) == 1: ...
[ "def", "paste_action_callback", "(", "self", ",", "*", "event", ")", ":", "if", "react_to_event", "(", "self", ".", "view", ",", "self", ".", "tree_view", ",", "event", ")", ":", "sm_selection", ",", "_", "=", "self", ".", "get_state_machine_selection", "(...
Callback method for paste action
[ "Callback", "method", "for", "paste", "action" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L123-L132
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController._add_new_state
def _add_new_state(self, *event, **kwargs): """Triggered when shortcut keys for adding a new state are pressed, or Menu Bar "Edit, Add State" is clicked. Adds a new state only if the the state machine tree is in focus. """ if react_to_event(self.view, self.view['state_machine_tree_view'...
python
def _add_new_state(self, *event, **kwargs): """Triggered when shortcut keys for adding a new state are pressed, or Menu Bar "Edit, Add State" is clicked. Adds a new state only if the the state machine tree is in focus. """ if react_to_event(self.view, self.view['state_machine_tree_view'...
[ "def", "_add_new_state", "(", "self", ",", "*", "event", ",", "*", "*", "kwargs", ")", ":", "if", "react_to_event", "(", "self", ".", "view", ",", "self", ".", "view", "[", "'state_machine_tree_view'", "]", ",", "event", ")", ":", "state_type", "=", "S...
Triggered when shortcut keys for adding a new state are pressed, or Menu Bar "Edit, Add State" is clicked. Adds a new state only if the the state machine tree is in focus.
[ "Triggered", "when", "shortcut", "keys", "for", "adding", "a", "new", "state", "are", "pressed", "or", "Menu", "Bar", "Edit", "Add", "State", "is", "clicked", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L134-L142
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.selection_changed
def selection_changed(self, widget, event=None): """Notify state machine about tree view selection""" # do not forward cursor selection updates if state update is running # TODO maybe make this generic for respective abstract controller if self._state_which_is_updated: return...
python
def selection_changed(self, widget, event=None): """Notify state machine about tree view selection""" # do not forward cursor selection updates if state update is running # TODO maybe make this generic for respective abstract controller if self._state_which_is_updated: return...
[ "def", "selection_changed", "(", "self", ",", "widget", ",", "event", "=", "None", ")", ":", "# do not forward cursor selection updates if state update is running", "# TODO maybe make this generic for respective abstract controller", "if", "self", ".", "_state_which_is_updated", ...
Notify state machine about tree view selection
[ "Notify", "state", "machine", "about", "tree", "view", "selection" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L148-L154
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.redo_expansion_state
def redo_expansion_state(self, ignore_not_existing_rows=False): """ Considers the tree to be collapsed and expand into all tree item with the flag set True """ def set_expansion_state(state_path): state_row_iter = self.state_row_iter_dict_by_state_path[state_path] if state_row_i...
python
def redo_expansion_state(self, ignore_not_existing_rows=False): """ Considers the tree to be collapsed and expand into all tree item with the flag set True """ def set_expansion_state(state_path): state_row_iter = self.state_row_iter_dict_by_state_path[state_path] if state_row_i...
[ "def", "redo_expansion_state", "(", "self", ",", "ignore_not_existing_rows", "=", "False", ")", ":", "def", "set_expansion_state", "(", "state_path", ")", ":", "state_row_iter", "=", "self", ".", "state_row_iter_dict_by_state_path", "[", "state_path", "]", "if", "st...
Considers the tree to be collapsed and expand into all tree item with the flag set True
[ "Considers", "the", "tree", "to", "be", "collapsed", "and", "expand", "into", "all", "tree", "item", "with", "the", "flag", "set", "True" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L271-L298
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.update
def update(self, changed_state_model=None, with_expand=False): """Checks if all states are in tree and if tree has states which were deleted :param changed_state_model: Model that row has to be updated :param with_expand: The expand flag for the tree """ if not self.view_is_regi...
python
def update(self, changed_state_model=None, with_expand=False): """Checks if all states are in tree and if tree has states which were deleted :param changed_state_model: Model that row has to be updated :param with_expand: The expand flag for the tree """ if not self.view_is_regi...
[ "def", "update", "(", "self", ",", "changed_state_model", "=", "None", ",", "with_expand", "=", "False", ")", ":", "if", "not", "self", ".", "view_is_registered", ":", "return", "# define initial state-model for update", "if", "changed_state_model", "is", "None", ...
Checks if all states are in tree and if tree has states which were deleted :param changed_state_model: Model that row has to be updated :param with_expand: The expand flag for the tree
[ "Checks", "if", "all", "states", "are", "in", "tree", "and", "if", "tree", "has", "states", "which", "were", "deleted" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L300-L336
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.show_content
def show_content(self, state_model): """Check state machine tree specific show content flag. Is returning true if the upper most library state of a state model has a enabled show content flag or if there is no library root state above this state. :param rafcon.gui.models.abstract_state...
python
def show_content(self, state_model): """Check state machine tree specific show content flag. Is returning true if the upper most library state of a state model has a enabled show content flag or if there is no library root state above this state. :param rafcon.gui.models.abstract_state...
[ "def", "show_content", "(", "self", ",", "state_model", ")", ":", "upper_most_lib_state_m", "=", "None", "if", "isinstance", "(", "state_model", ",", "LibraryStateModel", ")", ":", "uppermost_library_root_state", "=", "state_model", ".", "state", ".", "get_uppermost...
Check state machine tree specific show content flag. Is returning true if the upper most library state of a state model has a enabled show content flag or if there is no library root state above this state. :param rafcon.gui.models.abstract_state.AbstractStateModel state_model: The state model...
[ "Check", "state", "machine", "tree", "specific", "show", "content", "flag", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L363-L382
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.insert_and_update_recursively
def insert_and_update_recursively(self, parent_iter, state_model, with_expand=False): """ Insert and/or update the handed state model in parent tree store element iterator :param parent_iter: Parent tree store iterator the insert should be performed in :param StateModel state_model: Model of st...
python
def insert_and_update_recursively(self, parent_iter, state_model, with_expand=False): """ Insert and/or update the handed state model in parent tree store element iterator :param parent_iter: Parent tree store iterator the insert should be performed in :param StateModel state_model: Model of st...
[ "def", "insert_and_update_recursively", "(", "self", ",", "parent_iter", ",", "state_model", ",", "with_expand", "=", "False", ")", ":", "# the case handling of this method", "# 0 - create - common state", "# 0.1 - modify attributes of common state which is already in the list", "#...
Insert and/or update the handed state model in parent tree store element iterator :param parent_iter: Parent tree store iterator the insert should be performed in :param StateModel state_model: Model of state that has to be insert and/or updated :param bool with_expand: Trigger to expand tree ...
[ "Insert", "and", "/", "or", "update", "the", "handed", "state", "model", "in", "parent", "tree", "store", "element", "iterator" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L384-L484
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController.get_state_machine_selection
def get_state_machine_selection(self): """Getter state machine selection :return: selection object, filtered set of selected states :rtype: rafcon.gui.selection.Selection, set """ if self._selected_sm_model: return self._selected_sm_model.selection, self._selected_sm...
python
def get_state_machine_selection(self): """Getter state machine selection :return: selection object, filtered set of selected states :rtype: rafcon.gui.selection.Selection, set """ if self._selected_sm_model: return self._selected_sm_model.selection, self._selected_sm...
[ "def", "get_state_machine_selection", "(", "self", ")", ":", "if", "self", ".", "_selected_sm_model", ":", "return", "self", ".", "_selected_sm_model", ".", "selection", ",", "self", ".", "_selected_sm_model", ".", "selection", ".", "states", "else", ":", "retur...
Getter state machine selection :return: selection object, filtered set of selected states :rtype: rafcon.gui.selection.Selection, set
[ "Getter", "state", "machine", "selection" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L494-L503
DLR-RM/RAFCON
source/rafcon/gui/controllers/state_machine_tree.py
StateMachineTreeController._handle_double_click
def _handle_double_click(self, event): """ Double click with left mouse button focuses the state and toggles the collapse status""" if event.get_button()[1] == 1: # Left mouse button path_info = self.tree_view.get_path_at_pos(int(event.x), int(event.y)) if path_info: # Valid en...
python
def _handle_double_click(self, event): """ Double click with left mouse button focuses the state and toggles the collapse status""" if event.get_button()[1] == 1: # Left mouse button path_info = self.tree_view.get_path_at_pos(int(event.x), int(event.y)) if path_info: # Valid en...
[ "def", "_handle_double_click", "(", "self", ",", "event", ")", ":", "if", "event", ".", "get_button", "(", ")", "[", "1", "]", "==", "1", ":", "# Left mouse button", "path_info", "=", "self", ".", "tree_view", ".", "get_path_at_pos", "(", "int", "(", "ev...
Double click with left mouse button focuses the state and toggles the collapse status
[ "Double", "click", "with", "left", "mouse", "button", "focuses", "the", "state", "and", "toggles", "the", "collapse", "status" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/state_machine_tree.py#L509-L528
DLR-RM/RAFCON
source/rafcon/core/script.py
Script.execute
def execute(self, state, inputs=None, outputs=None, backward_execution=False): """Execute the user 'execute' function specified in the script :param ExecutionState state: the state belonging to the execute function, refers to 'self' :param dict inputs: the input data of the script :para...
python
def execute(self, state, inputs=None, outputs=None, backward_execution=False): """Execute the user 'execute' function specified in the script :param ExecutionState state: the state belonging to the execute function, refers to 'self' :param dict inputs: the input data of the script :para...
[ "def", "execute", "(", "self", ",", "state", ",", "inputs", "=", "None", ",", "outputs", "=", "None", ",", "backward_execution", "=", "False", ")", ":", "if", "not", "outputs", ":", "outputs", "=", "{", "}", "if", "not", "inputs", ":", "inputs", "=",...
Execute the user 'execute' function specified in the script :param ExecutionState state: the state belonging to the execute function, refers to 'self' :param dict inputs: the input data of the script :param dict outputs: the output data of the script :param bool backward_execution: Flag...
[ "Execute", "the", "user", "execute", "function", "specified", "in", "the", "script" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/script.py#L81-L105
DLR-RM/RAFCON
source/rafcon/core/script.py
Script._load_script
def _load_script(self): """Loads the script from the filesystem :raises exceptions.IOError: if the script file could not be opened """ script_text = filesystem.read_file(self.path, self.filename) if not script_text: raise IOError("Script file could not be opened or ...
python
def _load_script(self): """Loads the script from the filesystem :raises exceptions.IOError: if the script file could not be opened """ script_text = filesystem.read_file(self.path, self.filename) if not script_text: raise IOError("Script file could not be opened or ...
[ "def", "_load_script", "(", "self", ")", ":", "script_text", "=", "filesystem", ".", "read_file", "(", "self", ".", "path", ",", "self", ".", "filename", ")", "if", "not", "script_text", ":", "raise", "IOError", "(", "\"Script file could not be opened or was emp...
Loads the script from the filesystem :raises exceptions.IOError: if the script file could not be opened
[ "Loads", "the", "script", "from", "the", "filesystem" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/script.py#L107-L117
DLR-RM/RAFCON
source/rafcon/core/script.py
Script.build_module
def build_module(self): """Builds a temporary module from the script file :raises exceptions.IOError: if the compilation of the script module failed """ try: imp.acquire_lock() module_name = os.path.splitext(self.filename)[0] + str(self._script_id) #...
python
def build_module(self): """Builds a temporary module from the script file :raises exceptions.IOError: if the compilation of the script module failed """ try: imp.acquire_lock() module_name = os.path.splitext(self.filename)[0] + str(self._script_id) #...
[ "def", "build_module", "(", "self", ")", ":", "try", ":", "imp", ".", "acquire_lock", "(", ")", "module_name", "=", "os", ".", "path", ".", "splitext", "(", "self", ".", "filename", ")", "[", "0", "]", "+", "str", "(", "self", ".", "_script_id", ")...
Builds a temporary module from the script file :raises exceptions.IOError: if the compilation of the script module failed
[ "Builds", "a", "temporary", "module", "from", "the", "script", "file" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/script.py#L119-L141
DLR-RM/RAFCON
source/rafcon/gui/controllers/menu_bar.py
MenuBarController.register_view
def register_view(self, view): """Called when the View was registered""" super(MenuBarController, self).register_view(view) data_flow_mode = global_runtime_config.get_config_value("DATA_FLOW_MODE", False) view["data_flow_mode"].set_active(data_flow_mode) show_data_flows = global...
python
def register_view(self, view): """Called when the View was registered""" super(MenuBarController, self).register_view(view) data_flow_mode = global_runtime_config.get_config_value("DATA_FLOW_MODE", False) view["data_flow_mode"].set_active(data_flow_mode) show_data_flows = global...
[ "def", "register_view", "(", "self", ",", "view", ")", ":", "super", "(", "MenuBarController", ",", "self", ")", ".", "register_view", "(", "view", ")", "data_flow_mode", "=", "global_runtime_config", ".", "get_config_value", "(", "\"DATA_FLOW_MODE\"", ",", "Fal...
Called when the View was registered
[ "Called", "when", "the", "View", "was", "registered" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/menu_bar.py#L108-L175
DLR-RM/RAFCON
source/rafcon/gui/controllers/menu_bar.py
MenuBarController.on_config_value_changed
def on_config_value_changed(self, config_m, prop_name, info): """Callback when a config value has been changed :param ConfigModel config_m: The config model that has been changed :param str prop_name: Should always be 'config' :param dict info: Information e.g. about the changed config ...
python
def on_config_value_changed(self, config_m, prop_name, info): """Callback when a config value has been changed :param ConfigModel config_m: The config model that has been changed :param str prop_name: Should always be 'config' :param dict info: Information e.g. about the changed config ...
[ "def", "on_config_value_changed", "(", "self", ",", "config_m", ",", "prop_name", ",", "info", ")", ":", "config_key", "=", "info", "[", "'args'", "]", "[", "1", "]", "# config_value = info['args'][2]", "if", "config_key", "==", "\"LIBRARY_PATHS\"", ":", "librar...
Callback when a config value has been changed :param ConfigModel config_m: The config model that has been changed :param str prop_name: Should always be 'config' :param dict info: Information e.g. about the changed config key
[ "Callback", "when", "a", "config", "value", "has", "been", "changed" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/menu_bar.py#L178-L193
DLR-RM/RAFCON
source/rafcon/gui/controllers/menu_bar.py
MenuBarController._update_recently_opened_state_machines
def _update_recently_opened_state_machines(self): """Update the sub menu Open Recent in File menu Method clean's first all menu items of the sub menu 'recent open', then insert the user menu item to clean recent opened state machine paths and finally insert menu items for all elements in recent...
python
def _update_recently_opened_state_machines(self): """Update the sub menu Open Recent in File menu Method clean's first all menu items of the sub menu 'recent open', then insert the user menu item to clean recent opened state machine paths and finally insert menu items for all elements in recent...
[ "def", "_update_recently_opened_state_machines", "(", "self", ")", ":", "if", "not", "self", ".", "registered_view", ":", "return", "for", "item", "in", "self", ".", "view", ".", "sub_menu_open_recently", ".", "get_children", "(", ")", ":", "self", ".", "view"...
Update the sub menu Open Recent in File menu Method clean's first all menu items of the sub menu 'recent open', then insert the user menu item to clean recent opened state machine paths and finally insert menu items for all elements in recent opened state machines list.
[ "Update", "the", "sub", "menu", "Open", "Recent", "in", "File", "menu" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/menu_bar.py#L195-L231
DLR-RM/RAFCON
source/rafcon/gui/controllers/menu_bar.py
MenuBarController.on_full_screen_activate
def on_full_screen_activate(self, *args): """ function to display the currently selected state machine in full screen mode :param args: :return: """ self.sm_notebook.set_show_tabs(False) self.main_window_view['graphical_editor_vbox'].remove(self.sm_notebook) ...
python
def on_full_screen_activate(self, *args): """ function to display the currently selected state machine in full screen mode :param args: :return: """ self.sm_notebook.set_show_tabs(False) self.main_window_view['graphical_editor_vbox'].remove(self.sm_notebook) ...
[ "def", "on_full_screen_activate", "(", "self", ",", "*", "args", ")", ":", "self", ".", "sm_notebook", ".", "set_show_tabs", "(", "False", ")", "self", ".", "main_window_view", "[", "'graphical_editor_vbox'", "]", ".", "remove", "(", "self", ".", "sm_notebook"...
function to display the currently selected state machine in full screen mode :param args: :return:
[ "function", "to", "display", "the", "currently", "selected", "state", "machine", "in", "full", "screen", "mode", ":", "param", "args", ":", ":", "return", ":" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/menu_bar.py#L254-L268
DLR-RM/RAFCON
source/rafcon/gui/controllers/menu_bar.py
MenuBarController.unregister_view
def unregister_view(self): """import log Unregister all registered functions to a view element :return: """ for handler_id in self.handler_ids.keys(): self.view[handler_id].disconnect(self.handler_ids[handler_id])
python
def unregister_view(self): """import log Unregister all registered functions to a view element :return: """ for handler_id in self.handler_ids.keys(): self.view[handler_id].disconnect(self.handler_ids[handler_id])
[ "def", "unregister_view", "(", "self", ")", ":", "for", "handler_id", "in", "self", ".", "handler_ids", ".", "keys", "(", ")", ":", "self", ".", "view", "[", "handler_id", "]", ".", "disconnect", "(", "self", ".", "handler_ids", "[", "handler_id", "]", ...
import log Unregister all registered functions to a view element :return:
[ "import", "log", "Unregister", "all", "registered", "functions", "to", "a", "view", "element", ":", "return", ":" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/menu_bar.py#L289-L295
DLR-RM/RAFCON
source/rafcon/gui/controllers/menu_bar.py
MenuBarController.register_actions
def register_actions(self, shortcut_manager): """Register callback methods for triggered actions :param rafcon.gui.shortcut_manager.ShortcutManager shortcut_manager: Shortcut Manager Object holding mappings between shortcuts and actions. """ self.add_callback_to_shortcut_man...
python
def register_actions(self, shortcut_manager): """Register callback methods for triggered actions :param rafcon.gui.shortcut_manager.ShortcutManager shortcut_manager: Shortcut Manager Object holding mappings between shortcuts and actions. """ self.add_callback_to_shortcut_man...
[ "def", "register_actions", "(", "self", ",", "shortcut_manager", ")", ":", "self", ".", "add_callback_to_shortcut_manager", "(", "'save'", ",", "partial", "(", "self", ".", "call_action_callback", ",", "\"on_save_activate\"", ")", ")", "self", ".", "add_callback_to_...
Register callback methods for triggered actions :param rafcon.gui.shortcut_manager.ShortcutManager shortcut_manager: Shortcut Manager Object holding mappings between shortcuts and actions.
[ "Register", "callback", "methods", "for", "triggered", "actions" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/menu_bar.py#L297-L352
DLR-RM/RAFCON
source/rafcon/gui/controllers/menu_bar.py
MenuBarController.add_callback_to_shortcut_manager
def add_callback_to_shortcut_manager(self, action, callback): """ Helper function to add an callback for an action to the shortcut manager. :param action: the action to add a shortcut for :param callback: the callback if the action is executed :return: """ if acti...
python
def add_callback_to_shortcut_manager(self, action, callback): """ Helper function to add an callback for an action to the shortcut manager. :param action: the action to add a shortcut for :param callback: the callback if the action is executed :return: """ if acti...
[ "def", "add_callback_to_shortcut_manager", "(", "self", ",", "action", ",", "callback", ")", ":", "if", "action", "not", "in", "self", ".", "registered_shortcut_callbacks", ":", "self", ".", "registered_shortcut_callbacks", "[", "action", "]", "=", "[", "]", "se...
Helper function to add an callback for an action to the shortcut manager. :param action: the action to add a shortcut for :param callback: the callback if the action is executed :return:
[ "Helper", "function", "to", "add", "an", "callback", "for", "an", "action", "to", "the", "shortcut", "manager", ".", ":", "param", "action", ":", "the", "action", "to", "add", "a", "shortcut", "for", ":", "param", "callback", ":", "the", "callback", "if"...
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/menu_bar.py#L367-L377
DLR-RM/RAFCON
source/rafcon/gui/controllers/menu_bar.py
MenuBarController.remove_all_callbacks
def remove_all_callbacks(self): """ Remove all callbacks registered to the shortcut manager :return: """ for action in self.registered_shortcut_callbacks.keys(): for callback in self.registered_shortcut_callbacks[action]: self.shortcut_manager.remove_c...
python
def remove_all_callbacks(self): """ Remove all callbacks registered to the shortcut manager :return: """ for action in self.registered_shortcut_callbacks.keys(): for callback in self.registered_shortcut_callbacks[action]: self.shortcut_manager.remove_c...
[ "def", "remove_all_callbacks", "(", "self", ")", ":", "for", "action", "in", "self", ".", "registered_shortcut_callbacks", ".", "keys", "(", ")", ":", "for", "callback", "in", "self", ".", "registered_shortcut_callbacks", "[", "action", "]", ":", "self", ".", ...
Remove all callbacks registered to the shortcut manager :return:
[ "Remove", "all", "callbacks", "registered", "to", "the", "shortcut", "manager", ":", "return", ":" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/menu_bar.py#L379-L388
DLR-RM/RAFCON
source/rafcon/utils/geometry.py
point_left_of_line
def point_left_of_line(point, line_start, line_end): """Determines whether a point is left of a line :param point: Point to be checked (tuple with x any y coordinate) :param line_start: Starting point of the line (tuple with x any y coordinate) :param line_end: End point of the line (tuple with x any y...
python
def point_left_of_line(point, line_start, line_end): """Determines whether a point is left of a line :param point: Point to be checked (tuple with x any y coordinate) :param line_start: Starting point of the line (tuple with x any y coordinate) :param line_end: End point of the line (tuple with x any y...
[ "def", "point_left_of_line", "(", "point", ",", "line_start", ",", "line_end", ")", ":", "# determine sign of determinant", "# ((b.x - a.x)*(c.y - a.y) - (b.y - a.y)*(c.x - a.x)) > 0", "return", "(", "(", "line_end", "[", "0", "]", "-", "line_start", "[", "0", "]", ")...
Determines whether a point is left of a line :param point: Point to be checked (tuple with x any y coordinate) :param line_start: Starting point of the line (tuple with x any y coordinate) :param line_end: End point of the line (tuple with x any y coordinate) :return: True if point is left of line, els...
[ "Determines", "whether", "a", "point", "is", "left", "of", "a", "line" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/utils/geometry.py#L34-L45
DLR-RM/RAFCON
source/rafcon/utils/geometry.py
point_on_line
def point_on_line(point, line_start, line_end, accuracy=50.): """Checks whether a point lies on a line The function checks whether the point "point" (P) lies on the line defined by its starting point line_start (A) and its end point line_end (B). This is done by comparing the distance of [AB] with the ...
python
def point_on_line(point, line_start, line_end, accuracy=50.): """Checks whether a point lies on a line The function checks whether the point "point" (P) lies on the line defined by its starting point line_start (A) and its end point line_end (B). This is done by comparing the distance of [AB] with the ...
[ "def", "point_on_line", "(", "point", ",", "line_start", ",", "line_end", ",", "accuracy", "=", "50.", ")", ":", "length", "=", "dist", "(", "line_start", ",", "line_end", ")", "ds", "=", "length", "/", "float", "(", "accuracy", ")", "if", "-", "ds", ...
Checks whether a point lies on a line The function checks whether the point "point" (P) lies on the line defined by its starting point line_start (A) and its end point line_end (B). This is done by comparing the distance of [AB] with the sum of the distances [AP] and [PB]. If the difference is smaller ...
[ "Checks", "whether", "a", "point", "lies", "on", "a", "line" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/utils/geometry.py#L48-L67
DLR-RM/RAFCON
source/rafcon/utils/geometry.py
point_in_triangle
def point_in_triangle(p, v1, v2, v3): """Checks whether a point is within the given triangle The function checks, whether the given point p is within the triangle defined by the the three corner point v1, v2 and v3. This is done by checking whether the point is on all three half-planes defined by the t...
python
def point_in_triangle(p, v1, v2, v3): """Checks whether a point is within the given triangle The function checks, whether the given point p is within the triangle defined by the the three corner point v1, v2 and v3. This is done by checking whether the point is on all three half-planes defined by the t...
[ "def", "point_in_triangle", "(", "p", ",", "v1", ",", "v2", ",", "v3", ")", ":", "def", "_test", "(", "p1", ",", "p2", ",", "p3", ")", ":", "return", "(", "p1", "[", "0", "]", "-", "p3", "[", "0", "]", ")", "*", "(", "p2", "[", "1", "]", ...
Checks whether a point is within the given triangle The function checks, whether the given point p is within the triangle defined by the the three corner point v1, v2 and v3. This is done by checking whether the point is on all three half-planes defined by the three edges of the triangle. :param p: The...
[ "Checks", "whether", "a", "point", "is", "within", "the", "given", "triangle" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/utils/geometry.py#L70-L89
DLR-RM/RAFCON
source/rafcon/utils/geometry.py
equal
def equal(t1, t2, digit=None): """ Compare two iterators and its elements on specific digit precision The method assume that t1 and t2 are are list or tuple. :param t1: First element to compare :param t2: Second element to compare :param int digit: Number of digits to compare :rtype bool :...
python
def equal(t1, t2, digit=None): """ Compare two iterators and its elements on specific digit precision The method assume that t1 and t2 are are list or tuple. :param t1: First element to compare :param t2: Second element to compare :param int digit: Number of digits to compare :rtype bool :...
[ "def", "equal", "(", "t1", ",", "t2", ",", "digit", "=", "None", ")", ":", "if", "not", "len", "(", "t1", ")", "==", "len", "(", "t2", ")", ":", "return", "False", "for", "idx", "in", "range", "(", "len", "(", "t1", ")", ")", ":", "if", "di...
Compare two iterators and its elements on specific digit precision The method assume that t1 and t2 are are list or tuple. :param t1: First element to compare :param t2: Second element to compare :param int digit: Number of digits to compare :rtype bool :return: True if equal and False if diff...
[ "Compare", "two", "iterators", "and", "its", "elements", "on", "specific", "digit", "precision" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/utils/geometry.py#L112-L136
DLR-RM/RAFCON
source/rafcon/utils/geometry.py
cal_dist_between_2_coord_frame_aligned_boxes
def cal_dist_between_2_coord_frame_aligned_boxes(box1_pos, box1_size, box2_pos, box2_size): """ Calculate Euclidean distance between two boxes those edges are parallel to the coordinate axis The function decides condition based which corner to corner or edge to edge distance needs to be calculated. :param...
python
def cal_dist_between_2_coord_frame_aligned_boxes(box1_pos, box1_size, box2_pos, box2_size): """ Calculate Euclidean distance between two boxes those edges are parallel to the coordinate axis The function decides condition based which corner to corner or edge to edge distance needs to be calculated. :param...
[ "def", "cal_dist_between_2_coord_frame_aligned_boxes", "(", "box1_pos", ",", "box1_size", ",", "box2_pos", ",", "box2_size", ")", ":", "box1_x_min", ",", "box1_y_min", "=", "box1_pos", "box1_x_max", ",", "box1_y_max", "=", "(", "box1_pos", "[", "0", "]", "+", "b...
Calculate Euclidean distance between two boxes those edges are parallel to the coordinate axis The function decides condition based which corner to corner or edge to edge distance needs to be calculated. :param tuple box1_pos: x and y position of box 1 :param tuple box1_size: x and y size of box 1 :pa...
[ "Calculate", "Euclidean", "distance", "between", "two", "boxes", "those", "edges", "are", "parallel", "to", "the", "coordinate", "axis" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/utils/geometry.py#L139-L181
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.mouse_click
def mouse_click(self, widget, event=None): """Triggered when mouse click is pressed in the history tree. The method shows all scoped data for an execution step as tooltip or fold and unfold the tree by double-click and select respective state for double clicked element. """ if ev...
python
def mouse_click(self, widget, event=None): """Triggered when mouse click is pressed in the history tree. The method shows all scoped data for an execution step as tooltip or fold and unfold the tree by double-click and select respective state for double clicked element. """ if ev...
[ "def", "mouse_click", "(", "self", ",", "widget", ",", "event", "=", "None", ")", ":", "if", "event", ".", "type", "==", "Gdk", ".", "EventType", ".", "_2BUTTON_PRESS", "and", "event", ".", "get_button", "(", ")", "[", "1", "]", "==", "1", ":", "("...
Triggered when mouse click is pressed in the history tree. The method shows all scoped data for an execution step as tooltip or fold and unfold the tree by double-click and select respective state for double clicked element.
[ "Triggered", "when", "mouse", "click", "is", "pressed", "in", "the", "history", "tree", ".", "The", "method", "shows", "all", "scoped", "data", "for", "an", "execution", "step", "as", "tooltip", "or", "fold", "and", "unfold", "the", "tree", "by", "double",...
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L146-L243
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.get_history_item_for_tree_iter
def get_history_item_for_tree_iter(self, child_tree_iter): """Hands history item for tree iter and compensate if tree item is a dummy item :param Gtk.TreeIter child_tree_iter: Tree iter of row :rtype rafcon.core.execution.execution_history.HistoryItem: :return history tree item: ...
python
def get_history_item_for_tree_iter(self, child_tree_iter): """Hands history item for tree iter and compensate if tree item is a dummy item :param Gtk.TreeIter child_tree_iter: Tree iter of row :rtype rafcon.core.execution.execution_history.HistoryItem: :return history tree item: ...
[ "def", "get_history_item_for_tree_iter", "(", "self", ",", "child_tree_iter", ")", ":", "history_item", "=", "self", ".", "history_tree_store", "[", "child_tree_iter", "]", "[", "self", ".", "HISTORY_ITEM_STORAGE_ID", "]", "if", "history_item", "is", "None", ":", ...
Hands history item for tree iter and compensate if tree item is a dummy item :param Gtk.TreeIter child_tree_iter: Tree iter of row :rtype rafcon.core.execution.execution_history.HistoryItem: :return history tree item:
[ "Hands", "history", "item", "for", "tree", "iter", "and", "compensate", "if", "tree", "item", "is", "a", "dummy", "item" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L251-L265
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController._store_expansion_state
def _store_expansion_state(self): """Iter recursively all tree items and store expansion state""" def store_tree_expansion(child_tree_iter, expansion_state): tree_item_path = self.history_tree_store.get_path(child_tree_iter) history_item = self.get_history_item_for_tree_iter(ch...
python
def _store_expansion_state(self): """Iter recursively all tree items and store expansion state""" def store_tree_expansion(child_tree_iter, expansion_state): tree_item_path = self.history_tree_store.get_path(child_tree_iter) history_item = self.get_history_item_for_tree_iter(ch...
[ "def", "_store_expansion_state", "(", "self", ")", ":", "def", "store_tree_expansion", "(", "child_tree_iter", ",", "expansion_state", ")", ":", "tree_item_path", "=", "self", ".", "history_tree_store", ".", "get_path", "(", "child_tree_iter", ")", "history_item", "...
Iter recursively all tree items and store expansion state
[ "Iter", "recursively", "all", "tree", "items", "and", "store", "expansion", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L267-L296
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController._restore_expansion_state
def _restore_expansion_state(self): """Iter recursively all tree items and restore expansion state""" def restore_tree_expansion(child_tree_iter, expansion_state): tree_item_path = self.history_tree_store.get_path(child_tree_iter) history_item = self.get_history_item_for_tree_it...
python
def _restore_expansion_state(self): """Iter recursively all tree items and restore expansion state""" def restore_tree_expansion(child_tree_iter, expansion_state): tree_item_path = self.history_tree_store.get_path(child_tree_iter) history_item = self.get_history_item_for_tree_it...
[ "def", "_restore_expansion_state", "(", "self", ")", ":", "def", "restore_tree_expansion", "(", "child_tree_iter", ",", "expansion_state", ")", ":", "tree_item_path", "=", "self", ".", "history_tree_store", ".", "get_path", "(", "child_tree_iter", ")", "history_item",...
Iter recursively all tree items and restore expansion state
[ "Iter", "recursively", "all", "tree", "items", "and", "restore", "expansion", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L298-L322
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.notification_selected_sm_changed
def notification_selected_sm_changed(self, model, prop_name, info): """If a new state machine is selected, make sure expansion state is stored and tree updated""" selected_state_machine_id = self.model.selected_state_machine_id if selected_state_machine_id is None: return sel...
python
def notification_selected_sm_changed(self, model, prop_name, info): """If a new state machine is selected, make sure expansion state is stored and tree updated""" selected_state_machine_id = self.model.selected_state_machine_id if selected_state_machine_id is None: return sel...
[ "def", "notification_selected_sm_changed", "(", "self", ",", "model", ",", "prop_name", ",", "info", ")", ":", "selected_state_machine_id", "=", "self", ".", "model", ".", "selected_state_machine_id", "if", "selected_state_machine_id", "is", "None", ":", "return", "...
If a new state machine is selected, make sure expansion state is stored and tree updated
[ "If", "a", "new", "state", "machine", "is", "selected", "make", "sure", "expansion", "state", "is", "stored", "and", "tree", "updated" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L325-L330
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.notification_sm_changed
def notification_sm_changed(self, model, prop_name, info): """Remove references to non-existing state machines""" for state_machine_id in list(self._expansion_state.keys()): if state_machine_id not in self.model.state_machines: del self._expansion_state[state_machine_id]
python
def notification_sm_changed(self, model, prop_name, info): """Remove references to non-existing state machines""" for state_machine_id in list(self._expansion_state.keys()): if state_machine_id not in self.model.state_machines: del self._expansion_state[state_machine_id]
[ "def", "notification_sm_changed", "(", "self", ",", "model", ",", "prop_name", ",", "info", ")", ":", "for", "state_machine_id", "in", "list", "(", "self", ".", "_expansion_state", ".", "keys", "(", ")", ")", ":", "if", "state_machine_id", "not", "in", "se...
Remove references to non-existing state machines
[ "Remove", "references", "to", "non", "-", "existing", "state", "machines" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L333-L337
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.execution_history_focus
def execution_history_focus(self, model, prop_name, info): """ Arranges to put execution-history widget page to become top page in notebook when execution starts and stops and resets the boolean of modification_history_was_focused to False each time this notification are observed. """ if...
python
def execution_history_focus(self, model, prop_name, info): """ Arranges to put execution-history widget page to become top page in notebook when execution starts and stops and resets the boolean of modification_history_was_focused to False each time this notification are observed. """ if...
[ "def", "execution_history_focus", "(", "self", ",", "model", ",", "prop_name", ",", "info", ")", ":", "if", "state_machine_execution_engine", ".", "status", ".", "execution_mode", "in", "[", "StateMachineExecutionStatus", ".", "STARTED", ",", "StateMachineExecutionSta...
Arranges to put execution-history widget page to become top page in notebook when execution starts and stops and resets the boolean of modification_history_was_focused to False each time this notification are observed.
[ "Arranges", "to", "put", "execution", "-", "history", "widget", "page", "to", "become", "top", "page", "in", "notebook", "when", "execution", "starts", "and", "stops", "and", "resets", "the", "boolean", "of", "modification_history_was_focused", "to", "False", "e...
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L340-L355
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.clean_history
def clean_history(self, widget, event=None): """Triggered when the 'Clean History' button is clicked. Empties the execution history tree by adjusting the start index and updates tree store and view. """ self.history_tree_store.clear() selected_sm_m = self.model.get_selected_stat...
python
def clean_history(self, widget, event=None): """Triggered when the 'Clean History' button is clicked. Empties the execution history tree by adjusting the start index and updates tree store and view. """ self.history_tree_store.clear() selected_sm_m = self.model.get_selected_stat...
[ "def", "clean_history", "(", "self", ",", "widget", ",", "event", "=", "None", ")", ":", "self", ".", "history_tree_store", ".", "clear", "(", ")", "selected_sm_m", "=", "self", ".", "model", ".", "get_selected_state_machine_model", "(", ")", "if", "selected...
Triggered when the 'Clean History' button is clicked. Empties the execution history tree by adjusting the start index and updates tree store and view.
[ "Triggered", "when", "the", "Clean", "History", "button", "is", "clicked", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L357-L368
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.update
def update(self): """ rebuild the tree view of the history item tree store :return: """ # with self._update_lock: self._update_lock.acquire() self._store_expansion_state() self.history_tree_store.clear() selected_sm_m = self.model.get_selected_stat...
python
def update(self): """ rebuild the tree view of the history item tree store :return: """ # with self._update_lock: self._update_lock.acquire() self._store_expansion_state() self.history_tree_store.clear() selected_sm_m = self.model.get_selected_stat...
[ "def", "update", "(", "self", ")", ":", "# with self._update_lock:", "self", ".", "_update_lock", ".", "acquire", "(", ")", "self", ".", "_store_expansion_state", "(", ")", "self", ".", "history_tree_store", ".", "clear", "(", ")", "selected_sm_m", "=", "self"...
rebuild the tree view of the history item tree store :return:
[ "rebuild", "the", "tree", "view", "of", "the", "history", "item", "tree", "store", ":", "return", ":" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L374-L412
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.insert_history_item
def insert_history_item(self, parent, history_item, description, dummy=False): """Enters a single history item into the tree store :param Gtk.TreeItem parent: Parent tree item :param HistoryItem history_item: History item to be inserted :param str description: A description to be added ...
python
def insert_history_item(self, parent, history_item, description, dummy=False): """Enters a single history item into the tree store :param Gtk.TreeItem parent: Parent tree item :param HistoryItem history_item: History item to be inserted :param str description: A description to be added ...
[ "def", "insert_history_item", "(", "self", ",", "parent", ",", "history_item", ",", "description", ",", "dummy", "=", "False", ")", ":", "if", "not", "history_item", ".", "state_reference", ":", "logger", ".", "error", "(", "\"This must never happen! Current histo...
Enters a single history item into the tree store :param Gtk.TreeItem parent: Parent tree item :param HistoryItem history_item: History item to be inserted :param str description: A description to be added to the entry :param None dummy: Whether this is just a dummy entry (wrapper for co...
[ "Enters", "a", "single", "history", "item", "into", "the", "tree", "store" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L414-L441
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.insert_execution_history
def insert_execution_history(self, parent, execution_history, is_root=False): """Insert a list of history items into a the tree store If there are concurrency history items, the method is called recursively. :param Gtk.TreeItem parent: the parent to add the next history item to :param ...
python
def insert_execution_history(self, parent, execution_history, is_root=False): """Insert a list of history items into a the tree store If there are concurrency history items, the method is called recursively. :param Gtk.TreeItem parent: the parent to add the next history item to :param ...
[ "def", "insert_execution_history", "(", "self", ",", "parent", ",", "execution_history", ",", "is_root", "=", "False", ")", ":", "current_parent", "=", "parent", "execution_history_iterator", "=", "iter", "(", "execution_history", ")", "for", "history_item", "in", ...
Insert a list of history items into a the tree store If there are concurrency history items, the method is called recursively. :param Gtk.TreeItem parent: the parent to add the next history item to :param ExecutionHistory execution_history: all history items of a certain state machine executio...
[ "Insert", "a", "list", "of", "history", "items", "into", "a", "the", "tree", "store" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L443-L487
DLR-RM/RAFCON
source/rafcon/gui/controllers/execution_history.py
ExecutionHistoryTreeController.insert_concurrent_execution_histories
def insert_concurrent_execution_histories(self, parent, concurrent_execution_histories): """Adds the child execution histories of a concurrency state. :param Gtk.TreeItem parent: the parent to add the next history item to :param list[ExecutionHistory] concurrent_execution_histories: a list of a...
python
def insert_concurrent_execution_histories(self, parent, concurrent_execution_histories): """Adds the child execution histories of a concurrency state. :param Gtk.TreeItem parent: the parent to add the next history item to :param list[ExecutionHistory] concurrent_execution_histories: a list of a...
[ "def", "insert_concurrent_execution_histories", "(", "self", ",", "parent", ",", "concurrent_execution_histories", ")", ":", "for", "execution_history", "in", "concurrent_execution_histories", ":", "if", "len", "(", "execution_history", ")", ">=", "1", ":", "first_histo...
Adds the child execution histories of a concurrency state. :param Gtk.TreeItem parent: the parent to add the next history item to :param list[ExecutionHistory] concurrent_execution_histories: a list of all child execution histories :return:
[ "Adds", "the", "child", "execution", "histories", "of", "a", "concurrency", "state", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/execution_history.py#L489-L502
DLR-RM/RAFCON
source/rafcon/gui/controllers/library_tree.py
LibraryTreeController.on_drag_data_get
def on_drag_data_get(self, widget, context, data, info, time): """dragged state is inserted and its state_id sent to the receiver :param widget: :param context: :param data: SelectionData: contains state_id :param info: :param time: """ library_state = se...
python
def on_drag_data_get(self, widget, context, data, info, time): """dragged state is inserted and its state_id sent to the receiver :param widget: :param context: :param data: SelectionData: contains state_id :param info: :param time: """ library_state = se...
[ "def", "on_drag_data_get", "(", "self", ",", "widget", ",", "context", ",", "data", ",", "info", ",", "time", ")", ":", "library_state", "=", "self", ".", "_get_selected_library_state", "(", ")", "import", "rafcon", ".", "gui", ".", "helpers", ".", "state_...
dragged state is inserted and its state_id sent to the receiver :param widget: :param context: :param data: SelectionData: contains state_id :param info: :param time:
[ "dragged", "state", "is", "inserted", "and", "its", "state_id", "sent", "to", "the", "receiver" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/library_tree.py#L241-L252
DLR-RM/RAFCON
source/rafcon/gui/controllers/library_tree.py
LibraryTreeController.select_open_state_machine_of_selected_library_element
def select_open_state_machine_of_selected_library_element(self): """Select respective state machine of selected library in state machine manager if already open """ (model, row_path) = self.view.get_selection().get_selected() if row_path: physical_library_path = model[row_path][self....
python
def select_open_state_machine_of_selected_library_element(self): """Select respective state machine of selected library in state machine manager if already open """ (model, row_path) = self.view.get_selection().get_selected() if row_path: physical_library_path = model[row_path][self....
[ "def", "select_open_state_machine_of_selected_library_element", "(", "self", ")", ":", "(", "model", ",", "row_path", ")", "=", "self", ".", "view", ".", "get_selection", "(", ")", ".", "get_selected", "(", ")", "if", "row_path", ":", "physical_library_path", "=...
Select respective state machine of selected library in state machine manager if already open
[ "Select", "respective", "state", "machine", "of", "selected", "library", "in", "state", "machine", "manager", "if", "already", "open" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/library_tree.py#L279-L287
DLR-RM/RAFCON
source/rafcon/gui/controllers/library_tree.py
LibraryTreeController.menu_item_remove_libraries_or_root_clicked
def menu_item_remove_libraries_or_root_clicked(self, menu_item): """Removes library from hard drive after request second confirmation""" menu_item_text = self.get_menu_item_text(menu_item) logger.info("Delete item '{0}' pressed.".format(menu_item_text)) model, path = self.view.get_sele...
python
def menu_item_remove_libraries_or_root_clicked(self, menu_item): """Removes library from hard drive after request second confirmation""" menu_item_text = self.get_menu_item_text(menu_item) logger.info("Delete item '{0}' pressed.".format(menu_item_text)) model, path = self.view.get_sele...
[ "def", "menu_item_remove_libraries_or_root_clicked", "(", "self", ",", "menu_item", ")", ":", "menu_item_text", "=", "self", ".", "get_menu_item_text", "(", "menu_item", ")", "logger", ".", "info", "(", "\"Delete item '{0}' pressed.\"", ".", "format", "(", "menu_item_...
Removes library from hard drive after request second confirmation
[ "Removes", "library", "from", "hard", "drive", "after", "request", "second", "confirmation" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/library_tree.py#L338-L398
DLR-RM/RAFCON
source/rafcon/gui/controllers/library_tree.py
LibraryTreeController.extract_library_properties_from_selected_row
def extract_library_properties_from_selected_row(self): """ Extracts properties library_os_path, library_path, library_name and tree_item_key from tree store row """ (model, row) = self.view.get_selection().get_selected() tree_item_key = model[row][self.ID_STORAGE_ID] library_item = mode...
python
def extract_library_properties_from_selected_row(self): """ Extracts properties library_os_path, library_path, library_name and tree_item_key from tree store row """ (model, row) = self.view.get_selection().get_selected() tree_item_key = model[row][self.ID_STORAGE_ID] library_item = mode...
[ "def", "extract_library_properties_from_selected_row", "(", "self", ")", ":", "(", "model", ",", "row", ")", "=", "self", ".", "view", ".", "get_selection", "(", ")", ".", "get_selected", "(", ")", "tree_item_key", "=", "model", "[", "row", "]", "[", "self...
Extracts properties library_os_path, library_path, library_name and tree_item_key from tree store row
[ "Extracts", "properties", "library_os_path", "library_path", "library_name", "and", "tree_item_key", "from", "tree", "store", "row" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/library_tree.py#L410-L424
DLR-RM/RAFCON
source/rafcon/gui/controllers/library_tree.py
LibraryTreeController._get_selected_library_state
def _get_selected_library_state(self): """Returns the LibraryState which was selected in the LibraryTree :return: selected state in TreeView :rtype: LibraryState """ library_os_path, library_path, library_name, item_key = self.extract_library_properties_from_selected_row() ...
python
def _get_selected_library_state(self): """Returns the LibraryState which was selected in the LibraryTree :return: selected state in TreeView :rtype: LibraryState """ library_os_path, library_path, library_name, item_key = self.extract_library_properties_from_selected_row() ...
[ "def", "_get_selected_library_state", "(", "self", ")", ":", "library_os_path", ",", "library_path", ",", "library_name", ",", "item_key", "=", "self", ".", "extract_library_properties_from_selected_row", "(", ")", "if", "library_path", "is", "None", ":", "return", ...
Returns the LibraryState which was selected in the LibraryTree :return: selected state in TreeView :rtype: LibraryState
[ "Returns", "the", "LibraryState", "which", "was", "selected", "in", "the", "LibraryTree" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/controllers/library_tree.py#L426-L440
DLR-RM/RAFCON
source/rafcon/core/states/state.py
State.start
def start(self, execution_history, backward_execution=False, generate_run_id=True): """ Starts the execution of the state in a new thread. :return: """ self.execution_history = execution_history if generate_run_id: self._run_id = run_id_generator() self.backw...
python
def start(self, execution_history, backward_execution=False, generate_run_id=True): """ Starts the execution of the state in a new thread. :return: """ self.execution_history = execution_history if generate_run_id: self._run_id = run_id_generator() self.backw...
[ "def", "start", "(", "self", ",", "execution_history", ",", "backward_execution", "=", "False", ",", "generate_run_id", "=", "True", ")", ":", "self", ".", "execution_history", "=", "execution_history", "if", "generate_run_id", ":", "self", ".", "_run_id", "=", ...
Starts the execution of the state in a new thread. :return:
[ "Starts", "the", "execution", "of", "the", "state", "in", "a", "new", "thread", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/state.py#L247-L257
DLR-RM/RAFCON
source/rafcon/core/states/state.py
State.join
def join(self): """ Waits until the state finished execution. """ if self.thread: self.thread.join() self.thread = None else: logger.debug("Cannot join {0}, as the state hasn't been started, yet or is already finished!".format(self))
python
def join(self): """ Waits until the state finished execution. """ if self.thread: self.thread.join() self.thread = None else: logger.debug("Cannot join {0}, as the state hasn't been started, yet or is already finished!".format(self))
[ "def", "join", "(", "self", ")", ":", "if", "self", ".", "thread", ":", "self", ".", "thread", ".", "join", "(", ")", "self", ".", "thread", "=", "None", "else", ":", "logger", ".", "debug", "(", "\"Cannot join {0}, as the state hasn't been started, yet or i...
Waits until the state finished execution.
[ "Waits", "until", "the", "state", "finished", "execution", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/state.py#L262-L270
DLR-RM/RAFCON
source/rafcon/core/states/state.py
State.setup_run
def setup_run(self): """ Executes a generic set of actions that has to be called in the run methods of each derived state class. :raises exceptions.TypeError: if the input or output data are not of type dict """ self.state_execution_status = StateExecutionStatus.ACTIVE self.pree...
python
def setup_run(self): """ Executes a generic set of actions that has to be called in the run methods of each derived state class. :raises exceptions.TypeError: if the input or output data are not of type dict """ self.state_execution_status = StateExecutionStatus.ACTIVE self.pree...
[ "def", "setup_run", "(", "self", ")", ":", "self", ".", "state_execution_status", "=", "StateExecutionStatus", ".", "ACTIVE", "self", ".", "preempted", "=", "False", "if", "not", "isinstance", "(", "self", ".", "input_data", ",", "dict", ")", ":", "raise", ...
Executes a generic set of actions that has to be called in the run methods of each derived state class. :raises exceptions.TypeError: if the input or output data are not of type dict
[ "Executes", "a", "generic", "set", "of", "actions", "that", "has", "to", "be", "called", "in", "the", "run", "methods", "of", "each", "derived", "state", "class", "." ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/state.py#L272-L283
DLR-RM/RAFCON
source/rafcon/core/states/state.py
State.recursively_preempt_states
def recursively_preempt_states(self): """Preempt the state """ self.preempted = True self.paused = False self.started = False
python
def recursively_preempt_states(self): """Preempt the state """ self.preempted = True self.paused = False self.started = False
[ "def", "recursively_preempt_states", "(", "self", ")", ":", "self", ".", "preempted", "=", "True", "self", ".", "paused", "=", "False", "self", ".", "started", "=", "False" ]
Preempt the state
[ "Preempt", "the", "state" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/core/states/state.py#L296-L301