Class Fibre

java.lang.Object
  extended by Fibre
Direct Known Subclasses:
TargetFibre

 class Fibre
extends java.lang.Object

The class Fibre contains methods to perform various operations relating to the position, theta angle, positioning offsets and associated astronomical object of a fibre.


Field Summary
(package private)  java.awt.Point FibrePosition
           
(package private)  boolean lost
          The fibre's lost flag
(package private)  int Number
           
(package private)  AstronomyObject Object
          The astonomy object associated with the fibre
(package private)  java.awt.Point PivotPosition
           
private  java.awt.Point PreviousFibrePosition
           
private  int State
           
private  java.lang.String StateString
           
private  java.lang.String TargetStatusString
           
private  long Theta
           
private  int Type
           
private  java.lang.String TypeString
           
(package private)  int xCreepOffset
          The creep offset of the fibre.
(package private)  int xErrorOffset
          The learned fibre placement offset
(package private)  int xFibreFinOffset
          The fixed fibre fin offset
(package private)  int xPositionError
          The positioning error of the fibre
(package private)  int yCreepOffset
           
(package private)  int yErrorOffset
           
(package private)  int yFibreFinOffset
           
(package private)  int yPositionError
           
 
Constructor Summary
Fibre()
           
Fibre(int FibreNumber)
           
 
Method Summary
(package private)  void extractFibreData(java.lang.String inputLine)
          Extract fibre data from a line of data in the fibres.dat file
private  boolean fibresCollide(long pivot1x, long pivot1y, long fibre1x, long fibre1y, long pivot2x, long pivot2y, long fibre2x, long fibre2y, long button_width, long button_length, long tube_width)
          Native method to determine whether fibres are colliding
(package private)  java.awt.Point getPreviousPosition()
          Get the previous known position of the fibre
(package private)  int getState()
          Get the state of the fibre
(package private)  java.lang.String getTargetStatus()
          Get the target status of the fibre
(package private)  int getTheta()
          Get the theta angle of the fibre in arcmins
(package private)  boolean hasObject()
          Has the fibre got an object associated with it
(package private)  boolean isEnabled()
          Is the fibre enabled
(package private)  boolean isGuide()
          Is the fibre a guide fibre
(package private)  boolean isLost()
          Is the fibre lost
(package private)  boolean isMissing()
          Is the fibre missing/dead
(package private)  boolean isNotCollidingWith(Fibre anotherFibre, FibreModule thisFibreModule)
          Is the fibre not colliding with another fibre
(package private)  void setBroken()
          Set the fibre as broken
(package private)  void setDisabled()
          Set the fibre disabled
(package private)  void setEnabled()
          Set the fibre enabled
(package private)  void setFound()
          Set the fibre found
(package private)  void setLost()
          Set the fibre lost
(package private)  void setMissing()
          Set the fibre missing
(package private)  void setNotBroken()
          Set the fibre as not brokem
(package private)  void setNotMissing()
          Set the fibre not missing
(package private)  void setPosition(java.awt.Point thePosition)
          Set the position
(package private)  void setPositionError(java.awt.Point theFibrePosition, java.awt.Point theTargetPosition)
          Set the position error
private  void setPreviousPosition()
          Set the previous position
private  void setStateString(int theStatus)
          Set the status of the fibre
(package private)  void setTargetStatus(java.lang.String targetPosition)
          Set the target position
private  void setTypeString(int theType)
          Set the type of the fibre
 java.lang.String toString()
          Get a string representation of the fibre
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Number

int Number

State

private int State

Type

private int Type

TypeString

private java.lang.String TypeString

StateString

private java.lang.String StateString

TargetStatusString

private java.lang.String TargetStatusString

PivotPosition

java.awt.Point PivotPosition

FibrePosition

java.awt.Point FibrePosition

PreviousFibrePosition

private java.awt.Point PreviousFibrePosition

Theta

private long Theta

xPositionError

int xPositionError
The positioning error of the fibre


yPositionError

int yPositionError

xErrorOffset

int xErrorOffset
The learned fibre placement offset


yErrorOffset

int yErrorOffset

xFibreFinOffset

int xFibreFinOffset
The fixed fibre fin offset


yFibreFinOffset

int yFibreFinOffset

xCreepOffset

int xCreepOffset
The creep offset of the fibre. This is the amount that the fibre creeps on the field plate when the jaws are opened


yCreepOffset

int yCreepOffset

lost

boolean lost
The fibre's lost flag


Object

AstronomyObject Object
The astonomy object associated with the fibre

Constructor Detail

Fibre

Fibre()

Fibre

Fibre(int FibreNumber)
Method Detail

fibresCollide

private boolean fibresCollide(long pivot1x,
                              long pivot1y,
                              long fibre1x,
                              long fibre1y,
                              long pivot2x,
                              long pivot2y,
                              long fibre2x,
                              long fibre2y,
                              long button_width,
                              long button_length,
                              long tube_width)
Native method to determine whether fibres are colliding

Parameters:
pivot1x - The x pivot position for fibre 1
pivot1y - The y pivot position for fibre 1
fibre1x - The x fibre position for fibre 1
fibre1y - The y fibre position for fibre 1
pivot2x - The x pivot position for fibre 2
pivot2y - The y pivot position for fibre 2
fibre2x - The x fibre position for fibre 2
fibre2y - The y fibre position for fibre 2
button_width - The width of the fibre button
button_length - The length of the fibre button
tube_width - The width of the fibre tube
Returns:
boolean to indicate whether the fibres are colliding

extractFibreData

void extractFibreData(java.lang.String inputLine)
Extract fibre data from a line of data in the fibres.dat file

Parameters:
inputLine - The line of fibre data

setTargetStatus

void setTargetStatus(java.lang.String targetPosition)
Set the target position

Parameters:
targetPosition - The target position

setStateString

private void setStateString(int theStatus)
Set the status of the fibre

Parameters:
theStatus - The status of the fibre

setTypeString

private void setTypeString(int theType)
Set the type of the fibre

Parameters:
theType - The fibre type

setPosition

void setPosition(java.awt.Point thePosition)
Set the position

Parameters:
thePosition - The position

setPositionError

void setPositionError(java.awt.Point theFibrePosition,
                      java.awt.Point theTargetPosition)
Set the position error

Parameters:
theFibrePosition - The actual position of the fibre
theTargetPosition - The target postion of the fibre

setPreviousPosition

private void setPreviousPosition()
Set the previous position


setEnabled

void setEnabled()
Set the fibre enabled


setDisabled

void setDisabled()
Set the fibre disabled


setNotBroken

void setNotBroken()
Set the fibre as not brokem


setBroken

void setBroken()
Set the fibre as broken


setNotMissing

void setNotMissing()
Set the fibre not missing


setMissing

void setMissing()
Set the fibre missing


setLost

void setLost()
Set the fibre lost


setFound

void setFound()
Set the fibre found


hasObject

boolean hasObject()
Has the fibre got an object associated with it

Returns:
Whether the fibre got an object associated with it

isEnabled

boolean isEnabled()
Is the fibre enabled

Returns:
Whether the fibre is enabled

isGuide

boolean isGuide()
Is the fibre a guide fibre

Returns:
Whether the fibre is a guide fibre

isLost

boolean isLost()
Is the fibre lost

Returns:
Whether the fibre is lost

isMissing

boolean isMissing()
Is the fibre missing/dead

Returns:
Whether the fibre is missing/dead

isNotCollidingWith

boolean isNotCollidingWith(Fibre anotherFibre,
                           FibreModule thisFibreModule)
Is the fibre not colliding with another fibre

Parameters:
anotherFibre - The other fibre
thisFibreModule - The fibre module
Returns:
Boolean to indicate whether the fibre not colliding with another fibre

getTheta

int getTheta()
Get the theta angle of the fibre in arcmins

Returns:
the theta angle of the fibre in arcmins

getTargetStatus

java.lang.String getTargetStatus()
Get the target status of the fibre

Returns:
the target status of the fibre

getState

int getState()
Get the state of the fibre

Returns:
the state of the fibre

getPreviousPosition

java.awt.Point getPreviousPosition()
Get the previous known position of the fibre

Returns:
the previous known position of the fibre

toString

public java.lang.String toString()
Get a string representation of the fibre

Overrides:
toString in class java.lang.Object
Returns:
string representation of the fibre