package inp.camac;

/**
 * @author      Maxim V. Kollegov
 * @version     1.00, 02/04/2001
 */

/**
 * Object representing LAM in Crate
 */

public class LAMevent extends Object {
  /**
   * This LAM module position (1..24)
   */
  public int    N;
   
  /**
   * This LAM timestamp
   */
  public long   when;
   
  /**
   * Source module for this LAM 
   */
  public Module source;

  /**
   * LAMevent constructor. create new LAM event in position N and reference to source module.
   * Automatically set timestamp 
   *
   * @param N       source N (1..24)
   * @param source  source module for this LAM
   */
  public LAMevent(int N, Module source ) {
  	this.source = source;
    this.when   = System.currentTimeMillis();
    this.N      = N;
  }
   
  /**
   * @return LAM source position N (1..24)
   */
  public int getN() {
    return N;
  }
  
  /**
   * @return source Module for this LAM
   */
  public Module getSource(){
    return  source;
  }
  
  /**
   * @return timestamp when this LAM occured
   */
  public long getWhen(){
    return when;
  }
  

}