Giter Site home page Giter Site logo

tp1-so-2015b's Introduction

Air Traffic Controller

Installation

Requirements:

  • Make
  • A modern C compiler (Clang, GCC, std99)
  • A UNIX environment
  • ncurses

The project has multiple binaries. The default target all builds atc (a stand-alone executable), atcd-socket and atcc-socket. The transport can be changed overriding the BACKEND parameter and defaults to socket.

Examples:

make atc

Builds the stand-alone binary

make BACKEND="pipe"

Builds atc, atcd-pipe, and atcc-pipe.

Notes on NCurses

For Ubuntu 14.04

apt-get install libncurses5-dev

Debugging

The binaries are compiled with -O0 -g by default. GDB and Valgrind can be used for debugging.

Structure

The project is divided into six main modules and some extra support files:

  • ATCC: Frontend, client side logic.
  • CLI: Re-implements the ATCD functions as proxy calls to the API.
  • COMM: A bi-directional communication layer, used by Protocol.
    • Pipe
    • File
    • Socket
    • Queue
    • Shmem
  • SRV: Server side logic, does all the forking and client management, while child processes call the backend functions.
  • ATCD: Game logic, keeps the game state and runs the simulation.
  • STO: Data storage abstraction layer (w/locking + concurrency control.)
  • Protocol: Common message/protocol functions and header. Backend-agnostic.

Combo table:

ATCC CLI COMM - msg.h SRV ATCD - STO Result
X X atc
X X socket atcc-socket
socket X X atcd-socket
X X shmem atcc-shmem
shmem X X atcd-shemm

Compilation Details

Make will re-compile the binaries when the follwing files get updated:

Condition atc atcc-${BACKEND} atcd-${BACKEND}
Any *.h X X X
atcc/*.c X X
atcd/*.c X X
transport/*.c X X
transport/**.c X X
protocol/*.c X X
cli/*.c X
srv/*.c X
storage/*.c X X

Additionally, Make will set these preprocessor variables: ATC_BACKEND_$(BACKEND_IN_UPPERCASE) and ATC_BACKEND=$(BACKEND_IN_UPPERCASE).

tp1-so-2015b's People

Contributors

pcostesi avatar bsespede avatar sebamaio avatar

Watchers

 avatar  avatar James Cloos avatar  avatar  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.