Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

coletiv/universal-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started with Universal SDK

This is the Universal implementation in the C language.

Development

The library has the following development dependencies:

To install all the development and build tools just run the script:

 /scripts/setup.sh

Transport Specific Files

Some files are specific to each platform. The library provides a default implementation that can/should be overriden.

Files with default implementation:

  • universal_transport_reachability.c

Transport Session, Messages and Types

The transport component relies on C code generation for several source files.

Session

The Session ("transport_session.c") is based on a finite-state machine (fsm). The fms is specified using Ragel (http://www.colm.net/open-source/ragel/).

To generate the source file run the script:

/scripts/gen_transport_session.sh

Types and Messages

The types and messages are specified in a YAML file (lib/universal_transport_types.yml). Each type has several properties and messages. The code generation of the respective source files ("transport_types." and "transport_messages.") is executed by a ruby script that parses the specification and generates all the C code needed to create the type objects and serialized/deserialize the messages.

To generate the source file run the script:

/scripts/gen_transport_types_messages.sh

Build and Install

To install the library dependencies run:

/scripts/deps.sh

To run the library unit tests do:

make check

To build the static library do:

make 

Usage

TODO

Dependencies

The dependencies are: