Changeset 111 in pacpussensors for trunk/StdDbtPlayerComponents


Ignore:
Timestamp:
Dec 15, 2015, 1:19:48 PM (9 years ago)
Author:
DHERBOMEZ Gérald
Message:

Delete deprecated call to shared memories. Use I/O mechanism instead.
Adjustement of dllimport and dllexport macros;

Location:
trunk/StdDbtPlayerComponents
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/StdDbtPlayerComponents/CMakeLists.txt

    r110 r111  
    88set(${PROJECT_NAME}_VERSION_MAJOR 0)
    99set(${PROJECT_NAME}_VERSION_MINOR 1)
    10 #add_definitions( -DSTDDBTPLAYERCOMPONENTS_EXPORTS )
    11 #add_definitions( -DDBTPLYSICK_EXPORTS)
    12 #add_definitions( -DDBTPLYSICK_EXPORTS)
    13 add_definitions( -DPACPUSLIB_EXPORTS)
     10add_definitions( -DSTDDBTPLAYERCOMPONENTS_EXPORTS )
     11add_definitions( -DDBTPLYSICK_EXPORTS)
     12add_definitions( -DDBTPLYGPS_EXPORTS)
     13
     14
    1415################################################################################
    1516create_export(EXPORT_HDR ${PROJECT_NAME})
  • trunk/StdDbtPlayerComponents/DbtPlyAlascaManager.cpp

    r108 r111  
    2929static ComponentFactory<DbtPlyAlascaManager> sFactory("DbtPlyAlascaManager");
    3030
    31 static const char * kAlaskaMemoryName = "alasca";
     31//static const char * kAlaskaMemoryName = "alasca";// deprecated
    3232
    3333//////////////////////////////////////////////////////////////////////////
     
    3838    LOG_TRACE("constructor(" << name << ")");
    3939
    40     mShMem = new ShMem(kAlaskaMemoryName, sizeof(ScanAlascaData));
     40    // mShMem = new ShMem(kAlaskaMemoryName, sizeof(ScanAlascaData)); // deprecated
    4141}
    4242
     
    4646{
    4747    LOG_TRACE("destructor");
    48     delete mShMem;
     48    //delete mShMem; // deprecated
    4949}
    5050
     
    121121    int32_t utcMagicWord = 0;
    122122    mDataFile.read(reinterpret_cast<char *>(&(utcMagicWord)), sizeof(utcMagicWord));
    123     if (UTC_MAGIC_WORD != utcMagicWord) {
     123   /* if (UTC_MAGIC_WORD != utcMagicWord) {
    124124        LOG_WARN("corrupted data, do not use them!");
    125125        LOG_DEBUG("wrong magic word: EXPECTED=" << UTC_MAGIC_WORD << ", ACTUAL=" << utcMagicWord);
     
    127127        LOG_TRACE("writing scan");
    128128        mShMem->write(&mAlascaData, sizeof(ScanAlascaData));
    129     }
     129    }*/ // deprecated
    130130
    131131    if (mVerbose) {
  • trunk/StdDbtPlayerComponents/DbtPlyAlascaManager.h

    r110 r111  
    1919//#include "structure/structure_telemetre.h"
    2020#include "../Alasca/AlascaData.h"
     21#include "StdDbtPlayerComponentsConfig.h"
    2122
    2223namespace pacpus {
     
    2425class ShMem;
    2526
    26 class PACPUSLIB_API DbtPlyAlascaManager
     27class STDDBTPLAYERCOMPONENTS_API DbtPlyAlascaManager
    2728        : public DbtPlyFileManager
    2829{
     
    4041
    4142private:
    42     ShMem * mShMem;
     43    //ShMem * mShMem;// deprecated
    4344    ScanAlascaData mAlascaData;
    4445
  • trunk/StdDbtPlayerComponents/DbtPlyCPTComponent.cpp

    r110 r111  
    5353    LOG_INFO("sizeof(trame_inscov)=" << sizeof(trame_inscov));
    5454
    55     mShMem = new ShMem("SPAN_FRAMES", AllFramesSize);
     55    // mShMem = new ShMem("SPAN_FRAMES", AllFramesSize); // deprecated
    5656    allFramesBuffer = new char[AllFramesSize];
    5757}
     
    6262{
    6363    delete[] allFramesBuffer;
    64     delete mShMem;
     64    // delete mShMem; // deprecated
    6565}
    6666
     
    137137            memcpy(allFramesBuffer, &bestgpsposaFrame_, sizeof(TimestampedBestgpsposaFrame));
    138138            //ShMem refresh
    139             mShMem->write(allFramesBuffer, AllFramesSize);
     139            // mShMem->write(allFramesBuffer, AllFramesSize); // deprecated
    140140
    141141            {
     
    156156                   + sizeof(TimestampedBestgpsposaFrame),
    157157                   &rawimuFrame_, sizeof(TimestampedRawimusaFrame));
    158             mShMem->write(allFramesBuffer, AllFramesSize);
     158            // mShMem->write(allFramesBuffer, AllFramesSize); // deprecated
    159159
    160160            {
     
    189189                   + sizeof(TimestampedBestgpsposaFrame) +sizeof(TimestampedRawimusaFrame),
    190190                   &inspvaFrame_, sizeof(TimestampedInspvaaFrame));
    191             mShMem->write(allFramesBuffer, AllFramesSize);
     191            // mShMem->write(allFramesBuffer, AllFramesSize); // deprecated
    192192
    193193            {
     
    236236                   + sizeof(TimestampedBestgpsposaFrame) + sizeof(TimestampedRawimusaFrame) + sizeof(TimestampedInspvaaFrame),
    237237                   &inscovFrame_, sizeof(TimestampedInscovFrame));
    238             mShMem->write(allFramesBuffer, AllFramesSize);
     238            // mShMem->write(allFramesBuffer, AllFramesSize); // deprecated
    239239
    240240            {
  • trunk/StdDbtPlayerComponents/DbtPlyCPTComponent.h

    r110 r111  
    1616#include "DbitePlayer/DbtPlyFileManager.h"
    1717#include "../NMEA0183/include/nmea0183.h"
    18 
     18#include "StdDbtPlayerComponentsConfig.h"
    1919
    2020#define UNKNOWN_NMEA_FRAME -1
    2121
    22 struct PACPUSLIB_API Stream8Position
     22struct STDDBTPLAYERCOMPONENTS_API Stream8Position
    2323{
    2424    int32_t dataPos;
     
    3636class ShMem;
    3737
    38 class PACPUSLIB_API DbtPlyCPTComponent
     38class STDDBTPLAYERCOMPONENTS_API DbtPlyCPTComponent
    3939        : public DbtPlyFileManager
    4040{
  • trunk/StdDbtPlayerComponents/DbtPlyGgaManager.h

    r110 r111  
    3434namespace pacpus {
    3535
    36 class PACPUSLIB_API DbtPlyGgaManager
     36class DBTPLYGPS_API DbtPlyGgaManager
    3737        : public DbtPlyFileManager
    3838{
  • trunk/StdDbtPlayerComponents/DbtPlyGstManager.h

    r110 r111  
    2929namespace pacpus {
    3030
    31 class PACPUSLIB_API DbtPlyGstManager
     31class DBTPLYGPS_API DbtPlyGstManager
    3232        : public DbtPlyFileManager
    3333{
  • trunk/StdDbtPlayerComponents/DbtPlyImageManager.cpp

    r110 r111  
    3939    : DbtPlyFileManager (name)
    4040    , im_(NULL)
    41     , shMem_(NULL)
     41    //, shMem_(NULL) // deprecated
    4242    , imageMutex_(new QMutex())
    4343    , firstTime(true)
     
    5151    delete imageMutex_;
    5252    // #endif
    53     if (shMem_) {
     53   /* if (shMem_) {
    5454        delete shMem_;
    5555        shMem_ = NULL;
    56     }
     56    }*/
    5757}
    5858
     
    114114        }
    115115        LOG_TRACE("image loaded");
    116         if (firstTime) {
     116       /* if (firstTime) {
    117117            // send image in shared memory
    118118            shmemSize = im_->byteCount();
     
    121121            firstTime = false;
    122122        }
    123         shMem_->write(im_->bits(), shmemSize);
     123        shMem_->write(im_->bits(), shmemSize);*/ // deprecated
    124124    }
    125125        break;
     
    134134ComponentBase::COMPONENT_CONFIGURATION DbtPlyImageManager::configureComponent(XmlComponentConfig config)
    135135{   
    136     mShMemName = kDefaultMemoryName.c_str();
     136    /*mShMemName = kDefaultMemoryName.c_str();
    137137    if (config.getProperty("shmem") != QString::null) {
    138138        mShMemName = config.getProperty("shmem");
    139     }
     139    } */ // deprecated
    140140    if (config.getIntProperty("ui") == 1) {
    141141        displayUI();
  • trunk/StdDbtPlayerComponents/DbtPlyImageManager.h

    r110 r111  
    1616
    1717#include "Pacpus/DbitePlayer/DbtPlyFileManager.h"
    18 
     18#include "StdDbtPlayerComponentsConfig.h"
    1919
    2020class QImage;
     
    2828///
    2929///     shmem=STRING (name of output shared memory) default=IMAGE
    30 class PACPUSLIB_API DbtPlyImageManager
     30class STDDBTPLAYERCOMPONENTS_API DbtPlyImageManager
    3131        : public DbtPlyFileManager
    3232{
     
    5858private:
    5959    QMutex * imageMutex_;
    60     ShMem * shMem_;
     60   // ShMem * shMem_; // deprecated
    6161    bool firstTime;
    6262
  • trunk/StdDbtPlayerComponents/DbtPlySickLDMRSManager.h

    r110 r111  
    3838class ShMem;
    3939
    40 class PACPUSLIB_API DbtPlySickLDMRSManager
     40class DBTPLYSICK_API DbtPlySickLDMRSManager
    4141        : public DbtPlyFileManager
    4242{
  • trunk/StdDbtPlayerComponents/DbtPlySickLMSManager.h

    r110 r111  
    1818#include "Pacpus/DbitePlayer/DbtPlyFileManager.h"
    1919#include "../Sick/SickLMSData.h"
     20#include "StdDbtPlayerComponentsConfig.h"
    2021
    2122
     
    2425class ShMem;
    2526
    26 class PACPUSLIB_API DbtPlySickLMSManager
     27class STDDBTPLAYERCOMPONENTS_API DbtPlySickLMSManager
    2728        : public DbtPlyFileManager
    2829{
  • trunk/StdDbtPlayerComponents/DbtPlyVtgManager.h

    r110 r111  
    3030class ComponentManager;
    3131
    32 class PACPUSLIB_API DbtPlyVtgManager
     32class DBTPLYGPS_API DbtPlyVtgManager
    3333        : public DbtPlyFileManager
    3434{
Note: See TracChangeset for help on using the changeset viewer.