public class CommunicationSystem extends DefinitionalObject
LinkBudget
for any of the links, and can produce a
SignalPropagationGraph
for more detailed analysis.Modifier | Constructor and Description |
---|---|
|
CommunicationSystem()
Initializes a new instance.
|
protected |
CommunicationSystem(CommunicationSystem existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkForSameDefinition(CommunicationSystem other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected boolean |
checkForSameDefinition(DefinitionalObject other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
Object |
clone(CopyContext context)
Clones this object using the specified context.
|
protected int |
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.
|
AntennaTargetingResultCollection |
configureAntennaTargeting()
|
SignalPropagationGraph |
createPropagationGraph()
Creates a
SignalPropagationGraph based on the links in the system. |
void |
enumerateDependencies(DependencyEnumerator enumerator)
Enumerates the dependencies of this object by calling
DependencyEnumerator#enumerate(T) for each object that this object directly depends upon. |
Vector |
getDefaultReferenceVector()
Gets the default reference vector used by
CommunicationSystem.configureAntennaTargeting()
when automatically orienting links. |
Evaluator<LinkBudget> |
getDetailedLinkBudgetEvaluator(IServiceProvider link,
IntendedSignalStrategy intendedSignal)
Gets an evaluator for link budget data for the given link and intended signal strategy.
|
Evaluator<LinkBudget> |
getDetailedLinkBudgetEvaluator(IServiceProvider link,
IntendedSignalStrategy intendedSignal,
EvaluatorGroup group)
Gets an evaluator for link budget data for the given link and intended signal strategy.
|
static Evaluator<LinkBudget> |
getDetailedLinkBudgetEvaluator(IServiceProvider link,
SignalPropagationGraph graph,
IntendedSignalStrategy intendedSignal)
Gets an evaluator for link budget data for a given link, graph, and intended signal strategy.
|
static Evaluator<LinkBudget> |
getDetailedLinkBudgetEvaluator(IServiceProvider link,
SignalPropagationGraph graph,
IntendedSignalStrategy intendedSignal,
EvaluatorGroup group)
Gets an evaluator for link budget data for a given link, graph, and intended signal strategy.
|
LinkBudgetScalars |
getDetailedLinkBudgetScalars(IServiceProvider link,
IntendedSignalStrategy intendedSignal)
Creates a set of
LinkBudgetScalars for a given link and intended signal strategy. |
static LinkBudgetScalars |
getDetailedLinkBudgetScalars(IServiceProvider link,
SignalPropagationGraph graph,
IntendedSignalStrategy intendedSignal)
Creates a set of
LinkBudgetScalars for a given link, graph, and intended signal strategy. |
static LinkBudgetScalars |
getDetailedLinkBudgetScalars(IServiceProvider link,
SignalPropagationGraph graph,
IntendedSignalStrategy intendedSignal,
String linkName)
Creates a set of
LinkBudgetScalars for a given link, graph, and intended signal strategy. |
Evaluator<LinkBudget> |
getLinkBudgetEvaluator(IServiceProvider link,
IntendedSignalStrategy intendedSignal)
Gets an evaluator for link budget data for the given link and intended signal strategy.
|
Evaluator<LinkBudget> |
getLinkBudgetEvaluator(IServiceProvider link,
IntendedSignalStrategy intendedSignal,
EvaluatorGroup group)
Gets an evaluator for link budget data for the given link, using the specified
IntendedSignalStrategy ,
in a given EvaluatorGroup . |
static Evaluator<LinkBudget> |
getLinkBudgetEvaluator(IServiceProvider link,
SignalPropagationGraph graph,
IntendedSignalStrategy intendedSignal)
Gets an evaluator for link budget data for a given link, graph, and intended signal strategy.
|
static Evaluator<LinkBudget> |
getLinkBudgetEvaluator(IServiceProvider link,
SignalPropagationGraph graph,
IntendedSignalStrategy intendedSignal,
EvaluatorGroup group)
Gets an evaluator for link budget data for a given link, graph, and intended signal strategy.
|
LinkBudgetScalars |
getLinkBudgetScalars(IServiceProvider link,
IntendedSignalStrategy intendedSignal)
Creates a set of
LinkBudgetScalars for a given link and intended signal strategy. |
static LinkBudgetScalars |
getLinkBudgetScalars(IServiceProvider link,
SignalPropagationGraph graph,
IntendedSignalStrategy intendedSignal)
Creates a set of
LinkBudgetScalars for a given link, graph, and intended signal strategy. |
static LinkBudgetScalars |
getLinkBudgetScalars(IServiceProvider link,
SignalPropagationGraph graph,
IntendedSignalStrategy intendedSignal,
String linkName)
Creates a set of
LinkBudgetScalars for a given link, graph, and intended signal strategy. |
CommunicationLinkCollection |
getLinks()
Gets the links defined in this system.
|
ServiceProviderCollection |
getReceiveFromAll()
Gets the collection of receiving service providers that will receive signals from all other transmitters in the system.
|
ServiceProviderCollection |
getTransmitToAll()
Gets the collection of transmitting service providers that will broadcast to all receivers in the system.
|
void |
setDefaultReferenceVector(Vector value)
Sets the default reference vector used by
CommunicationSystem.configureAntennaTargeting()
when automatically orienting links. |
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, freeze, freezeAggregatedObjects, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozen
public CommunicationSystem()
By default, this system defines two signal propagation models and a vector representing the 'up' direction.
The up reference vector is used in orienting the antennas of transmitters and receivers in the system via the AxesTargetingLink
.
The propagation models used by default are the same defaults defined by the WirelessLinkExtension
.
The default up vector is the Earth's inertial Z-Axis.
protected CommunicationSystem(@Nonnull CommunicationSystem existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
- The existing instance to copy.context
- A CopyContext
that controls the depth of the copy.ArgumentNullException
- Thrown when existingInstance
or context
is null
.public Object clone(CopyContext context)
This method should be implemented to call a copy constructor on the class of the
object being cloned. The copy constructor should take the CopyContext
as a parameter
in addition to the existing instance to copy. The copy constructor should first call
CopyContext.addObjectMapping(T, T)
to identify the newly constructed instance
as a copy of the existing instance. It should then copy all fields, using
CopyContext.updateReference(T)
to copy any reference fields.
A typical implementation of ICloneWithContext
:
public static class MyClass implements ICloneWithContext {
public MyClass(MyClass existingInstance, CopyContext context) {
context.addObjectMapping(existingInstance, this);
someReference = context.updateReference(existingInstance.someReference);
}
@Override
public final Object clone(CopyContext context) {
return new MyClass(this, context);
}
private Object someReference;
}
In general, all fields that are reference types should be copied with a call to
CopyContext.updateReference(T)
. There are a couple of exceptions:
If one of these exceptions applies, the CopyContext
should be given an opportunity
to update the reference before the reference is copied explicitly. Use
CopyContext.updateReference(T)
to update the reference. If CopyContext.updateReference(T)
returns
the original object, indicating that the context does not have a replacement registered,
then copy the object manually by invoking a Clone method, a copy constructor, or by manually
constructing a new instance and copying the values.
alwaysCopy = context.updateReference(existingInstance.alwaysCopy);
if (existingInstance.alwaysCopy != null && alwaysCopy == existingInstance.alwaysCopy) {
alwaysCopy = (AlwaysCopy) existingInstance.alwaysCopy.clone(context);
}
If you are implementing an evaluator (a class that implements IEvaluator
), the
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
method shares some responsibilities with the
copy context constructor. Code duplication can be avoided by doing the following:
CopyContext.updateReference(T)
. You should still call CopyContext.updateReference(T)
on any references to
non-evaluators.
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
as the last line in the constructor and pass it the
same CopyContext
passed to the constructor.
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
as normal. See the reference documentation for
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
for more information on implementing that method.
public MyClass(MyClass existingInstance, CopyContext context) {
super(existingInstance, context);
someReference = context.updateReference(existingInstance.someReference);
evaluatorReference = existingInstance.evaluatorReference;
updateEvaluatorReferences(context);
}
@Override
public void updateEvaluatorReferences(CopyContext context) {
evaluatorReference = context.updateReference(evaluatorReference);
}
@Override
public Object clone(CopyContext context) {
return new MyClass(this, context);
}
private Object someReference;
private IEvaluator evaluatorReference;
clone
in interface ICloneWithContext
clone
in class DefinitionalObject
context
- The context to use to perform the copy.protected final boolean checkForSameDefinition(DefinitionalObject other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.checkForSameDefinition
in class DefinitionalObject
other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected boolean checkForSameDefinition(CommunicationSystem other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected int computeCurrentDefinitionHashCode()
CommunicationSystem.checkForSameDefinition(agi.foundation.infrastructure.DefinitionalObject)
method.computeCurrentDefinitionHashCode
in class DefinitionalObject
public void enumerateDependencies(DependencyEnumerator enumerator)
DependencyEnumerator#enumerate(T)
for each object that this object directly depends upon.
Derived classes which contain additional dependencies MUST override this method, call the base
implementation, and enumerate dependencies introduced by the derived class.enumerateDependencies
in interface IEnumerateDependencies
enumerateDependencies
in class DefinitionalObject
enumerator
- The enumerator that is informed of the dependencies of this object.@Nonnull public final CommunicationLinkCollection getLinks()
@Nonnull public final ServiceProviderCollection getTransmitToAll()
This is intended as a collection of interferers or jammers for the CommunicationSystem
.
Any transmitter placed in this collection will have a link created between it and all other receivers in the collection.
@Nonnull public final ServiceProviderCollection getReceiveFromAll()
This is intended as a collection of receivers that accept all interference for the CommunicationSystem
.
Any receiver placed in this collection will have a link created between it and all other transmitters in the collection.
public final Vector getDefaultReferenceVector()
CommunicationSystem.configureAntennaTargeting()
when automatically orienting links. It is passed as the reference vector to AxesTargetingLink
.
The default value is the Earth's inertial Z-Axis.public final void setDefaultReferenceVector(Vector value)
CommunicationSystem.configureAntennaTargeting()
when automatically orienting links. It is passed as the reference vector to AxesTargetingLink
.
The default value is the Earth's inertial Z-Axis.@Nonnull public static Evaluator<LinkBudget> getLinkBudgetEvaluator(@Nonnull IServiceProvider link, @Nonnull SignalPropagationGraph graph, @Nonnull IntendedSignalStrategy intendedSignal)
link
- The service provider that implements ILinkService
.graph
- The SignalPropagationGraph
that contains the link
.intendedSignal
- The strategy used to define the intended signal.LinkBudget
data.@Nonnull public static Evaluator<LinkBudget> getLinkBudgetEvaluator(@Nonnull IServiceProvider link, @Nonnull SignalPropagationGraph graph, @Nonnull IntendedSignalStrategy intendedSignal, @Nonnull EvaluatorGroup group)
link
- The service provider that implements ILinkService
.graph
- The SignalPropagationGraph
that contains the link
.intendedSignal
- The strategy used to define the intended signal.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.LinkBudget
data.@Nonnull public final Evaluator<LinkBudget> getLinkBudgetEvaluator(@Nonnull IServiceProvider link, @Nonnull IntendedSignalStrategy intendedSignal)
Note that when the evaluator is created, CommunicationSystem.createPropagationGraph()
will be called,
which performs operations that may throw exceptions.
link
- The service provider that implements ILinkService
.intendedSignal
- The strategy used to define the intended signal.LinkBudget
data.@Nonnull public final Evaluator<LinkBudget> getLinkBudgetEvaluator(@Nonnull IServiceProvider link, @Nonnull IntendedSignalStrategy intendedSignal, @Nonnull EvaluatorGroup group)
IntendedSignalStrategy
,
in a given EvaluatorGroup
.
Note that when the evaluator is created, CommunicationSystem.createPropagationGraph()
will be called,
which performs operations that may throw exceptions.
link
- The service provider that implements ILinkService
.intendedSignal
- The strategy used to define the intended signal.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.LinkBudget
data.@Nonnull public static LinkBudgetScalars getLinkBudgetScalars(@Nonnull IServiceProvider link, @Nonnull SignalPropagationGraph graph, @Nonnull IntendedSignalStrategy intendedSignal, String linkName)
LinkBudgetScalars
for a given link, graph, and intended signal strategy.link
- The service provider that implements ILinkService
.graph
- The SignalPropagationGraph
that contains the link
.intendedSignal
- The strategy used to define the intended signal.linkName
- The name of the link.LinkBudgetScalars
.@Nonnull public static LinkBudgetScalars getLinkBudgetScalars(@Nonnull IServiceProvider link, @Nonnull SignalPropagationGraph graph, @Nonnull IntendedSignalStrategy intendedSignal)
LinkBudgetScalars
for a given link, graph, and intended signal strategy.link
- The service provider that implements ILinkService
.graph
- The SignalPropagationGraph
that contains the link
.intendedSignal
- The strategy used to define the intended signal.LinkBudgetScalars
.@Nonnull public final LinkBudgetScalars getLinkBudgetScalars(@Nonnull IServiceProvider link, @Nonnull IntendedSignalStrategy intendedSignal)
LinkBudgetScalars
for a given link and intended signal strategy.
Note that this method calls the CommunicationSystem.createPropagationGraph()
method,
which performs operations that may throw exceptions.
link
- The service provider that implements ILinkService
.intendedSignal
- The strategy used to define the intended signal.LinkBudgetScalars
.@Nonnull public static Evaluator<LinkBudget> getDetailedLinkBudgetEvaluator(@Nonnull IServiceProvider link, @Nonnull SignalPropagationGraph graph, @Nonnull IntendedSignalStrategy intendedSignal)
link
- The service provider that implements ILinkService
and IAvailableSignalPropagationModelsService
.graph
- The SignalPropagationGraph
that contains the link
.intendedSignal
- The strategy used to define the intended signal.LinkBudget
data.@Nonnull public static Evaluator<LinkBudget> getDetailedLinkBudgetEvaluator(@Nonnull IServiceProvider link, @Nonnull SignalPropagationGraph graph, @Nonnull IntendedSignalStrategy intendedSignal, @Nonnull EvaluatorGroup group)
link
- The service provider that implements ILinkService
and IAvailableSignalPropagationModelsService
.graph
- The SignalPropagationGraph
that contains the link
.intendedSignal
- The strategy used to define the intended signal.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.LinkBudget
data.@Nonnull public final Evaluator<LinkBudget> getDetailedLinkBudgetEvaluator(@Nonnull IServiceProvider link, @Nonnull IntendedSignalStrategy intendedSignal)
Note that when the evaluator is created, CommunicationSystem.createPropagationGraph()
will be called,
which performs operations that may throw exceptions.
link
- The service provider that implements ILinkService
and IAvailableSignalPropagationModelsService
.intendedSignal
- The strategy used to define the intended signal.LinkBudget
data.@Nonnull public final Evaluator<LinkBudget> getDetailedLinkBudgetEvaluator(@Nonnull IServiceProvider link, @Nonnull IntendedSignalStrategy intendedSignal, @Nonnull EvaluatorGroup group)
Note that when the evaluator is created, CommunicationSystem.createPropagationGraph()
will be called,
which performs operations that may throw exceptions.
link
- The service provider that implements ILinkService
and IAvailableSignalPropagationModelsService
.intendedSignal
- The strategy used to define the intended signal.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.LinkBudget
data.@Nonnull public static LinkBudgetScalars getDetailedLinkBudgetScalars(@Nonnull IServiceProvider link, @Nonnull SignalPropagationGraph graph, @Nonnull IntendedSignalStrategy intendedSignal, String linkName)
LinkBudgetScalars
for a given link, graph, and intended signal strategy.
These scalars include propagation loss broken into its constituent models.link
- The service provider that implements ILinkService
and IAvailableSignalPropagationModelsService
.graph
- The SignalPropagationGraph
that contains the link
.intendedSignal
- The strategy used to define the intended signal.linkName
- The name of the link.LinkBudgetScalars
.@Nonnull public static LinkBudgetScalars getDetailedLinkBudgetScalars(@Nonnull IServiceProvider link, @Nonnull SignalPropagationGraph graph, @Nonnull IntendedSignalStrategy intendedSignal)
LinkBudgetScalars
for a given link, graph, and intended signal strategy.
These scalars include propagation loss broken into its constituent models.link
- The service provider that implements ILinkService
and IAvailableSignalPropagationModelsService
.graph
- The SignalPropagationGraph
that contains the link
.intendedSignal
- The strategy used to define the intended signal.LinkBudgetScalars
.@Nonnull public final LinkBudgetScalars getDetailedLinkBudgetScalars(@Nonnull IServiceProvider link, @Nonnull IntendedSignalStrategy intendedSignal)
LinkBudgetScalars
for a given link and intended signal strategy.
These scalars include propagation loss broken into its constituent models.
Note that this method calls the CommunicationSystem.createPropagationGraph()
method,
which performs operations that may throw exceptions.
link
- The service provider that implements ILinkService
and IAvailableSignalPropagationModelsService
.intendedSignal
- The strategy used to define the intended signal.LinkBudgetScalars
.@Nonnull public final SignalPropagationGraph createPropagationGraph()
SignalPropagationGraph
based on the links in the system.SignalPropagationGraph
for this system.PropertyInvalidException
-
Thrown when any of the following are null
:
Transmitter
or Receiver
in each link.LocationPoint
on any transmitter or receiver.OrientationAxes
on any non-isotropic transmitter or receiver.IllegalStateException
- Thrown when any item in
Links
(get
), ReceiveFromAll
(get
) or TransmitToAll
(get
) properties is null.ServiceNotAvailableException
- Throw when any required services are missing from an object.@Nonnull public final AntennaTargetingResultCollection configureAntennaTargeting()
OrientationAxes
(set
) of each transmitter and receiver
in the Links
(get
) collection. If the OrientationAxes
(set
) property
is already defined on a given antenna, it will be overwritten. If an optimal orientation
cannot be determined for a given antenna, the orientation is left unchanged.
This method provides a best-effort approach to optimally orienting antennas in the communication system. Optimal orientation is defined as the antenna pointing directly at the antenna it is communicating with. The following heuristics are employed:
AxesTargetingLink
.Links
(get
) property.AxesTargetingLink
.AntennaTargetingResultReason.TargetsMultipleAntennas
is returned if a non-isotropic antenna targets multiple antennas.AntennaTargetingResultReason.ISetOrientationAxesNotAvailable
is returned if the antenna does not support
ISetOrientationAxes.
null
values in the Links
(get
) collection are ignored.null
values for Transmitter or Receiver properties on each link are ignored.Links
(get
) collection that do not support ILinkService
are ignored.TransmitToAll
(get
) and ReceiveFromAll
(get
) are ignored since they will by definition target multiple antennas.OrientationAxes
(set
) were not modified and the reason for not doing so.PropertyInvalidException
- Thrown when DefaultReferenceVector
(get
/ set
) or Links
(get
) is null.