Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
R
Robot Server
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 7
    • Issues 7
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1
    • Merge Requests 1
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ARI
  • IA ROBOT V2
  • Robot Server
  • Wiki
  • Home

Last edited by Lacoin Achille Nov 20, 2019
Page history

Home

Instructions

How to interact with the robot

Each of your serial device must be associated to a class inheriting from the Board class, defined in the module devices.boards.base.

In order to associate the class instance with the serial device, a condition must be met: your serial board must respond to the message "I" by giving the name of the custom Board class.

How to use a fake serial devices

You can fake a connection by creating a json config file in the directory settings/fake.

The id field specify the associated Board class, the messages field the fake request and responses.

Example

Here we specify a fake connection associated with the Dummy Board

{
  "id": "Dummy",
  "messages": {
    "Hello": "World!"
  }
}
class Dummy(Board):
    def hello(self):
        self.connection.send_message("Hello")
        return self.connection.receive_message()

In order to associate the two files, we need to add this dummy board to the required boards in settings/robot.json

{
    "required_boards": [
        "Dummy"
    ]
}

Interacting with your board

You can now access

python3
>>> from robot.robot import Robot
>>> r = Robot()
>>> r.load_boards()
>>> r.available_methods["Hello"]()
World!
Clone repository
  • Home