OMAPI  1.8
Open Movement Public API
Introduction to the API

The Open Movement application programming interface (API) provides an interface to communicate with AX3 longitudinal movement data loggers. The devices feature a state of the art MEMS 3-axis accelerometer, flash-based on-board memory, a real time quartz clock, temperature sensor and light sensor.

The API is part of Open Movement, and is licensed under on Open Source license: the BSD 2-clause license, by Newcastle University.

The AX3 device uses a standard USB connector and enumerates on PC when connected. The device is a "composite USB device" consisting of a communications device class (CDC) and a mass storage device (MSD).
The CDC interface presents a virtual serial port for device query and configuration – the configuration software sends simple text configuration commands over this channel. The MSD interface presents a general purpose disk drive and file system, which includes the dataset file.

The API presents a consistent view of all connected devices, with set of operations for each.
This provides a common foundation for higher-level interactions, such as the Graphical User Interface.

Design Goals

The API has been designed to:

  • be a simple, plain C interface.
  • be cross-platform (targeting Windows, Mac OS, Linux).
  • be statically or dynamically linked to C or C++ code.
  • be used directly from C++, or a simple object-oriented wrapper class.
  • be readily used from other languages, e.g. a .NET wrapper class through p/invoke; JNI for Java.
  • be thread-safe, in that it anticipates being called from multiple threads, and internally handles the required mutual exclusion.
  • handle errors via user-checked return values (it is expected that wrapper libraries can choose raise exceptions as suitable for a language).

Requirements

The API is platform-agnostic, but parts of the implementation require some platform-specific functionality. The API currently works on Windows (XP, Vista, 7, 8, 10), Mac OS X, Linux.

The core API is written in plain C, and is easily wrapped by C++ (i.e. by an object-oriented class), or, as it can be built as a DLL with undecorated exports, other languages such as .NET (through p/invoke of the DLL). Wrappers also exist for Java and Node.js.

See also
Getting Started with the API