Skip to content
Snippets Groups Projects

Draft: Resolve "Implementation of new nodes creation"

Open Joan Vallvé Navarro requested to merge 454-implementation-of-new-nodes-creation into devel
4 files
+ 50
3
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -116,6 +116,7 @@ class SensorBase : public NodeStateBlocks
@@ -116,6 +116,7 @@ class SensorBase : public NodeStateBlocks
friend ProcessorBase;
friend ProcessorBase;
private:
private:
 
bool enabled_; ///< Sensor enabled
HardwareBaseWPtr hardware_ptr_;
HardwareBaseWPtr hardware_ptr_;
ProcessorBasePtrList processor_list_;
ProcessorBasePtrList processor_list_;
static unsigned int sensor_id_count_; ///< Object counter (acts as simple ID factory)
static unsigned int sensor_id_count_; ///< Object counter (acts as simple ID factory)
@@ -199,6 +200,13 @@ class SensorBase : public NodeStateBlocks
@@ -199,6 +200,13 @@ class SensorBase : public NodeStateBlocks
StateBlockPtr getIntrinsic();
StateBlockPtr getIntrinsic();
public:
public:
 
 
// enable/disable the sensor
 
bool isEnabled() const;
 
void enable();
 
void disable();
 
 
// Set the state block as fixed or unfixed
void fixExtrinsics();
void fixExtrinsics();
void unfixExtrinsics();
void unfixExtrinsics();
void fixIntrinsics();
void fixIntrinsics();
@@ -346,4 +354,19 @@ inline void SensorBase::setHardware(const HardwareBasePtr _hw_ptr)
@@ -346,4 +354,19 @@ inline void SensorBase::setHardware(const HardwareBasePtr _hw_ptr)
hardware_ptr_ = _hw_ptr;
hardware_ptr_ = _hw_ptr;
}
}
 
inline bool SensorBase::isEnabled() const
 
{
 
return enabled_;
 
}
 
 
inline void SensorBase::enable()
 
{
 
enabled_ = true;
 
}
 
 
inline void SensorBase::disable()
 
{
 
enabled_ = false;
 
}
 
} // namespace wolf
} // namespace wolf
Loading