Skip to content

MengWoods/tcn-open-static-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tcn-open-static-lib

This is the static library (linux-x86) of TCNOpen project for train communication. Train real time data protocol TRDP is the major protocol in train communication network.

Usage

  1. Clone the repository, put the repository under your project's include folder.
  2. In your code, include the needed librarys like this:
#include <tcn-open-static-lib/api/trdp_if_light.h>
#include <tcn-open-static-lib/api/tau_marshall.h>
#include <tcn-open-static-lib/vos/api/vos_utils.h>
...
  1. Then you are able to use the functions in the library, here you could find some examples codes.
  2. To compile your project with those libraries, link the static library in CMakeLists.txt file like this:
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")

add_library(${PROJECT_NAME} STATIC ${PROJECT_SOURCE})

target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS} ${PROJECT_SOURCE_DIR}/include/tcn-open-static-lib/libtrdp.a)

Build the static library yourself

  1. Clone source repository: TCNOpen.
  2. cd TCNopen/trdp/config; Copy your needed configuration from *_config to config.mk and save.
  3. cd ..; make
  4. Find the generated static library from trdp/bld/output.
  5. Put the *.a files and source code files into a folder as the target library to use.

Resources

About

The static library of Train Real Time Data Protocol

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published