Go to the documentation of this file.
   40         usingTopic(getProperty<std::string>(
"LaserScannerTopicName").getValue());
 
   67                                                  const std::string& name,
 
   68                                                  const LaserScan& scan,
 
   70                                                  const Ice::Current& 
c)
 
   72         std::unique_lock lock(dataMutex);
 
   83         float minDistance = FLT_MAX;
 
   84         float minAngle = 0.0f;
 
   85         float maxDistance = -FLT_MAX;
 
   86         float maxAngle = 0.0f;
 
   87         float distanceSum = 0.0f;
 
   88         for (LaserScanStep 
const& step : scan)
 
   90             distanceSum += step.distance;
 
   91             if (step.distance < minDistance)
 
   93                 minDistance = step.distance;
 
   94                 minAngle = step.angle;
 
   96             if (step.distance > maxDistance)
 
   98                 maxDistance = step.distance;
 
   99                 maxAngle = step.angle;
 
  107                 device, 
"minAngle", minAngle, 
"angle with minimal distance in scan");
 
  110                 device, 
"maxAngle", maxAngle, 
"angle with maximal distance in scan");
 
  111             float averageDistance = distanceSum / scan.size();
 
  113                 device, 
"averageDistance", averageDistance, 
"average distance in scan");
 
  
 
void updateChannel(const std::string &channelName, const std::set< std::string > &updatedDatafields=std::set< std::string >())
Update all conditions for a channel.
 
void reportSensorValues(const std::string &device, const std::string &name, const LaserScan &scan, const TimestampBasePtr ×tamp, const Ice::Current &c) override
 
bool offerOrUpdateDataField(std::string channelName, std::string datafieldName, const Variant &value, const std::string &description)
 
void onConnectObserver() override
Framework hook.
 
bool existsChannel(const std::string &channelName) const
 
void onExitObserver() override
Framework hook.
 
PropertyDefinitionsPtr createPropertyDefinitions() override
 
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
 
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
 
void onInitObserver() override
Framework hook.
 
void offerConditionCheck(std::string checkName, ConditionCheck *conditionCheck)
Offer a condition check.
 
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
 
This file offers overloads of toIce() and fromIce() functions for STL container types.
 
void offerChannel(std::string channelName, std::string description)
Offer a channel.