INET Framework for OMNeT++/OMNEST
inet::units::value< Value, Units > Class Template Reference

#include <Units.h>

Inheritance diagram for inet::units::value< Value, Units >:
inet::ClockUserModuleMixin< T > inet::Macho::Anchor< T, I > inet::OperationalMixin< T > inet::queueing::MultiTokenBucketMixin< T > inet::queueing::TokenBucketClassifierMixin< T > inet::queueing::TokenBucketMeterMixin< T > inet::queueing::TokenBucketMixin< T >

Public Types

typedef Value value_type
 
typedef Units unit
 

Public Member Functions

 value ()
 
 value (const value_type &v)
 
template<typename OtherValue , typename OtherUnits >
 value (const value< OtherValue, OtherUnits > &v)
 
std::string str () const
 
const value_typeget () const
 
void set (const value_type &v)
 
template<typename OtherValue , typename OtherUnits >
valueoperator= (const value< OtherValue, OtherUnits > &other)
 
template<typename OtherValue , typename OtherUnits , typename ResultValue = typename std::remove_cv<decltype(Value() + OtherValue())>::type>
value< ResultValue, Units > operator+ (const value< OtherValue, OtherUnits > &other) const
 
template<typename OtherValue , typename OtherUnits >
valueoperator+= (const value< OtherValue, OtherUnits > &other)
 
template<typename OtherValue , typename OtherUnits >
valueoperator-= (const value< OtherValue, OtherUnits > &other)
 
template<typename OtherValue , typename OtherUnits , typename ResultValue = typename std::remove_cv<decltype(Value() - OtherValue())>::type>
value< ResultValue, Units > operator- (const value< OtherValue, OtherUnits > &other) const
 
value operator- () const
 
template<typename OtherValue , typename OtherUnits , typename ResultValue = typename std::remove_cv<decltype(Value() * OtherValue())>::type>
value< ResultValue, compose< Units, OtherUnits > > operator* (const value< OtherValue, OtherUnits > &other) const
 
template<typename OtherValue >
value operator* (OtherValue v) const
 
valueoperator*= (const value_type &v)
 
template<typename OtherValue , typename OtherUnits , typename ResultValue = typename std::remove_cv<decltype(Value() / OtherValue())>::type>
value< ResultValue, compose< Units, pow< OtherUnits, -1 > > > operator/ (const value< OtherValue, OtherUnits > &other) const
 
value operator/ (const value_type &v) const
 
valueoperator/= (const value_type &v)
 
template<typename OtherValue , typename OtherUnits >
bool operator== (const value< OtherValue, OtherUnits > &other) const
 
template<typename OtherValue , typename OtherUnits >
bool operator!= (const value< OtherValue, OtherUnits > &other) const
 
template<typename OtherValue , typename OtherUnits >
bool operator< (const value< OtherValue, OtherUnits > &other) const
 
template<typename OtherValue , typename OtherUnits >
bool operator<= (const value< OtherValue, OtherUnits > &other) const
 
template<typename OtherValue , typename OtherUnits >
bool operator> (const value< OtherValue, OtherUnits > &other) const
 
template<typename OtherValue , typename OtherUnits >
bool operator>= (const value< OtherValue, OtherUnits > &other) const
 
valueoperator++ ()
 
value operator++ (int)
 
valueoperator-- ()
 
value operator-- (int)
 

Private Attributes

value_type m_rep
 

Member Typedef Documentation

◆ unit

template<typename Value , typename Units >
typedef Units inet::units::value< Value, Units >::unit

◆ value_type

template<typename Value , typename Units >
typedef Value inet::units::value< Value, Units >::value_type

Constructor & Destructor Documentation

◆ value() [1/3]

◆ value() [2/3]

template<typename Value , typename Units >
inet::units::value< Value, Units >::value ( const value_type v)
inlineexplicit
91  : m_rep(v)
92  {
93  }

◆ value() [3/3]

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
inet::units::value< Value, Units >::value ( const value< OtherValue, OtherUnits > &  v)
inline
96  :
98  {
99  }

Member Function Documentation

◆ get()

template<typename Value , typename Units >
const value_type& inet::units::value< Value, Units >::get ( ) const
inline
109  {
110  return m_rep;
111  }

Referenced by inet::SharingRegionTagSet::RegionTag< T >::_getTag(), inet::StreamingTransmitter::abortTx(), inet::StreamThroughTransmitter::abortTx(), inet::Ipv6Header::addExtensionHeader(), inet::SharingRegionTagSet::addTagsWhereAbsent(), inet::physicallayer::MqamModulationBase::calculateBER(), inet::PacketTransmitterBase::calculateClockTimeDuration(), inet::physicallayer::MqamModulationBase::calculateSER(), inet::physicallayer::BpskModulation::calculateSER(), inet::queueing::PeriodicGate::canPacketFlowThrough(), inet::physicallayer::ConstantSpeedPropagation::computeArrival(), inet::physicallayer::ScalarNoise::computeMaxPower(), inet::physicallayer::ScalarNoise::computeMinPower(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::computeNoise(), inet::physicallayer::IsotropicScalarBackgroundNoise::computeNoise(), inet::physicallayer::Ieee80211BerTableErrorModel::computePacketErrorRate(), inet::physicallayer::BreakpointPathLoss::computePathLoss(), inet::physicallayer::BreakpointPathLoss::computeRange(), inet::physicallayer::ScalarAnalogModelBase::computeReceptionPower(), inet::physicallayer::TwoRayInterference::computeTwoRayInterference(), inet::L3NetworkConfiguratorBase::computeWirelessLinkWeight(), inet::physicallayer::ApskLayeredTransmitter::createAnalogModel(), inet::physicallayer::DimensionalTransmitterBase::createGainFunction(), inet::physicallayer::ApskRadio::decapsulate(), inet::physicallayer::ApskPhyHeaderSerializer::deserialize(), inet::GenericAppMsgSerializer::deserialize(), inet::VoipStreamPacketSerializer::deserialize(), inet::PimPacketSerializer::deserialize(), inet::bgp::BgpHeaderSerializer::deserialize(), inet::FieldsChunkSerializer::deserialize(), inet::ospfv2::Ospfv2PacketSerializer::deserialize(), inet::ospfv2::Ospfv2PacketSerializer::deserializeAsExternalLsa(), inet::ospfv2::Ospfv2PacketSerializer::deserializeNetworkLsa(), inet::ospfv2::Ospfv2PacketSerializer::deserializeSummaryLsa(), inet::units::doParsimPacking(), inet::ieee80211::RateControlBase::emitDatarateChangedSignal(), inet::power::SimpleEpEnergyManagement::executeNodeOperation(), inet::physicallayer::Ieee80211ModeSet::findMode(), inet::get_pointer(), inet::physicallayer::Ieee80211YansErrorModel::getBpskBer(), inet::physicallayer::Ieee80211OfdmMode::getCcaTime(), inet::physicallayer::Ieee80211NistErrorModel::getDataSuccessRate(), inet::physicallayer::Ieee80211YansErrorModel::getDataSuccessRate(), inet::physicallayer::Ieee80211NistErrorModel::getDSSSAndHrDSSSChunkSuccessRate(), inet::physicallayer::Ieee80211YansErrorModel::getDSSSAndHrDSSSChunkSuccessRate(), inet::physicallayer::Ieee80211FhssDataMode::getDuration(), inet::physicallayer::Ieee80211DsssDataMode::getDuration(), inet::physicallayer::Ieee80211IrDataMode::getDuration(), inet::physicallayer::Ieee80211HrDsssDataMode::getDuration(), inet::physicallayer::Ieee80211VhtModeBase::getGrossBitrate(), inet::physicallayer::Ieee80211OfdmModeBase::getGrossBitrate(), inet::physicallayer::Ieee80211HtModeBase::getGrossBitrate(), inet::physicallayer::MediumLimitCache::getMaxCommunicationRange(), inet::physicallayer::MediumLimitCache::getMaxInterferenceRange(), inet::physicallayer::Ieee80211ModeSet::getMode(), inet::physicallayer::Ieee80211VhtModeBase::getNetBitrate(), inet::physicallayer::Ieee80211OfdmModeBase::getNetBitrate(), inet::physicallayer::Ieee80211HtModeBase::getNetBitrate(), inet::physicallayer::Ieee80211OfdmMode::getPhyRxStartDelay(), inet::physicallayer::Ieee80211YansErrorModel::getQamBer(), inet::physicallayer::Ieee80211OfdmMode::getSifsTime(), inet::physicallayer::Ieee80211OfdmMode::getSlotTime(), inet::SharingRegionTagSet::getTagIndex(), inet::physicallayer::SpaceAndFrequencyDependentAttenuationFunction::getValue(), inet::physicallayer::SpaceDependentAttenuationFunction::getValue(), inet::physicallayer::PropagatedTransmissionPowerFunction::getValue(), inet::power::SimpleEpEnergyStorage::handleMessage(), inet::physicallayer::FlatRadioBase::handleUpperCommand(), inet::physicallayer::NarrowbandRadioBase::handleUpperCommand(), inet::ieee80211::Ieee80211Mac::handleUpperCommand(), inet::Udp::handleUpperPacket(), inet::physicallayer::ErrorModelBase::hasProbabilisticError(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::initialize(), inet::physicallayer::Ieee80211LayeredOfdmTransmitter::initialize(), inet::physicallayer::FreeSpacePathLoss::initialize(), inet::tcp::TcpReceiveQueue::insertBytesFromSegment(), inet::physicallayer::RadioMedium::isInCommunicationRange(), inet::physicallayer::RadioMedium::isInInterferenceRange(), inet::EulerAngles::isUnspecified(), inet::queueing::FlowMeasurementRecorder::makeMeasurement(), inet::SharingRegionTagSet::mapAllTags(), inet::SharingRegionTagSet::mapAllTagsForUpdate(), inet::queueing::PacketTaggerBase::markPacket(), inet::queueing::StatisticalRateLimiter::matchesPacket(), inet::physicallayer::maxIgnoreNaN(), inet::physicallayer::minIgnoreNaN(), inet::EulerAngles::normalize(), inet::tcp::TcpReceiveQueue::offsetToSeq(), inet::operator!=(), inet::units::value< Value, Units >::operator!=(), inet::units::value< Value, Units >::operator*(), inet::units::operator*(), inet::units::value< Value, Units >::operator+(), inet::units::value< Value, Units >::operator-(), inet::units::value< Value, Units >::operator/(), inet::units::operator/(), inet::operator<(), inet::units::value< Value, Units >::operator<(), inet::operator<<(), inet::units::operator<<(), inet::units::value< Value, Units >::operator<=(), inet::operator==(), inet::units::value< Value, Units >::operator==(), inet::units::value< Value, Units >::operator>(), inet::units::value< Value, Units >::operator>=(), inet::ospfv3::Ospfv3Area::originateInterAreaPrefixLSA(), inet::ospfv3::Ospfv3Area::originateIntraAreaPrefixLSA(), inet::ospfv3::Ospfv3Interface::originateLinkLSA(), inet::ospfv3::Ospfv3Area::originateNetIntraAreaPrefixLSA(), inet::ospfv3::Ospfv3Area::originateNetworkLSA(), inet::ospfv2::Ospfv2Area::originateRouterLSA(), inet::rtp::RtcpPacket::paddingAndSetLength(), inet::FieldsChunk::parsimPack(), inet::Packet::parsimPack(), inet::math::DividedFunction< R, D >::partition(), inet::ByteCountChunk::peekUnchecked(), inet::BytesChunk::peekUnchecked(), inet::ospfv3::Ospfv3Interface::prepareLSUHeader(), inet::ospfv3::Ospfv3Interface::prepareUpdatePacket(), inet::Ipv4ProtocolPrinter::print(), inet::Ipv6ProtocolPrinter::print(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::printToStream(), inet::tcp::TcpConnection::process_RCV_SEGMENT(), inet::tcp::TcpConnection::processSegment1stThru8th(), inet::StreamThroughTransmitter::progressTx(), inet::queueing::PacketBasedTokenGenerator::pushPacket(), inet::PacketStreamer::pushPacket(), inet::PreemptableStreamer::pushPacket(), inet::utils::filters::ReceptionMinSignalPowerFilter::receiveSignal(), inet::utils::filters::FlowPacketLengthFilter::receiveSignal(), inet::power::SimpleEpEnergyManagement::refreshDisplay(), inet::StreamingTransmitterBase::scheduleAt(), inet::power::SimpleEpEnergyManagement::scheduleLifecycleOperationTimer(), inet::power::SimpleEpEnergyStorage::scheduleTimer(), inet::ospfv3::Ospfv3Neighbor::sendDDPacket(), inet::ospfv3::Ospfv3Interface::sendDelayedAcknowledgements(), inet::sctp::SctpAssociation::sendOnPath(), inet::Rip::sendRoutes(), inet::physicallayer::RadioMedium::sendToAffectedRadios(), inet::tcp::TcpConnection::sendToIP(), inet::GenericAppMsgSerializer::serialize(), inet::EtherAppReqSerializer::serialize(), inet::UnitDiskPhyHeaderSerializer::serialize(), inet::VoipStreamPacketSerializer::serialize(), inet::physicallayer::ApskPhyHeaderSerializer::serialize(), inet::ApplicationPacketSerializer::serialize(), inet::AckingMacHeaderSerializer::serialize(), inet::Ipv4HeaderSerializer::serialize(), inet::FieldsChunkSerializer::serialize(), inet::EtherAppRespSerializer::serialize(), inet::power::SimpleCcBattery::setResidualCapacity(), inet::power::SimpleEpEnergyStorage::setResidualCapacity(), inet::MassMobility::setTargetPosition(), inet::units::sqrt(), inet::EthernetCsmaMac::startFrameTransmission(), inet::math::toDouble(), inet::ieee80211::Dcf::transmitControlResponseFrame(), inet::ieee80211::Hcf::transmitControlResponseFrame(), inet::power::IdealEpEnergyStorage::updateEnergyBalance(), inet::power::AlternatingEpEnergyConsumer::updatePowerConsumption(), inet::power::AlternatingEpEnergyGenerator::updatePowerGeneration(), inet::power::CcEnergyStorageBase::updateTotalCurrentConsumption(), inet::power::CcEnergyStorageBase::updateTotalCurrentGeneration(), inet::power::EpEnergyStorageBase::updateTotalPowerConsumption(), and inet::power::EpEnergyStorageBase::updateTotalPowerGeneration().

◆ operator!=()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
bool inet::units::value< Value, Units >::operator!= ( const value< OtherValue, OtherUnits > &  other) const
inline
201  {
202  return get() != value(other).get();
203  }

◆ operator*() [1/2]

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits , typename ResultValue = typename std::remove_cv<decltype(Value() * OtherValue())>::type>
value<ResultValue, compose<Units, OtherUnits> > inet::units::value< Value, Units >::operator* ( const value< OtherValue, OtherUnits > &  other) const
inline
159  {
160  return value<ResultValue, compose<Units, OtherUnits>>(get() * other.get());
161  }

◆ operator*() [2/2]

template<typename Value , typename Units >
template<typename OtherValue >
value inet::units::value< Value, Units >::operator* ( OtherValue  v) const
inline
165  {
166  return value(get() * v);
167  }

◆ operator*=()

template<typename Value , typename Units >
value& inet::units::value< Value, Units >::operator*= ( const value_type v)
inline
170  {
171  m_rep *= v;
172  return *this;
173  }

◆ operator+()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits , typename ResultValue = typename std::remove_cv<decltype(Value() + OtherValue())>::type>
value<ResultValue, Units> inet::units::value< Value, Units >::operator+ ( const value< OtherValue, OtherUnits > &  other) const
inline
127  {
128  return value<ResultValue, Units>(get() + value<OtherValue, Units>(other).get());
129  }

◆ operator++() [1/2]

template<typename Value , typename Units >
value& inet::units::value< Value, Units >::operator++ ( )
inline
230  {
231  ++m_rep;
232  return *this;
233  }

◆ operator++() [2/2]

template<typename Value , typename Units >
value inet::units::value< Value, Units >::operator++ ( int  )
inline
236  {
237  value v = *this;
238  ++m_rep;
239  return v;
240  }

◆ operator+=()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
value& inet::units::value< Value, Units >::operator+= ( const value< OtherValue, OtherUnits > &  other)
inline
133  {
134  m_rep += value(other).get();
135  return *this;
136  }

◆ operator-() [1/2]

template<typename Value , typename Units >
value inet::units::value< Value, Units >::operator- ( ) const
inline
152  {
153  return value(-get());
154  }

◆ operator-() [2/2]

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits , typename ResultValue = typename std::remove_cv<decltype(Value() - OtherValue())>::type>
value<ResultValue, Units> inet::units::value< Value, Units >::operator- ( const value< OtherValue, OtherUnits > &  other) const
inline
147  {
148  return value<ResultValue, Units>(get() - value<OtherValue, Units>(other).get());
149  }

◆ operator--() [1/2]

template<typename Value , typename Units >
value& inet::units::value< Value, Units >::operator-- ( )
inline
243  {
244  --m_rep;
245  return *this;
246  }

◆ operator--() [2/2]

template<typename Value , typename Units >
value inet::units::value< Value, Units >::operator-- ( int  )
inline
249  {
250  value v = *this;
251  --m_rep;
252  return v;
253  }

◆ operator-=()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
value& inet::units::value< Value, Units >::operator-= ( const value< OtherValue, OtherUnits > &  other)
inline
140  {
141  m_rep -= value(other).get();
142  return *this;
143  }

◆ operator/() [1/2]

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits , typename ResultValue = typename std::remove_cv<decltype(Value() / OtherValue())>::type>
value<ResultValue, compose<Units, pow<OtherUnits, -1> > > inet::units::value< Value, Units >::operator/ ( const value< OtherValue, OtherUnits > &  other) const
inline
178  {
179  return value<ResultValue, compose<Units, pow<OtherUnits, -1>>>(get() / other.get());
180  }

◆ operator/() [2/2]

template<typename Value , typename Units >
value inet::units::value< Value, Units >::operator/ ( const value_type v) const
inline
183  {
184  return value(get() / v);
185  }

◆ operator/=()

template<typename Value , typename Units >
value& inet::units::value< Value, Units >::operator/= ( const value_type v)
inline
188  {
189  m_rep /= v;
190  return *this;
191  }

◆ operator<()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
bool inet::units::value< Value, Units >::operator< ( const value< OtherValue, OtherUnits > &  other) const
inline
207  {
208  return get() < value(other).get();
209  }

◆ operator<=()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
bool inet::units::value< Value, Units >::operator<= ( const value< OtherValue, OtherUnits > &  other) const
inline
213  {
214  return get() <= value(other).get();
215  }

◆ operator=()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
value& inet::units::value< Value, Units >::operator= ( const value< OtherValue, OtherUnits > &  other)
inline
120  {
121  m_rep = value(other).get();
122  return *this;
123  }

◆ operator==()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
bool inet::units::value< Value, Units >::operator== ( const value< OtherValue, OtherUnits > &  other) const
inline
195  {
196  return get() == value(other).get();
197  }

◆ operator>()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
bool inet::units::value< Value, Units >::operator> ( const value< OtherValue, OtherUnits > &  other) const
inline
219  {
220  return get() > value(other).get();
221  }

◆ operator>=()

template<typename Value , typename Units >
template<typename OtherValue , typename OtherUnits >
bool inet::units::value< Value, Units >::operator>= ( const value< OtherValue, OtherUnits > &  other) const
inline
225  {
226  return get() >= value(other).get();
227  }

◆ set()

template<typename Value , typename Units >
void inet::units::value< Value, Units >::set ( const value_type v)
inline
114  {
115  m_rep = v;
116  }

Referenced by inet::units::doParsimUnpacking().

◆ str()

Member Data Documentation

◆ m_rep


The documentation for this class was generated from the following file:
inet::units::value::value
value()
Definition: Units.h:87
inet::units::internal::convert::fn
static V fn(const V &v)
Definition: Units.h:358
inet::units::value::m_rep
value_type m_rep
Definition: Units.h:256
inet::units::value::get
const value_type & get() const
Definition: Units.h:108