/**
 *  GNSS support interface to be implemented by TE providers.
 */
package org.etsi.helpers.gnss;

import java.math.BigInteger;

import org.etsi.ttcn.adapter.core.ports.Port;
import org.etsi.ttcn.tri.TriStatus;

/**
 *  Test Execution Required interface to be implemented by TE providers.
 */
public interface IGnssSupport {

  /**
   * Initialize the GNSS support.
   * @return TRI_OK in case of success, false otherwise
   */
  public TriStatus init();
  
  /**
   * Loads a scenario
   * @param id of predefined scenario
   * @return TRUE on success, FALSE otherwise
   */
  public boolean loadScenario(int p_id);
  
  /**
   * Starts a loaded scenario
   * @return TRUE on success, FALSE otherwise
   */
  public boolean startScenario();
  
  /**
   * Stops a started scenario
   * @return TRUE on success, FALSE otherwise
   */
  public boolean stopScenario();
  
  /**
   * Signals when the requested distance was covered
   * @param distance The requested distance in m.
   * @return TRUE on success, FALSE otherwise
   */
  public boolean awaitDistanceToCover(Port notifier, double distance);
  
  /**
   * Changes dynamically the speed in the running scenario
   * @param The new speed value.
   * @return TRUE on success, FALSE otherwise
   */
  public boolean changeSpeed(double speed);
  
  /**
   * Changes dynamically the heading in the running scenario
   * @param heading The new heading value.
   * @return TRUE on success, FALSE otherwise
   */
  public boolean changeHeading(double heading);
  
  /**
   * Gets the current GPS time
   * @return the time
   */
  public BigInteger getGpsTime();
  
  /**
   * Signals when the requested time in the running scenario is reached
   * @param time The requested time in msec.
   * @return TRUE on success, FALSE otherwise
   */
  public boolean awaitTimeInRunningScenario(Port notifier, int time);
  
  /**
   * Dispose object
   */
  public void dispose();
  
}
