RTDS Connection with DACS user through websocket

Hi I'm trying to find an example where the connection to RRTO is through a RTDS/TREP whith the DACS user but all uses the machine id, password, and client id

Is there a way to connect to the RTDS though websocket with a DACS user?
im using python or node

The EMA examples for Java works but i'm not able to replicate the connection through a ws:// or wss:// protocol

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @carlosrodrigo.arce01

    Thank you for reaching out to us.

    The WebSocket examples avialble on GitHub.

    The DACS user is specified in the login request.

    def send_login_request(ws):
        """ Generate a login request from command line data (or defaults) and send """
        login_json = {
            'ID': 1,
            'Domain': 'Login',
            'Key': {
                'Name': '',
                'Elements': {
                    'ApplicationId': '',
                    'Position': ''
                }
            }
        }


        login_json['Key']['Name'] = user
        login_json['Key']['Elements']['ApplicationId'] = app_id
        login_json['Key']['Elements']['Position'] = position


        ws.send(json.dumps(login_json))
        print("SENT:")
        print(json.dumps(login_json, sort_keys=True

Answers

  • Hello @carlosrodrigo.arce01

    About the "The EMA examples for Java works but i'm not able to replicate the connection through a ws:// or wss:// protocol" message, does your RTDS enable the WebSocket connection?

    If your ADS server has been configured the WebSocket connection, an application should be able to connect via the following WebSocket URL (for the default non-encrypted ADS connection):

    ws://ADS_Host:WebSocket_Port/WebSocket