org.lsst.ccs.subsystems.shutter.common
Class HallTransitionImpl

java.lang.Object
  extended by org.lsst.ccs.subsystems.shutter.common.HallTransitionImpl
All Implemented Interfaces:
Serializable, HallTransition

public class HallTransitionImpl
extends Object
implements HallTransition, Serializable

Class containing the data for a single Hall sensor transition

Author:
Owen Saxton
See Also:
Serialized Form

Constructor Summary
HallTransitionImpl()
           
HallTransitionImpl(long time, int sensor, boolean open, boolean reverse, float position, float relPosition)
           
 
Method Summary
 float getPosition()
          Get the position (in mm) where the transition occurred
 float getRelPosition()
          Get the relative position (0 - 1) where the transition occurred
 int getSensorId()
          Get the id of the Hall Sensor
 long getTransitionTime()
          Get the Epoch microseconds when the transition occurred.
 boolean isOpen()
          Check if the sensor is open after the transition.
 boolean isReverse()
          Check if the motion was in the reverse direction, in shutter coordinates.
 void setOpen(boolean open)
           
 void setPosition(float position)
           
 void setRelPosition(float relPosition)
           
 void setReverse(boolean reverse)
           
 void setSensorId(int sensor)
           
 void setTransitionTime(long time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HallTransitionImpl

public HallTransitionImpl()

HallTransitionImpl

public HallTransitionImpl(long time,
                          int sensor,
                          boolean open,
                          boolean reverse,
                          float position,
                          float relPosition)
Method Detail

setTransitionTime

public void setTransitionTime(long time)

setSensorId

public void setSensorId(int sensor)

setOpen

public void setOpen(boolean open)

setReverse

public void setReverse(boolean reverse)

setPosition

public void setPosition(float position)

setRelPosition

public void setRelPosition(float relPosition)

getTransitionTime

public long getTransitionTime()
Description copied from interface: HallTransition
Get the Epoch microseconds when the transition occurred.

Specified by:
getTransitionTime in interface HallTransition

getSensorId

public int getSensorId()
Description copied from interface: HallTransition
Get the id of the Hall Sensor

Specified by:
getSensorId in interface HallTransition

isOpen

public boolean isOpen()
Description copied from interface: HallTransition
Check if the sensor is open after the transition. Open is the state when no actuating magnet is near the sensor. The sensor closes and re-opens as a magnet moves past it.

Specified by:
isOpen in interface HallTransition

isReverse

public boolean isReverse()
Description copied from interface: HallTransition
Check if the motion was in the reverse direction, in shutter coordinates.

Specified by:
isReverse in interface HallTransition

getPosition

public float getPosition()
Description copied from interface: HallTransition
Get the position (in mm) where the transition occurred

Specified by:
getPosition in interface HallTransition

getRelPosition

public float getRelPosition()
Description copied from interface: HallTransition
Get the relative position (0 - 1) where the transition occurred

Specified by:
getRelPosition in interface HallTransition


Copyright © 2012 LSST. All Rights Reserved.