// Sets beam width as an Basic::Angle bool RfSensor::setSlotBeamWidth(const Basic::Angle* const msg) { bool ok = false; if (msg != 0) { LCreal x = static_cast<LCreal>(Basic::Radians::convertStatic( *msg )); ok = setBeamWidth( x ); if (!ok) { std::cerr << "RfSensor::setBeamWidth: Error setting beam width!" << std::endl; } } return ok; }
// Sets beam width in radians bool RfSensor::setSlotBeamWidth(const Basic::Number* const msg) { bool ok = false; if (msg != 0) { ok = setBeamWidth( msg->getReal() ); if (!ok) { std::cerr << "RfSensor::setBeamWidth: Error setting beam width!" << std::endl; } } return ok; }
// Sets beam width as an base::Angle bool RfSensor::setSlotBeamWidth(const base::Angle* const msg) { bool ok = false; if (msg != nullptr) { const double x = static_cast<double>(base::Radians::convertStatic( *msg )); ok = setBeamWidth( x ); if (!ok) { std::cerr << "RfSensor::setBeamWidth: Error setting beam width!" << std::endl; } } return ok; }