Skip to content

Commit

Permalink
implement system wide synthesis tagging standard
Browse files Browse the repository at this point in the history
  • Loading branch information
David Conner committed Mar 4, 2024
1 parent c4624b0 commit 61b1079
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions flexbe_states/flexbe_states/calculation_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class CalculationState(EventState):
calculation is a function which takes exactly one parameter, input_value from userdata,
and its return value is stored in output_value after leaving the state.
-- calculation function The function that performs the desired calculation.
-- calculation function The function that performs the desired calculation.
It could be a private function (self.foo) manually defined in a behavior's source code
or a lambda function (e.g., lambda x: x^2, where x will be the input_value).
># input_value object Input to the calculation function.
># input_value object Input to the calculation function.
#> output_value object The result of the calculation.
#> output_value object The result of the calculation.
<= done Indicates completion of the calculation.
<= done completed Indicates completion of the calculation.
"""

def __init__(self, calculation):
Expand Down
4 changes: 2 additions & 2 deletions flexbe_states/flexbe_states/check_condition_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class CheckConditionState(EventState):
># input_value object Input to the predicate function.
<= true Returned if the condition evaluates to True
<= false Returned if the condition evaluates to False
<= true completed Returned if the condition evaluates to True
<= false failure Returned if the condition evaluates to False
"""

def __init__(self, predicate):
Expand Down
2 changes: 1 addition & 1 deletion flexbe_states/flexbe_states/flexible_calculation_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class FlexibleCalculationState(EventState):
#> output_value object The result of the calculation.
<= done Indicates completion of the calculation.
<= done completed Indicates completion of the calculation.
"""

def __init__(self, calculation, input_keys):
Expand Down
4 changes: 2 additions & 2 deletions flexbe_states/flexbe_states/flexible_check_condition_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class FlexibleCheckConditionState(EventState):
># input_keys object[] Input(s) to the calculation function as a list of userdata.
The individual inputs can be accessed as list elements (see lambda expression example).
<= true Returned if the condition evaluates to True
<= false Returned if the condition evaluates to False
<= true completed Returned if the condition evaluates to True
<= false failure Returned if the condition evaluates to False
"""

def __init__(self, predicate, input_keys):
Expand Down
8 changes: 4 additions & 4 deletions flexbe_states/flexbe_states/input_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ class InputState(EventState):
#> data object The data provided by the operator. The exact type depends on the request.
<= received Returned as soon as valid data is available.
<= aborted The operator declined to provide the requested data.
<= no_connection No request could be sent to the operator.
<= data_error Data has been received, but could not be deserialized successfully.
<= received completed Returned as soon as valid data is available.
<= aborted failure The operator declined to provide the requested data.
<= no_connection failure No request could be sent to the operator.
<= data_error failure Data has been received, but could not be deserialized successfully.
Note: This state uses the Pickle module, and is subject to this warning from the Pickle manual:
Warning: The pickle module is not secure against erroneous or maliciously constructed data.
Expand Down
2 changes: 1 addition & 1 deletion flexbe_states/flexbe_states/log_key_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LogKeyState(EventState):
#> data object The data provided to be printed in the message. The exact type depends on the request.
<= done Indicates that the message has been logged.
<= done completed Indicates that the message has been logged.
"""

def __init__(self, text, severity=Logger.REPORT_HINT):
Expand Down
6 changes: 3 additions & 3 deletions flexbe_states/flexbe_states/log_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ class LogState(EventState):
Can be used to precisely inform the operator about what happened to the behavior.
-- text string The message to be logged to the terminal.
-- severity uint8 Type of logging (Logger.REPORT_INFO / WARN / HINT / ERROR)
-- text string The message to be logged to the terminal.
-- severity uint8 Type of logging (Logger.REPORT_INFO / WARN / HINT / ERROR)
<= done Indicates that the message has been logged.
<= done completed Indicates that the message has been logged.
"""

def __init__(self, text, severity=Logger.REPORT_HINT):
Expand Down
2 changes: 1 addition & 1 deletion flexbe_states/flexbe_states/publisher_bool_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PublisherBoolState(EventState):
>= value Value of bool.
<= done Done publishing.
<= done completed Done publishing.
"""

def __init__(self, topic):
Expand Down
2 changes: 1 addition & 1 deletion flexbe_states/flexbe_states/publisher_empty_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PublisherEmptyState(EventState):
-- topic string The topic on which should be published.
<= done Done publishing.
<= done completed Done publishing.
"""

def __init__(self, topic):
Expand Down
2 changes: 1 addition & 1 deletion flexbe_states/flexbe_states/publisher_string_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PublisherStringState(EventState):
>= value Value of string.
<= done Done publishing.
<= done completed Done publishing.
"""

def __init__(self, topic):
Expand Down
14 changes: 7 additions & 7 deletions flexbe_states/flexbe_states/subscriber_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ class SubscriberState(EventState):
"""
Gets the latest message on the given topic and stores it to userdata.
-- topic string The topic on which should be listened.
-- blocking bool Blocks until a message is received.
-- clear bool Drops last message on this topic on enter
in order to only handle message received since this state is active.
-- topic string The topic on which should be listened.
-- blocking bool Blocks until a message is received.
-- clear bool Drops last message on this topic on enter
in order to only handle message received since this state is active.
#> message object Latest message on the given topic of the respective type.
#> message object Latest message on the given topic of the respective type.
<= received Message has been received and stored in userdata or state is not blocking.
<= unavailable The topic is not available when this state becomes actives.
<= received completed Message has been received and stored in userdata or state is not blocking.
<= unavailable failure The topic is not available when this state becomes actives.
"""

def __init__(self, topic, msg_type="", blocking=True, clear=False):
Expand Down
4 changes: 2 additions & 2 deletions flexbe_states/flexbe_states/wait_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class WaitState(EventState):
"""
Implements a state that can be used to wait on timed process.
-- wait_time float Amount of time to wait in seconds.
-- wait_time float Amount of time to wait in seconds.
<= done Indicates that the wait time has elapsed.
<= done completed Indicates that the wait time has elapsed.
"""

def __init__(self, wait_time):
Expand Down

0 comments on commit 61b1079

Please sign in to comment.