|
WSF
|
The hardware component that can be attached to all comm systems. More...
#include <WsfCommComponentHW.hpp>


Classes | |
| class | AltFrequencyChangeEvent |
Public Member Functions | |
| ComponentHW () | |
| ~ComponentHW () override=default | |
| Public Member Functions inherited from wsf::comm::Component | |
| Component ()=default | |
| ~Component () override=default | |
| Comm * | GetComm () const |
| WsfPlatform * | GetPlatform () const |
| WsfSimulation * | GetSimulation () const |
| virtual void | Setup () |
| virtual void | PendingStart () |
| virtual bool | Initialize2 (double aSimTime) |
| virtual bool | PreInitialize (double aSimTime) |
| virtual void | AttemptToTransmit (double aSimTime, Result &aResult) |
| virtual void | AttemptToReceive (double aSimTime, Result &aResult) |
| virtual bool | Receive (double aSimTime, Comm *aXmtrPtr, Message &aMessage) |
| virtual bool | Send (double aSimTime, const WsfMessage &aMessage, const Address &aAddress) |
| Public Member Functions inherited from WsfComponentT< Comm > | |
| WsfComponentT () | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| virtual void | ComponentParentChanged (ParentType *aParentPtr) |
| ParentType * | GetComponentParent () const |
| void | SetComponentParent (ParentType *aParentPtr) |
| Public Member Functions inherited from WsfComponent | |
| virtual | ~WsfComponent ()=default |
| virtual int | GetComponentInitializationOrder () const |
| template<typename T> | |
| bool | QueryInterfaceT (T *&aRolePtr) |
| bool | ComponentHasRole (int aRole) |
| Returns true if the component has the specified role. | |
| virtual void | PreInput () |
Static Public Member Functions | |
| static ComponentHW * | Find (const Comm &aParent) |
| Find the instance of this component attached to the specified processor. | |
| static ComponentHW * | FindOrCreate (Comm &aParent) |
| static void | AttemptToTransmit (Comm &aComm, double aSimTime, Result &aResult) |
| Called by model implementations when attempting to send a message. | |
| static void | AttemptToReceive (Comm &aComm, double aSimTime, Result &aResult) |
| Called by model implementations when attempting to receive a message. | |
| static bool | Receive (Comm &aComm, double aSimTime, Comm *aXmtrPtr, Message &aMessage) |
| static bool | Send (Comm &aComm, double aSimTime, const WsfMessage &aMessage, const Address &aAddress) |
Alternate Frequency methods. | |
| std::unique_ptr< WsfEM_Antenna > | mAntennaPtr |
| std::unique_ptr< WsfEM_Xmtr > | mXmtrPtr |
| std::unique_ptr< WsfEM_Rcvr > | mRcvrPtr |
| bool | mAltFreqChangeScheduled |
| double | mAltFreqSelectDelay |
| double | mLastAltFreqSelectTime |
| bool | mTransmitsContinuously |
| True if this interface transmits continuously. | |
| WsfStringId | mZoneAttenuationModifier |
| If non-zero, the name of ID of the category to be used for zone-based attenuation. | |
| bool | IsAltFreqChangeScheduled () const |
| double | GetAltFreqSelectDelay () const |
| virtual double | GetLastAltFreqSelectTime () const |
| virtual void | ScheduleAltFreqChange (double aSimTime, int aAltFreqId=-1) |
| void | SelectAlternateFrequency (double aSimTime, int aAltFreqId=-1) |
| bool | TransmitsContinuously () const |
| ComponentHW (const ComponentHW &aSrc) | |
| ComponentHW & | operator= (const ComponentHW &aRhs)=delete |
Required interface from WsfComponent. | |
| WsfComponent * | CloneComponent () const override |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| void * | QueryInterface (int aRole) override |
Interface from WsfCommComponent. | |
| bool | Initialize (double aSimTime) override |
| bool | ProcessInput (UtInput &aInput) override |
| void | TurnOn (double aSimTime) override |
| void | TurnOff (double aSimTime) override |
| bool | CanInteractWith (const Comm *aXmtrCommPtr) override |
| virtual bool | CanSendTo (double aSimTime, Comm *aRcvrPtr, Result &aResult) |
| virtual bool | CanReceiveFrom (double aSimTime, Comm *aXmtrPtr, Result &aResult) |
WsfCommHW_Component methods. | |
These methods support accessing the underlying transmitter and receiver components. | |
| virtual unsigned int | GetEM_RcvrCount () const |
| virtual WsfEM_Rcvr & | GetEM_Rcvr (unsigned int aIndex) |
| virtual unsigned int | GetEM_XmtrCount () const |
| virtual WsfEM_Xmtr & | GetEM_Xmtr (unsigned int aIndex) |
Additional Inherited Members | |
| Public Types inherited from WsfComponentT< Comm > | |
| typedef Comm | ParentType |
| This is needed to support the WsfComponentList template. | |
The hardware component that can be attached to all comm systems.
| wsf::comm::ComponentHW::ComponentHW | ( | ) |
References wsf::comm::Component::Component(), mAltFreqChangeScheduled, mAltFreqSelectDelay, mAntennaPtr, mLastAltFreqSelectTime, mRcvrPtr, mTransmitsContinuously, mXmtrPtr, and mZoneAttenuationModifier.
Referenced by CanInteractWith(), wsf::comm::ComponentHW_JTIDS::CanReceiveFrom(), CanSendTo(), CloneComponent(), ComponentHW(), wsf::comm::ComponentHW_JTIDS::ComponentHW_JTIDS(), wsf::comm::ComponentHW_LASER::ComponentHW_LASER(), wsf::comm::ComponentHW_Subsurface::ComponentHW_Subsurface(), wsf::comm::ComponentHW_Subsurface::ComponentHW_Subsurface(), wsf::comm::ComponentHW::AltFrequencyChangeEvent::Execute(), Find(), FindOrCreate(), operator=(), wsf::comm::ComponentHW_JTIDS::QueryInterface(), wsf::comm::ComponentHW_LASER::QueryInterface(), and wsf::comm::ComponentHW_Subsurface::QueryInterface().
|
overridedefault |
|
protected |
|
overridevirtual |
Reimplemented from wsf::comm::Component.
References ComponentHW(), Find(), wsf::comm::Comm::GetClassId(), wsf::comm::Component::GetComm(), mRcvrPtr, and mXmtrPtr.
Referenced by wsf::comm::RadioXmtrRcvr::CanSendTo(), and ~ComponentHW().
|
inlinevirtual |
Reimplemented in wsf::comm::ComponentHW_JTIDS.
|
virtual |
Reimplemented in wsf::comm::ComponentHW_LASER, and wsf::comm::ComponentHW_Subsurface.
References wsf::comm::Component::AttemptToReceive(), wsf::comm::Component::AttemptToTransmit(), WsfEM_Interaction::BeginOneWayInteraction(), ComponentHW(), WsfEM_Interaction::ComputeRF_OneWayPower(), WsfEM_Rcvr::ComputeSignalToNoise(), WsfEM_Interaction::cSIGNAL_LEVEL, Find(), wsf::comm::Component::GetComm(), WsfEM_Rcvr::GetDetectionThreshold(), GetEM_Rcvr(), WsfEM_Interaction::MaskedByTerrain(), WsfEM_Interaction::mCheckedStatus, WsfEM_Interaction::mClutterPower, WsfEM_Interaction::mFailedStatus, WsfEM_Interaction::mInterferenceFactor, WsfEM_Interaction::mInterferencePower, WsfEM_Interaction::mRcvdPower, mRcvrPtr, WsfEM_Interaction::mSignalToNoise, mXmtrPtr, mZoneAttenuationModifier, WsfEM_Interaction::Print(), WsfEM_Interaction::SetCategory(), WsfEM_Interaction::SetReceiverBeamPosition(), WsfEM_Interaction::SetTransmitterBeamPosition(), and WsfEM_XmtrRcvr::UpdatePosition().
Referenced by wsf::comm::RadioXmtrRcvr::CanSendTo(), and ~ComponentHW().
|
overridevirtual |
Clones a component. May return null if component does not support clone.
Implements WsfComponent.
Reimplemented in wsf::comm::ComponentHW_JTIDS, wsf::comm::ComponentHW_LASER, and wsf::comm::ComponentHW_Subsurface.
References ComponentHW().
Referenced by ~ComponentHW().
|
static |
Find the instance of this component attached to the specified processor.
References ComponentHW(), WsfComponentList::FindByRole(), and wsf::comm::Comm::GetComponents().
Referenced by WsfPassiveSensor::PassiveMode::AddInteractor(), CanInteractWith(), wsf::comm::ComponentHW_JTIDS::CanReceiveFrom(), wsf::comm::PhysicalLayer::CanReceiveFrom(), CanSendTo(), wsf::comm::RadioXmtrRcvr::CanSendTo(), wsf::comm::ComponentHW::AltFrequencyChangeEvent::Execute(), FindOrCreate(), wsf::comm::PhysicalLayerLaser::Initialize(), wsf::comm::LASER_XmtrRcvr::LASER_XmtrRcvr(), WsfDisPlatform::MessageTransmitted(), wsf::event::CommFrequencyChanged::Print(), wsf::event::CommFrequencyChanged::PrintCSV(), WsfEW_AgilityEffect::UpdateEffects(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and WsfSubsurfaceRadioXmtrRcvr::WsfSubsurfaceRadioXmtrRcvr().
|
static |
Find the instance of this component attached to the specified processor, and create it if it doesn't exist.
References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), ComponentHW(), Find(), and wsf::comm::Comm::GetComponents().
Referenced by wsf::comm::RadioXmtrRcvr::RadioXmtrRcvr().
|
inline |
References mAltFreqSelectDelay.
Referenced by WsfEW_AgilityEffect::UpdateEffects().
|
overridevirtual |
Returns the component's name. Each component in a component list has a unique name. Names are usually defined by the user, but they may also be generated by code and prefixed with a '#' to guarantee no collisions with user-defined names.
Implements WsfComponent.
Reimplemented in wsf::comm::ComponentHW_JTIDS, wsf::comm::ComponentHW_LASER, and wsf::comm::ComponentHW_Subsurface.
Referenced by ~ComponentHW().
|
overridevirtual |
Returns a zero-terminated array of component roles. Note that the array should be in decreasing order of specificity and should generally the inheritance hierarchy. The first entry should be the components 'primary' role. For example a sensor would do the following:
Implements WsfComponent.
Reimplemented in wsf::comm::ComponentHW_JTIDS, wsf::comm::ComponentHW_LASER, and wsf::comm::ComponentHW_Subsurface.
References cWSF_COMPONENT_COMM, cWSF_COMPONENT_COMM_HW, and cWSF_COMPONENT_NULL.
Referenced by ~ComponentHW().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
References mXmtrPtr.
Referenced by wsf::comm::ComponentHW_JTIDS::CanReceiveFrom(), wsf::comm::ComponentHW_Subsurface::ComponentHW_Subsurface(), wsf::comm::ComponentHW_Subsurface::ComponentHW_Subsurface(), wsf::comm::PhysicalLayerLaser::Initialize(), WsfDisPlatform::MessageTransmitted(), wsf::event::CommFrequencyChanged::Print(), wsf::event::CommFrequencyChanged::PrintCSV(), SelectAlternateFrequency(), WsfEW_AgilityEffect::UpdateEffects(), and UT_DEFINE_SCRIPT_METHOD().
|
inlinevirtual |
Referenced by WsfDisPlatform::MessageTransmitted(), SelectAlternateFrequency(), and UT_DEFINE_SCRIPT_METHOD().
|
inlinevirtual |
References mLastAltFreqSelectTime.
Referenced by WsfEW_AgilityEffect::UpdateEffects().
|
overridevirtual |
Perform phase 1 initialization. This is called by WsfPlatform::Initialize() during phase 1 initialization of the platform. The component should complete validation of input data that could not be done by ProcessInput, as well as any other functions to prepare for simulation use (subject to the next paragraph).
The order in which components are initialized is defined by GetComponentInitializationOrder. In general a component implementation of this method should not be dependent on the state of another component, i.e.: it should not assume that the other components Initialize() method has been called. If such a dependency exists one should use Initialize2() if possible, or specify a value GetComponentInitializationOrder to force things to initialize in a particular order.
| aSimTime | The current simulation time. |
Reimplemented from wsf::comm::Component.
Reimplemented in wsf::comm::ComponentHW_JTIDS.
References wsf::comm::Comm::cCT_XMT_RCV, wsf::comm::Component::GetComm(), wsf::comm::Component::GetSimulation(), mAntennaPtr, mRcvrPtr, mXmtrPtr, and ok.
Referenced by wsf::comm::ComponentHW_JTIDS::Initialize(), and ~ComponentHW().
|
inline |
References mAltFreqChangeScheduled.
Referenced by WsfEW_AgilityEffect::UpdateEffects().
|
protecteddelete |
References ComponentHW().
|
overridevirtual |
Evaluate the current input command and determine if it is one processed by the component. The component should get the current command from the input stream and determine if it is one that it recognizes. If it does not recognize the command then it should leave the command in the input stream and return false. If it does recognize the command then it should process the command and return true. If invalid arguments are encountered then it should throw an exception.
| aInput | The input stream. |
| UtInput::ExceptionBase | if an invalid input was encountered. |
Reimplemented from wsf::comm::Component.
Reimplemented in wsf::comm::ComponentHW_JTIDS, wsf::comm::ComponentHW_LASER, and wsf::comm::ComponentHW_Subsurface.
References wsf::comm::Component::GetComm(), mAltFreqSelectDelay, mAntennaPtr, mRcvrPtr, mTransmitsContinuously, mXmtrPtr, mZoneAttenuationModifier, and wsf::comm::Component::ProcessInput().
Referenced by wsf::comm::ComponentHW_JTIDS::ProcessInput(), wsf::comm::ComponentHW_LASER::ProcessInput(), wsf::comm::ComponentHW_Subsurface::ProcessInput(), and ~ComponentHW().
|
overridevirtual |
Requests a component's role interface. A component can support one or more roles.
| aRole | The role whose interface is to be returned. |
Implements WsfComponent.
Reimplemented in wsf::comm::ComponentHW_JTIDS, wsf::comm::ComponentHW_LASER, and wsf::comm::ComponentHW_Subsurface.
References wsf::comm::Component::Component(), cWSF_COMPONENT_COMM, and cWSF_COMPONENT_COMM_HW.
Referenced by ~ComponentHW().
|
virtual |
| void wsf::comm::ComponentHW::SelectAlternateFrequency | ( | double | aSimTime, |
| int | aAltFreqId = -1 ) |
Select an alternate frequency for the comm.
| aSimTime | The current simulation time. |
| aAltFreqId | (optional) The ID of the frequency to change to. |
References WsfObserver::CommFrequencyChanged(), wsf::comm::Component::GetComm(), WsfEM_Xmtr::GetCurrentAlternateFrequencyId(), GetEM_Xmtr(), GetEM_XmtrCount(), wsf::comm::Component::GetPlatform(), wsf::comm::Component::GetSimulation(), mAltFreqChangeScheduled, mLastAltFreqSelectTime, WsfEM_Xmtr::NotifyChangeListeners(), and WsfEM_Xmtr::SelectAlternateFrequency().
Referenced by wsf::comm::ComponentHW::AltFrequencyChangeEvent::Execute().
|
inline |
Indicates if the device transmits continuously.
References mTransmitsContinuously.
|
overridevirtual |
Reimplemented from wsf::comm::Component.
References wsf::comm::Component::GetComm(), mRcvrPtr, and mXmtrPtr.
Referenced by ~ComponentHW().
|
overridevirtual |
Reimplemented from wsf::comm::Component.
References wsf::comm::Component::GetComm(), mRcvrPtr, and mXmtrPtr.
Referenced by ~ComponentHW().
|
protected |
Referenced by ComponentHW(), ComponentHW(), IsAltFreqChangeScheduled(), ScheduleAltFreqChange(), and SelectAlternateFrequency().
|
protected |
Referenced by ComponentHW(), ComponentHW(), GetAltFreqSelectDelay(), ProcessInput(), and ScheduleAltFreqChange().
|
protected |
|
protected |
Referenced by ComponentHW(), ComponentHW(), GetLastAltFreqSelectTime(), ScheduleAltFreqChange(), and SelectAlternateFrequency().
|
protected |
Referenced by CanInteractWith(), wsf::comm::ComponentHW_JTIDS::CanReceiveFrom(), CanSendTo(), wsf::comm::ComponentHW_LASER::CanSendTo(), ComponentHW(), ComponentHW(), wsf::comm::ComponentHW_JTIDS::ComponentHW_JTIDS(), wsf::comm::ComponentHW_LASER::ComponentHW_LASER(), GetEM_Rcvr(), Initialize(), ProcessInput(), TurnOff(), and TurnOn().
|
protected |
True if this interface transmits continuously.
Referenced by ComponentHW(), ComponentHW(), ProcessInput(), and TransmitsContinuously().
|
protected |
Referenced by CanInteractWith(), CanSendTo(), wsf::comm::ComponentHW_LASER::CanSendTo(), wsf::comm::ComponentHW_Subsurface::CanSendTo(), ComponentHW(), ComponentHW(), wsf::comm::ComponentHW_JTIDS::ComponentHW_JTIDS(), wsf::comm::ComponentHW_LASER::ComponentHW_LASER(), GetEM_Xmtr(), Initialize(), ProcessInput(), wsf::comm::ComponentHW_LASER::ProcessInput(), TurnOff(), and TurnOn().
|
protected |
If non-zero, the name of ID of the category to be used for zone-based attenuation.
Referenced by wsf::comm::ComponentHW_JTIDS::CanReceiveFrom(), CanSendTo(), wsf::comm::ComponentHW_LASER::CanSendTo(), ComponentHW(), ComponentHW(), and ProcessInput().