Results 1 to 2 of 2

Thread: Confused about interacting with devices

  1. #1

    Default Confused about interacting with devices

    I'm thoroughly confused about how to interact with devices using a custom plugin. I know I'm missing something, but I'm not sure where to begin.

    Current environment:
    - Raspberry Pi running Girder 6 as a backend
    - Win 7 running the frontend
    - New group with just a "Scripting" action which contains the following code:
    conn ='', 5000)
    - A simple python script runs on which echos back "OK...{received_text}"

    I can send a "hello\n" to, however, I don't understand how to capture and parse the response. Is this something that should be done solely via LUA? I was under the impression that a response could be acted upon by an event or another action.

    Secondly, how do you send different commands based on other actions using the same connection?

    Any help would be greatly appreciated. TIA!

  2. #2
    Join Date
    Jan 1998
    Jupiter, FL


    Well typically you use the transport classes with transactions. A transaction holds the part to send and a function that captures the return value. The simpleSendAndReceive example basically cuts that down and provides a way to send and receive without transactions (not what you usually want doing a driver ). To receive data you have to copy the lua file and implement the onDataReceived function to do what you want.

    The GlobalCache or PIO-1 plugin are examples of how transactions would work. The manual shows how to do it.
    No support through PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts