package nxm.train.prim;

import nxm.sys.inc.*;
import nxm.sys.lib.*;

/** My first primitive. */
public class primlab1 extends Primitive {
  private int count; // Current count

  public int open() {
    M.info("inside open()");
    
    count = 1;
    
    return NORMAL;
  }
  
  public int process() {
    M.info("inside process() count="+count);
    int status = NORMAL;
    count = count + 1;

    if (count > 20) {
      status = FINISH;
    }

    return status;
  }

  public int close() {
    M.info("inside close()");
    return NORMAL;
  }
}
