FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


fx_plan_stack

fx_plan_stack

Introduction

The fx_plan_stack is a library written in C / C++ that simplifies communication and control between a computer and a FlexSEA device. This page will guide you through installing and working with the fx_plan_stack.

There are several advantages to using the fx_plan_stack compared to the old stack:

  • User can now connect with multiple devices simultaneously.
  • Streaming has become considerably more efficient
  • User can easily configure message contents
  • Larger messages can be transmitted without cycling through “data offsets”
  • User can configure streams using their own custom tx_ functions.

Currently the fx_plan_stack allows your program code to be written in:

Documentation

DLLs

The fx_plan_stack API is provided by a Dynamic Link Library (DLL) in the Windows environment. There are currently two DLLs, a 32-bit version and a 64-bit version. Each DLL provides the same functionality and can be used with multiple languages - both compiled and interpreted.

Interface Functions

Find detailed information about the fx_plan_stack API Interface functions.

Constants

A description of all of the field IDs can be found here.

A description of all of the modes can be found here.

fx_plan_stack setup

Pre-compiled binaries

Pre-compiled libraries are included in the Actuator Package repository. We are looking at a better way to distribute this, but for now clone the Actuator Package repository.

  1. Open a terminal, and navigate to where you would like to place the library source.
  2. Execute the following commands
git clone https://github.com/DephyInc/Actuator-Package.git [name_of_directory_to_clone_into]

Building it yourself

On other platforms you will need to build the library from scratch, including its dependencies.

Serial Library

Windows requirements:

Unix requirements:

  • gcc / g++ / make
  • CMake for your distrubition

Build steps:

  1. Open a terminal, and navigate to where you would like to place the library source.
  2. Execute the following commands
    git clone -b dev https://github.com/DephyInc/serial.git [name_of_directory_to_clone_into]
    cd [name_of_directory_to_clone_into]
    git checkout dev
    mkdir build
    cd build
  3. Run CMake to generate a makefile
    [On Windows]
    cmake .. -G "MinGW Makefiles"
    [on Unix]
    cmake ..
  4. Run make
    [On Windows]
    mingw32-make
    [on Unix]
    make
FlexSEA-Stack-Plan.dll

Requirements:

  • Eclipse + working C compiler

Build Steps:

  1. Navigate to the directory where you'd like to store the source code
  2. Clone the git repository and switch to the appropriate branch
    git clone --recursive https://github.com/DephyInc/FlexSEA-Stack-SharedLib.git [name_of_directory]
    
  3. Open the project in eclipse
    1. Open eclipse
    2. Select File > Import…
    3. Select “Existing Projects into Workspace”
    4. Select the folder that you've just cloned
  4. Select the build configuration according to your platform
    1. Select Project > Build Configurations > Set Active…
  5. Ensure you have the proper build settings
    1. Right click on the Project under project explorer and select Properties from the context menu
    2. Navigate to C/C++ Build > Settings
    3. Under Tool Settings > GCC C Compiler > Preprocesser, ensure the following are defined
      • BUILD_SHARED_LIB_DLL
      • TEST_PC
      • INCLUDE_UPROJ_ACTPACK
      • BOARD_TYPE_FLEXSEA_PLAN
    4. Under Tool Settings > GCC C Compiler > Miscellaneous, ensure Position Independent Code is checked
    5. Under Build Artifact ensure Artifact Type: Static Library is selected
  6. Build the project (click the hammer button)
fx_plan_stack

Requirements:

  • git
  • Qt / cmake

Building with cmake:

  1. Clone the git repository
    git clone https://github.com/DephyInc/fx_plan_stack.git
    git checkout dev
  2. Copy the libraries you've compiled into the lib or lib64 folder (replace whatever is there)
  3. Open a terminal and run cmake & make in a build directory
    mkdir build && cd build
    [for Windows...]
    cmake .. -G "MinGW Makefiles"
    mingw32-make
    [for Unix..]
    cmake ..
    make
fx_plan_stack.txt · Last modified: 2018/11/19 19:07 by dtscbs