Class SearchStateFrequency

java.lang.Object
io.github.dsheirer.rrapi.request.RequestBody
io.github.dsheirer.rrapi.request.SearchStateFrequency

public class SearchStateFrequency extends RequestBody
Search state frequency
  • Constructor Details

    • SearchStateFrequency

      public SearchStateFrequency(AuthorizationInformation authorizationInformation, int stateId, double frequency, String tone)
      Constructs the request
      Parameters:
      authorizationInformation - for the request
      stateId - to search for
      frequency - to search for in MHz
      tone - PL tone to search for
    • SearchStateFrequency

      public SearchStateFrequency(AuthorizationInformation authorizationInformation, int stateId, double frequency)
      Constructs a request
      Parameters:
      authorizationInformation - for the request
      stateId - to search for
      frequency - to search for in MHz
  • Method Details

    • getStateId

      public int getStateId()
      State id
      Returns:
      id
    • setStateId

      public void setStateId(int stateId)
      Sets the state id
      Parameters:
      stateId - to query
    • getFrequency

      public double getFrequency()
      Frequency to search for
      Returns:
      frequency in MHz
    • getFrequencyText

      public String getFrequencyText()
      Frequency parameter as sent to the service: MHz rounded to the nearest Hz, without floating point artifacts, so a frequency computed from Hz, e.g. hz / 1E6, matches the database value.
      Returns:
      frequency text in MHz
    • setFrequency

      public void setFrequency(double frequency)
      Search frequency
      Parameters:
      frequency - in MHz
    • getTone

      public String getTone()
      Tone (PL) on the channel
      Returns:
      search tone
    • setTone

      public void setTone(String tone)
      Specifies a tone to search for
      Parameters:
      tone - to search for
    • create

      public static RequestEnvelope create(AuthorizationInformation authorizationInformation, int stateId, double frequency)
      Creates the request envelope
      Parameters:
      authorizationInformation - credentials
      stateId - to query
      frequency - in MHz
      Returns:
      request
    • create

      public static RequestEnvelope create(AuthorizationInformation authorizationInformation, int stateId, double frequency, String tone)
      Creates the request envelope
      Parameters:
      authorizationInformation - credentials
      stateId - to query
      frequency - in MHz
      tone - PL
      Returns:
      request