Giter VIP home page Giter VIP logo

akclient's Introduction

AK Client

A client for the AK protocol used in the automotive industry - allows both scripted and interactive use.

No configuration required! AK commands are detected using a regular expression; by default a single word consisting of 4 or 5 uppercase letters (A-Z). For additional convenience a JSON file can be loaded containing meta data about the device, in particular the names of the response variables.

Ideal for writing complex test scripts in Groovy to automate the testing of devices. Groovy is a very powerful scripting language, and allows a syntax familiar to all the C++ developers in the automotive industry.

Getting Started

Apache Groovy must be installed to run the program, which in turn requires a Java JDK or JRE, ideally version 7 or higher.

To keep things simple, the entire program consists of a single file only, akclient.groovy. Depending on your system you may be able to start the script directly or by calling groovy akclient.groovy.

The files in the /examples folder are a good option to get familiar with the syntax.

Usage

akclient [options] [scriptfile(s)]
 -h,--help           Show usage information
 -i,--interactive    Interactive mode
 -p,--port <arg>     AK server port
 -s,--server <arg>   AK server host

The default connection is accessible via the ak variable. AK commands can be issued using either their "raw" form in a separate line (e.g. AKEN K0) or inline as methods of an AKConnection object (e.g. ak.AKEN()). Raw AK commands always use the default connection; the result can be retrieved with ak().

Scripted and interactive use can be combined in any order. For example, a user can run a script to prepare the correct state of the device, continue interactively using the open connection, followed by a scripted shutdown of the device.

If several files are given as input, they will be executed sequentially. Input can also be read from a pipe using shell redirection. Use exit or continue to leave the interactive mode.

See /examples for a few script files to learn more about the various features.

License

This project is licensed under the MIT License.

akclient's People

Contributors

josefhammer avatar

Stargazers

 avatar  avatar

Watchers

 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.