mardi 30 mai 2017

How to use the write() function from AdsLib

A project is organized as follow

/project

  • CMakeLists.txt
  • Makefile
  • sensorSource.cpp
  • example.cpp
  • example.bin
  • Adsdef.h
  • AdsLib.h
  • AdsLib-Linux.a

/build

  • sensorsource

In sensorSource.cpp data acquisition through sensor, data processing and computation of a position point is performed.

In example.cpp is used to establish communication between PC and embedded PC via

write(); // #include "AdsLib.h"

The question is how to use this write(); in sensorSource.cpp so that the computed position information can be forwarded directly from sensorSource.cpp to the embedded PC.

Just to elaborate more, here Makefile refers to example.cpp and CMakeLists.txt refers to sensorSource.cpp

1) In search of a reliable solution first i thought to write the equivalent of Makefile code in CMakeLists so to compile both source files using CMakeLists.txt but unfortunately I am totally stuck here with no idea how to fuse this Makefile and CMakeLists.txt or possibility to include (Adsdef.h, AdsLib.h, AdsLib-Linux.a) in sensorSource.cpp any suggestions how to approach the problem further on ?

thanks :)

Aucun commentaire:

Enregistrer un commentaire