Changeset 88:faa57cda0c54 in finroc_plugins_data_ports


Ignore:
Timestamp:
05.02.2015 11:53:02 (4 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Removed all #ifdef _LIB_FINROC_PLUGINS_DATA_COMPRESSION_PRESENT_ after realizing that it is bad e.g. for system installations if memory layout and also behavior differ depending on whether a optional plugin that actually depends on finroc_plugins_data_ports is available.

Location:
standard
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • standard/tPortBufferManager.cpp

    r87 r88  
    7171tPortBufferManager::tPortBufferManager() : 
    7272  unused(true), 
    73   derived_from(NULL) 
    74 #ifdef _LIB_FINROC_PLUGINS_DATA_COMPRESSION_PRESENT_ 
    75   , compression_status(0), 
     73  derived_from(NULL), 
     74  compression_status(0), 
    7675  compressed_data() 
    77 #endif 
    7876{} 
    7977 
  • standard/tPortBufferManager.h

    r87 r88  
    119119      return; 
    120120    } 
    121 #ifdef _LIB_FINROC_PLUGINS_DATA_COMPRESSION_PRESENT_ 
     121 
    122122    if (!compressed_data) 
    123123    { 
     
    128128    std::get<1>(*compressed_data) = compression_format; 
    129129    std::get<2>(*compressed_data) = key_frame; 
    130     this->compression_status = 3;  // Enum value for "data available" (see data_compression::tPlugin) 
    131 #endif 
     130    this->compression_status = 3;  // Enum value for "data available" (see finroc::data_compression::tPlugin) 
    132131  } 
    133132 
     
    163162  { 
    164163    this->unused = unused; 
    165 #ifdef _LIB_FINROC_PLUGINS_DATA_COMPRESSION_PRESENT_ 
    166164    this->compression_status = 0; 
    167 #endif 
    168165  } 
    169166 
     
    179176  tPortBufferManager* derived_from; 
    180177 
    181 #ifdef _LIB_FINROC_PLUGINS_DATA_COMPRESSION_PRESENT_ 
    182  
    183178  friend class data_compression::tPlugin; 
    184179 
     
    188183  /*! Info on compressed data (compressed data, compression format, key frame?) */ 
    189184  std::unique_ptr<std::tuple<rrlib::serialization::tMemoryBuffer, const char*, bool>> compressed_data; 
    190  
    191 #endif 
    192185 
    193186  tPortBufferManager(); 
  • standard/tStandardPort.cpp

    r87 r88  
    112112  current_value(0), 
    113113  standard_assign(!GetFlag(tFlag::NON_STANDARD_ASSIGN) && (!GetFlag(tFlag::HAS_QUEUE))), 
    114 #ifdef _LIB_FINROC_PLUGINS_DATA_COMPRESSION_PRESENT_ 
    115114  compression_active_status(-2), 
    116115  data_compressor_mutex("tStandardPort data compressor"), 
    117 #endif 
    118116  input_queue(), 
    119117  pull_request_handler(NULL) 
  • standard/tStandardPort.h

    r87 r88  
    434434  const bool standard_assign; 
    435435 
    436 #ifdef _LIB_FINROC_PLUGINS_DATA_COMPRESSION_PRESENT_ 
    437  
    438436  friend class data_compression::tPlugin; 
    439437 
    440   /*! Is compression enabled for this port? [31 bytes rule revision when this was checked, 1 byte enabled?] */ 
     438  /*! accessed by finroc_plugins_data_compression only: Is compression enabled for this port? [31 bytes rule revision when this was checked, 1 byte enabled?] */ 
    441439  std::atomic<uint32_t> compression_active_status; 
    442440 
    443   /*! Mutex for data compressors attached to this port */ 
     441  /*! accessed by finroc_plugins_data_compression only: Mutex for data compressors attached to this port */ 
    444442  rrlib::thread::tOrderedMutex data_compressor_mutex; 
    445  
    446 #endif 
    447443 
    448444  /*! Queue for ports with incoming value queue */ 
Note: See TracChangeset for help on using the changeset viewer.