Skip to content

Lyon1-Asterix/Abstraction-ControllerServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Abstraction Controller Server

This project aims to provide a generic abstraction of any existing controller. The client-side code should keep a minimum size, as it only sees a generic joystick : the server, on which all the drivers are installed, retrieves and translates all the data from the controller into buttons and axes.

Currently, the only implemented controller is the Leap Motion. We are working right now on at least three other controllers.

Prerequisites

Installation

  • Clone the project
  • cd Abstraction-ControllerServer
  • make

Usage

  • Server side
    • Connect your Leap Motion
      • Linux : run sudo leapd
      • Mac OS : just run Leap Motion
    • ./bin/LeapServer <nb_client> <port>
  • Client side
    • C/C++

      #include "socklib.h" // disponible dans /include
      
      int main() {
           int socketClient = CreeSocketClient ("127.0.0.1", "2222");
      
           if (socketClient == -1) {
                fprintf(stderr,"erreur de connexion sur la socket");
                exit (1)
           }
      
           //bla bla
      
           return 0;
      }
      
    • JAVA

      import java.net.*;
      import java.io.*;
      
      public class Client {
          public static void main(String[] args) {
              try {
                  Socket socket = new Socket ("127.0.0.1", 2222);
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
      }
      

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published