@@ -33,13 +33,14 @@ def parse_message(
3333 self , message : str
3434 ) -> dict [str , str ] | dict [str , str | None ] | None :
3535 """Parses a message to the RobotState of the class.
36- Parameters:
37- -----------
36+
37+ Parameters
38+ ----------
3839 message: str
3940 Message to be parsed including `CRISTART` and `CRIEND`
4041
41- Returns:
42- --------
42+ Returns
43+ -------
4344 None | dict[str, str]
4445 None if no Notification in necessary or
4546 a dict indicating which answer event to notify (key: "answer") and optionally an error message (key: "error")
@@ -113,10 +114,10 @@ def _parse_status(self, parameters: list[str]) -> None:
113114 """
114115 Parses a state message to the robot state.
115116
116- Parameters:
117- -----------
118- parameters: list[str]
119- List of splitted strings between `STATUS` and `CRIEND`
117+ Parameters
118+ ----------
119+ parameters: list[str]
120+ List of splitted strings between `STATUS` and `CRIEND`
120121 """
121122 segment_start_idx = 0
122123
@@ -289,10 +290,10 @@ def _parse_runstate(self, parameters: list[str]) -> None:
289290 """
290291 Parses a runstate message to the robot state.
291292
292- Parameters:
293- -----------
294- parameters: list[str]
295- List of splitted strings between `RUNSTATE` and `CRIEND`
293+ Parameters
294+ ----------
295+ parameters: list[str]
296+ List of splitted strings between `RUNSTATE` and `CRIEND`
296297 """
297298 with self .robot_state_lock :
298299 if parameters [0 ] == "MAIN" :
@@ -314,10 +315,10 @@ def _parse_cyclestat(self, parameters: list[str]) -> None:
314315 """
315316 Parses a cyclestat message to the robot state.
316317
317- Parameters:
318- -----------
319- parameters: list[str]
320- List of splitted strings between `CYCLESTAT` and `CRIEND`
318+ Parameters
319+ ----------
320+ parameters: list[str]
321+ List of splitted strings between `CYCLESTAT` and `CRIEND`
321322 """
322323 with self .robot_state_lock :
323324 self .robot_state .cycle_time = float (parameters [0 ])
@@ -327,10 +328,10 @@ def _parse_gripperstate(self, parameters: list[str]) -> None:
327328 """
328329 Parses a gripperstate message to the robot state.
329330
330- Parameters:
331- -----------
332- parameters: list[str]
333- List of splitted strings between `GRIPPERSTATE` and `CRIEND`
331+ Parameters
332+ ----------
333+ parameters: list[str]
334+ List of splitted strings between `GRIPPERSTATE` and `CRIEND`
334335 """
335336 with self .robot_state_lock :
336337 self .robot_state .gripper_state = float (parameters [0 ])
@@ -339,10 +340,10 @@ def _parse_variables(self, parameters: Sequence[str]) -> None:
339340 """
340341 Parses a variables message to the robot state.
341342
342- Parameters:
343- -----------
344- parameters: list[str]
345- List of splitted strings between `VARIABLES` and `CRIEND`
343+ Parameters
344+ ----------
345+ parameters: list[str]
346+ List of splitted strings between `VARIABLES` and `CRIEND`
346347 """
347348 variables : dict [str , float | PosVariable ] = {}
348349 idx = 0
@@ -370,10 +371,10 @@ def _parse_opinfo(self, parameters: Sequence[str]) -> None:
370371 """
371372 Parses a opinfo message to the robot state.
372373
373- Parameters:
374- -----------
375- parameters: list[str]
376- List of splitted strings between `OPINFO` and `CRIEND`
374+ Parameters
375+ ----------
376+ parameters: list[str]
377+ List of splitted strings between `OPINFO` and `CRIEND`
377378 """
378379 values = []
379380 for i in range (7 ):
@@ -386,13 +387,13 @@ def _parse_cmd(self, parameters: Sequence[str]) -> str | None:
386387 """
387388 Parses a cmd message to the robot state.
388389
389- Parameters:
390- -----------
391- parameters: list[str]
392- List of splitted strings between `CMD` and `CRIEND`
390+ Parameters
391+ ----------
392+ parameters: list[str]
393+ List of splitted strings between `CMD` and `CRIEND`
393394
394- Returns:
395- --------
395+ Returns
396+ -------
396397 str:
397398 id of answer event
398399 """
@@ -414,10 +415,10 @@ def _parse_message_message(self, parameters: Sequence[str]) -> None:
414415 """
415416 Parses a message message to the robot state.
416417
417- Parameters:
418- -----------
419- parameters: list[str]
420- List of splitted strings between `MESSAGE` and `CRIEND`
418+ Parameters
419+ ----------
420+ parameters: list[str]
421+ List of splitted strings between `MESSAGE` and `CRIEND`
421422 """
422423 if parameters [0 ] == "RobotControl" :
423424 if parameters [1 ] == "Version" :
@@ -468,15 +469,15 @@ def _parse_can_bridge(self, parameters: Sequence[str]) -> dict[str, Any] | None:
468469 parameters: list[str]
469470 List of splitted strings between `CANBridge` and `CRIEND`
470471
471- Returns:
472- --------
472+ Returns
473+ -------
473474 dict[str, any] | None
474475 dict with the following keys:
475- id: CAN id
476- length: length of CAN packet
477- data: bytearray with can message
478- time: timestamp from CRI, 0 at the moment
479- system_time: system timestamp vrom CRI
476+ - id: CAN id
477+ - length: length of CAN packet
478+ - data: bytearray with can message
479+ - time: timestamp from CRI, 0 at the moment
480+ - system_time: system timestamp vrom CRI
480481 """
481482 if parameters [0 ] != "Msg" :
482483 return None
@@ -521,10 +522,10 @@ def _parse_config(self, parameters: Sequence[str]) -> None:
521522 """
522523 Parses a config message to the robot state.
523524
524- Parameters:
525- -----------
526- parameters: list[str]
527- List of splitted strings between `CONFIG` and `CRIEND`
525+ Parameters
526+ ----------
527+ parameters: list[str]
528+ List of splitted strings between `CONFIG` and `CRIEND`
528529 """
529530 if parameters [0 ] == "ProjectFile" :
530531 with self .robot_state_lock :
@@ -533,13 +534,13 @@ def _parse_config(self, parameters: Sequence[str]) -> None:
533534 def _parse_cmderror (self , parameters : Sequence [str ]) -> dict [str , str ]:
534535 """Parses a CMDERROR message to notify calling function
535536
536- Parameters:
537- -----------
537+ Parameters
538+ ----------
538539 parameters: list[str]
539540 List of splitted strings between `CMDERROR` and `CRIEND`
540541
541- Returns:
542- --------
542+ Returns
543+ -------
543544 dict[str, str]
544545 A dict indicating which message id to notify (key: "answer") and the error message (key: "error")
545546 """
@@ -550,10 +551,10 @@ def _parse_info(self, parameters: list[str]) -> str | None:
550551 """
551552 Parses a info message to the robot state.
552553
553- Parameters:
554- -----------
555- parameters: list[str]
556- List of splitted strings between `INFO` and `CRIEND`
554+ Parameters
555+ ----------
556+ parameters: list[str]
557+ List of splitted strings between `INFO` and `CRIEND`
557558 """
558559 if parameters [0 ] == "ReferencingInfo" :
559560 # handle bug in RobotControl with missing space before 'Mandatory'
@@ -603,13 +604,13 @@ def _parse_info(self, parameters: list[str]) -> str | None:
603604 def _parse_execerror (self , parameters : Sequence [str ]) -> dict [str , str ]:
604605 """Parses a EXECERROR message to notify calling function
605606
606- Parameters:
607- -----------
607+ Parameters
608+ ----------
608609 parameters: list[str]
609610 List of splitted strings between `EXECERROR` and `CRIEND`
610611
611- Returns:
612- --------
612+ Returns
613+ -------
613614 dict[str, str]
614615 A dict indicating which message id to notify (key: "answer") and the error message (key: "error")
615616 """
@@ -621,15 +622,15 @@ def _split_quotes_aware(msg: str) -> Sequence[str]:
621622 """
622623 Splits a string at whitespaces but ignores whitespace whithin quotes.
623624
624- Parameters:
625- -----------
626- msg: str
627- String to be splitted
625+ Parameters
626+ ----------
627+ msg: str
628+ String to be splitted
628629
629- Returns:
630- --------
631- list[str]
632- list containing the splitted parts of the string
630+ Returns
631+ -------
632+ list[str]
633+ list containing the splitted parts of the string
633634 """
634635 parts = []
635636 current_part = ""
0 commit comments