Skip to content

Commit

Permalink
Add configurable documentation variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Aug 29, 2024
1 parent d34d2de commit 69f7dfe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/isar/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from isar.config import predefined_missions
from robot_interface.models.robots.robot_model import RobotModel
from robot_interface.telemetry.payloads import VideoStream
from robot_interface.telemetry.payloads import VideoStream, DocumentInfo


class Settings(BaseSettings):
Expand Down Expand Up @@ -190,6 +190,16 @@ def __init__(self) -> None:
# Serial number of the robot ISAR is connected to
SERIAL_NUMBER: str = Field(default="0001")

# Info about robot documentation
DOCUMENTATION: List[DocumentInfo] = Field(
default=[
DocumentInfo(
name="Some document",
url="Some URL",
),
]
)

# Endpoints to reach video streams for the robot
VIDEO_STREAMS: List[VideoStream] = Field(
default=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def run(self) -> None:
robot_model=robot_settings.ROBOT_MODEL, # type: ignore
robot_serial_number=settings.SERIAL_NUMBER,
robot_asset=settings.PLANT_SHORT_NAME,
documentation=settings.DOCUMENTATION,
video_streams=settings.VIDEO_STREAMS,
host=settings.API_HOST_VIEWED_EXTERNALLY,
port=settings.API_PORT,
Expand Down
7 changes: 7 additions & 0 deletions src/robot_interface/telemetry/payloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ class TelemetryPressurePayload(TelemetryPayload):
pressure_level: float


@dataclass
class DocumentInfo:
name: str
url: str


@dataclass
class VideoStream:
name: str
Expand Down Expand Up @@ -69,6 +75,7 @@ class RobotInfoPayload:
robot_model: str
robot_serial_number: str
robot_asset: str
documentation: List[DocumentInfo]
video_streams: List[VideoStream]
host: str
port: int
Expand Down

0 comments on commit 69f7dfe

Please sign in to comment.