package org.bucksch.zeipis.recorder;
import org.bucksch.zeipis.all.*;
import java.sql.*;

public class DVBS2Transponder extends DVBSTransponder
{
  public DVBS2Transponder() { super(); myDVBSubtype = "DVB-S2"; }
  protected void readFromDatabaseResultSet(ResultSet rs)
    throws Misconfiguration, SQLException
  {
    super.readFromDatabaseResultSet(rs);
    rolloff = rs.getString("rolloff").toUpperCase();
    if ( ! rolloff.equals("AUTO") && ! rolloff.equals("20") && ! rolloff.equals("25") && ! rolloff.equals("35"))
      throw new Misconfiguration("Unknown rolloff " + rolloff);
    pilot = rs.getString("pilot").toUpperCase().charAt(0);
    if (pilot != 'A' && pilot != '1' && pilot != '0')
      throw new Misconfiguration("Unknown pilot " + pilot);
  }

  // physical tuning
  public String rolloff;
  public char pilot;
}
