docs: add docs to CB
Pretty much every class and method should have documentation now. ref: N25B-295
This commit is contained in:
@@ -5,16 +5,34 @@ from pydantic import BaseModel
|
||||
|
||||
|
||||
class RIEndpoint(str, Enum):
|
||||
"""
|
||||
Enumeration of valid endpoints for the Robot Interface (RI).
|
||||
"""
|
||||
|
||||
SPEECH = "actuate/speech"
|
||||
PING = "ping"
|
||||
NEGOTIATE_PORTS = "negotiate/ports"
|
||||
|
||||
|
||||
class RIMessage(BaseModel):
|
||||
"""
|
||||
Base schema for messages sent to the Robot Interface.
|
||||
|
||||
:ivar endpoint: The target endpoint/action on the RI.
|
||||
:ivar data: The payload associated with the action.
|
||||
"""
|
||||
|
||||
endpoint: RIEndpoint
|
||||
data: Any
|
||||
|
||||
|
||||
class SpeechCommand(RIMessage):
|
||||
"""
|
||||
A specific command to make the robot speak.
|
||||
|
||||
:ivar endpoint: Fixed to ``RIEndpoint.SPEECH``.
|
||||
:ivar data: The text string to be spoken.
|
||||
"""
|
||||
|
||||
endpoint: RIEndpoint = RIEndpoint(RIEndpoint.SPEECH)
|
||||
data: str
|
||||
|
||||
Reference in New Issue
Block a user