DRCL J-Sim API

drcl.inet.mac
Class Antenna

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.Component
          extended bydrcl.inet.mac.Antenna
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable, ObjectDuplicable, java.io.Serializable
Direct Known Subclasses:
AdaptiveAntenna, SwitchedBeamAntenna

public class Antenna
extends Component

This class implements Antenna, which provides the common operations of omni-directional antennas and two types of directional antennas: SwitchedBeamAntenna and AdaptiveArrayAntenna. Based on this class, the two classes for the directional antennas are developed.

Author:
Chunyu Hu
See Also:
Serialized Form

Nested Class Summary
static class Antenna.Orientation
          This class provides a data structure for representing antennas' direction as (azimuth, elevation) (both in degrees).
 
Nested classes inherited from class drcl.comp.Component
Component.Locks
 
Field Summary
static int ANTENNA_ANGLE_RESOLUTION
           
static java.lang.String INITIALIZE_PORT_ID
           
static int OMNIDIRECTIONAL_PATTERN_INDEX
           
static float UNINITIALIZED_GAIN_VALUE
           
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, locks, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Constructor Summary
Antenna()
           
 
Method Summary
 int getActivePattern()
           
 float getGain_dBi()
          Return omnidirectional gain in dBi.
 float getGain_dBi(Antenna.Orientation orient_)
          Return gain in dBi in given direction.
 boolean initAzimuthPatterns(java.lang.String filename_)
           
 boolean initElevationPatterns(java.lang.String filename_)
           
 boolean isLocked()
           
 boolean lockAtSignal()
          Lock an incoming signal.
 boolean lockAtSignal(Antenna.Orientation orient_)
          Lock an incoming signal from direction .
static int normalizeAzimuthAngle(int angle)
          Normalize azimuth angle to 360 degree
static int normalizeElevationAngle(int angle)
          Normalize elevation angle to 360 (not +/-180 any more) degree
 void process(java.lang.Object data_, Port inPort_)
          Process incoming data
 java.lang.String QueryType()
           
 int setActivePattern(int patternIndex_)
          Set the pattern index by active.
 boolean unlock()
          Unlock the current locked signal.
 
Methods inherited from class drcl.comp.Component
addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, duplicate, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getDebugLevelNames, getID, getName, getParent, getPort, getPort, getRoot, getTime, iduplicate, info, isAncestorOf, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectlyRelatedTo, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, reset, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INITIALIZE_PORT_ID

public static final java.lang.String INITIALIZE_PORT_ID
See Also:
Constant Field Values

ANTENNA_ANGLE_RESOLUTION

public static int ANTENNA_ANGLE_RESOLUTION

UNINITIALIZED_GAIN_VALUE

public static float UNINITIALIZED_GAIN_VALUE

OMNIDIRECTIONAL_PATTERN_INDEX

public static int OMNIDIRECTIONAL_PATTERN_INDEX
Constructor Detail

Antenna

public Antenna()
Method Detail

QueryType

public java.lang.String QueryType()

getGain_dBi

public float getGain_dBi()
Return omnidirectional gain in dBi.


getGain_dBi

public float getGain_dBi(Antenna.Orientation orient_)
Return gain in dBi in given direction. To be overrided by child class.


setActivePattern

public int setActivePattern(int patternIndex_)
Set the pattern index by active.


getActivePattern

public int getActivePattern()

lockAtSignal

public boolean lockAtSignal()
Lock an incoming signal. To be overwritten by child class -- switched beam antenna or adaptive array antenna.


lockAtSignal

public boolean lockAtSignal(Antenna.Orientation orient_)
Lock an incoming signal from direction . To be overriden by child class.


unlock

public boolean unlock()
Unlock the current locked signal.


isLocked

public boolean isLocked()

initAzimuthPatterns

public boolean initAzimuthPatterns(java.lang.String filename_)

initElevationPatterns

public boolean initElevationPatterns(java.lang.String filename_)

normalizeAzimuthAngle

public static int normalizeAzimuthAngle(int angle)
Normalize azimuth angle to 360 degree


normalizeElevationAngle

public static int normalizeElevationAngle(int angle)
Normalize elevation angle to 360 (not +/-180 any more) degree


process

public void process(java.lang.Object data_,
                    Port inPort_)
Process incoming data

Parameters:
data_ - = name of object to be initialized. 1. data_ = "height = ...", case insensitive 2. data_ = "omniGain_dBi = ...", case insensitive 3. data_ = "azimuthPatterns = ", case insensitive 4. data)->item = "elevationPatterns = ", case insensitive
inPort_ - the port where the data arrives.

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~