12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- """Module for the RosTimer action."""
15
+ """Module for the ROSTimer action."""
16
16
17
17
import asyncio
18
18
import collections .abc
39
39
40
40
41
41
@expose_action ('ros_timer' )
42
- class RosTimer (TimerAction ):
42
+ class ROSTimer (TimerAction ):
43
43
"""
44
44
Action that defers other entities until a period of time has passed, unless canceled.
45
45
@@ -56,15 +56,15 @@ def __init__(
56
56
** kwargs
57
57
) -> None :
58
58
"""
59
- Create a RosTimer .
59
+ Create a ROSTimer .
60
60
61
61
:param period: is the time (in seconds) to set the timer for.
62
62
:param actions: is an iterable containing actions to be executed upon on timeout.
63
63
"""
64
64
super ().__init__ (period = period , actions = actions , ** kwargs )
65
65
period_types = list (SomeSubstitutionsType_types_tuple ) + [float ]
66
- ensure_argument_type (period , period_types , 'period' , 'RosTimer ' )
67
- ensure_argument_type (actions , collections .abc .Iterable , 'actions' , 'RosTimer ' )
66
+ ensure_argument_type (period , period_types , 'period' , 'ROSTimer ' )
67
+ ensure_argument_type (actions , collections .abc .Iterable , 'actions' , 'ROSTimer ' )
68
68
self .__period = type_utils .normalize_typed_substitution (period , float )
69
69
self .__timer_future : Optional [asyncio .Future ] = None
70
70
@@ -94,16 +94,16 @@ def parse(
94
94
entity : Entity ,
95
95
parser : Parser ,
96
96
):
97
- """Return the `RosTimer ` action and kwargs for constructing it."""
97
+ """Return the `ROSTimer ` action and kwargs for constructing it."""
98
98
_ , kwargs = super ().parse (entity , parser )
99
99
kwargs ['period' ] = parser .parse_if_substitutions (
100
100
entity .get_attr ('period' , data_type = float , can_be_str = True ))
101
101
kwargs ['actions' ] = [parser .parse_action (child ) for child in entity .children ]
102
102
return cls , kwargs
103
103
104
104
def describe (self ) -> Text :
105
- """Return a description of this RosTimer ."""
106
- return 'RosTimer (period={}, actions=<actions>)' .format (self .__period )
105
+ """Return a description of this ROSTimer ."""
106
+ return 'ROSTimer (period={}, actions=<actions>)' .format (self .__period )
107
107
108
108
def execute (self , context : LaunchContext ):
109
109
self .__timer_future = create_future (context .asyncio_loop )
0 commit comments