Giter Club home page Giter Club logo

dial-reference's Introduction

DIAL



DIscovery And Launch—is a simple protocol that second-screen devices can use to discover and launch apps on first-screen devices.

DIAL page | DIAL protocol spec

Building the DIAL server

  1. Define the TARGET environment variable to point to the CC compiler prefix for your target platform.

  2. Run make, passing in your TARGET value.

   For example:
   TARGET=/usr/local/i686-DIAL-EXAMPLE/bin/i686-DIAL-EXAMPLE make

Running the DIAL server

The DIAL server should be started as a service, after the platform's networking has been initialized, and it should remain running at all times (a daemon process in the system).

Building the DIAL client

The DIAL client is a standalone C++ console application you can use to test a running DIAL server implementation on your device. Unlike the server, which is built for, and meant to run on your device, the client is meant to run on your desktop (development) machine.

The DIAL client uses CURL to send HTTP REST commands to the DIAL server, so to build the client, you need to ensure that the CURL dependencies are defined properly.

Alternatively, you can build against a different, current version of libcurl. Adjust the INCLUDES and LDFLAGS definitions to point to your actual libcurl header and library locations. In most cases, you can omit the TARGET define.

Note: the -rpath argument passed to LDFLAGS specifies the libcurl location to the runtime linker.

Running the DIAL client in interactive (menu) mode

  1. The DIAL client application must be running in the same subnet as the DIAL server.

  2. Start the client: ./dialclient (or ./dialclient -m) The on-screen menu will list all available actions.

Running the DIAL client in conformance test (non-interactive) mode

  1. The DIAL client application must be running in the same subnet as the DIAL server.

  2. Start the client: ./dialclient -i [input-file] [-o output-file] [-a server-IP-addr]

    In script-driven mode, the client reads in an input-file, executes the instructions in the input-file, and generates a report. The default file locations (which can be overridden) are: ./dialclient_input.txt ./report.html

DIAL client Usage

When running the DIAL client, you have the following options

usage: dialclient <option>

Option Parameter          Description
 -h     none               Usage menu
 -m     none               Use menu
 -o     filename           Reporter output file (./report.html)
 -i     filename           Input File (./dialclient_input.txt)
 -a     ip_address         IP addr of DIAL server (used for conformance testing)

If you do not provide an ip_address and multiple servers are discovered, the client will prompt you to select a server.

NEW: Node.js tests for DIAL server 2.1

Node.js tests to test DIAL server 2.1 implementation are now available under server/tests/js_tests. To run these tests againsts a DIAL server:

  1. Ensure that the DIAL server is discoverable from the test environment
  2. Install node in the test environment
  3. From the directory where the package.json is located (server/tests/js_tests), npm install

The tests themselves are located inside the server/tests/js_tests/tests folder. The file tests.js is a batch runner and will run all the tests serially. It takes the following arguments:

server/tests/js_tests/tests$ node tests.js

Usage: node tests.js[options]

Options:
  --host                             IP address of host on which DIAL server
                                     under test is running   [string] [required]
  --application, --app               Application to test     [string] [required]
  --timeToWaitForStateChange, --ttw  Time(ms) to wait between state changes
                                     before querying application status
                                                        [string] [default: 5000]
  --help, -h                         Show help                         [boolean]

To run each test independently and not through tests.js, just call the appropriate test file name.

Example:
server/tests/js_tests/tests$ node discoverServerUnderTest.js

Usage: node discoverServerUnderTest.js[options]

Options:
  --host                IP address of host on which DIAL server under test is
                        running                              [string] [required]
  --application, --app  Application to test                  [string] [required]
  --help, -h            Show help                                      [boolean]

Log file of test run is written in js_tests_log.txt in the server/tests/js_tests/tests folder.

dial-reference's People

Contributors

chintan09 avatar jcli avatar jcli-netflix avatar kemorrisnf avatar maxvonhippel avatar mdaftari avatar rjshruti88 avatar schneiderl avatar wouterlucas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.