Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtRemote C++ and Node demo #170

Closed
jmgasper opened this issue May 9, 2018 · 0 comments
Closed

rtRemote C++ and Node demo #170

jmgasper opened this issue May 9, 2018 · 0 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented May 9, 2018

This ticket will track building a demonstration that we can use to show off the functionality for the client.

There will be two pieces:

Server

The server will be implemented in C++. The server will expose a set of "Service Manager" objectsthat the Node app will consume. The exact details will be detailed below.

Server properties

These are the objects that will be exposed by the server for this demo. These values match actual values that will be exposed by the embedded device. The mock can be close to what's below,
making integration with the real rtRemote services on a real device easier.

The demo server should be very verbose in it's output, ensuring we can properly trace sets / gets from the sample client.

For the current resolution, we want to be able to set this value from the client to one of:

  • "420p"
  • "720p"
  • "1080p"
  • "4k"

“ConnectedVideoDisplays” - for display settings service. (read only)

{
   "connectedVideoDisplays": ["Component0", "HDMI0"]
}

“CurrentResolution” - for display settings service. (read / write)

{
    "resolution": "720p",
}

“isUpnpEnabled” - for home networking APIs. (read only)

{
  "powerState": null,
   "enabled": true
}

“getDiscoveredDevices” - for home networking APIs. (read only)

        {
            "upnpResults": [{
                "recvDevType": "null",
                "baseTrmUrl": "ws://169.254.80.89:9988<http://169.254.80.89:9988><http://169.254.80.89:9988><http://169.254.80.89:9988>",
                "requiresTRM": "true",
                "gatewayip": "169.254.80.89",
                "timezone": "EST05",
                "systemids": "channelMapId:65535;controllerId:65535;plantId:0;vodServerId:17733",
                "playbackUrl": "http://169.254.80.89:8080/hnStreamStart?deviceId=P0102803520&DTCP1HOST=169.254.80.89&DTCP1PORT=5000",
                "isgateway": "yes",
                "buildVersion": "null",
                "dnsconfig": "nameserver 8.8.8.8;",
                "hostMacAddress": "14:d4:fe:a4:03:92",
                "baseStreamingUrl": "http://169.254.80.89:8080/videoStreamInit?recorderId=P0102803520",
                "hosts": "10.252.180.80 ccpapp-dt-v001-i.dt.ccp.cable.comcast.com;",
                "receiverid": "P0102803520",
                "sno": "PAPV00010132"
            }],
            "powerState": null,
        }

Client

The client will be implemented in Node.

The client should be a node library that can be loaded in Node interactive mode. The client was very specific that the Node code will be run from the interactive console. You can provide a script for testing, but the actual demo will be run interactively.

For each setting, we should provide clear utility functions that can be loaded separately and used, for instance:

* server.setCurrentResolution('480p');
* server.getConnectedVideoDisplays();

For instance, we will want to:

  • Open Node interactive console
  • Load the rtRemote library and the demo utility library
  • Run the command to connect to the remote demo server
  • Run commands to manipulate settings in the remote server
  • Close the connection

Documentation of both the server and client is important! . Please ensure the Node client file has good, reasonable, informative documentation, and that the usage of the Node client utilities is well documented.

Documentation is very important for this challenge.

Separate computers

One requirement is that the server and client can be run on separate computers. In production, a small embedded device will be exposing details via rtRemote and a laptop may be used to connect to the embedded device and manipulate service settings.

Make sure the demo can gracefully handle lost connections.

Target

We will target the current master branch here. Please provide a patch file against 8570e29 or later. We will use that to create a new branch for testing and eventual merging into master.

https://github.com/pxscene/pxCore

Note that we have a few fixes here that haven't been merged yet, so keep those in mind if you run into issues with the C++ implementation:

pxscene#1012

And unit tests that haven't been merged yet:

pxscene#1024

Documentation

This document should help get you set up with pxCore on an Ubuntu instance:

step-by-step-duktape-linux-build.md.zip

And these two files will help with testing / verification of rtRemote itself:

Archive.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant