1.0: Final Release

javax.microedition.amms.control.tuner
Interface RDSControl

All Superinterfaces:
javax.microedition.media.Control

public interface RDSControl
extends javax.microedition.media.Control

RDSControl is an interface for accessing the Radio Data System for VHF/FM sound broadcasting (RDS) (BS EN 50067:1998) settings of a Player. RDSControl can also be used with Radio Broadcast Data System (RBDS) (U.S. RBDS Standard - April 1998), but RDS terminology is used in this API documentation.

See Also:
Control, Player, PlayerListener, TunerControl

Field Summary
static java.lang.String RADIO_CHANGED
          Posted to PlayerListener when the tuning settings (usually the frequency) of a radio Player have been changed automatically for some reason.
static java.lang.String RDS_NEW_ALARM
          Posted to PlayerListener when the Programme TYpe (PTY) field of a Player changes to "alarm".
static java.lang.String RDS_NEW_DATA
          Posted to PlayerListener when new data is available via RDS on a Player.
 
Method Summary
 boolean getAutomaticSwitching()
          Gets the mode of the automatic switching of the transmitter in case of a stronger transmitter with the same PI presence.
 boolean getAutomaticTA()
          Gets the mode of the automatic switching of the program in case of the presence of Traffic Anouncement in another program.
 java.util.Date getCT()
          Gets the current Clock Time and date (CT).
 int[] getFreqsByPTY(short PTY)
          Gets the frequencies sending the given Programme TYpe.
 int[][] getFreqsByTA(boolean TA)
          Gets the frequencies sending Traffic Anouncements (TA).
 short getPI()
          Gets the current Programme Identification code.
 java.lang.String getPS()
          Gets the current Programme Service name.
 java.lang.String[] getPSByPTY(short PTY)
          Gets the Programme Service names (PS) sending the given Programme TYpe.
 java.lang.String[] getPSByTA(boolean TA)
          Gets the Programme Service names (PS) sending Traffic Anouncements.
 short getPTY()
          Gets the current Programme TYpe as short.
 java.lang.String getPTYString(boolean longer)
          Gets the current Programme TYpe as a String with the maximum of 8 or 16 characters in English.
 java.lang.String getRT()
          Gets the current Radio Text.
 boolean getTA()
          Gets the current status of the Traffic Anouncement (TA) switch.
 boolean getTP()
          Gets the current status of the Traffic Programme (TP) switch.
 boolean isRDSSignal()
          Returns the status of the RDS reception.
 void setAutomaticSwitching(boolean automatic)
          Sets the automatic switching of the transmitter in the case of a stronger transmitter with the same PI presence.
 void setAutomaticTA(boolean automatic)
          Sets the automatic switching of the program in case of the presence of Traffic Anouncement in another program.
 

Field Detail

RDS_NEW_DATA

public static final java.lang.String RDS_NEW_DATA
Posted to PlayerListener when new data is available via RDS on a Player. Typically, this happens within few seconds after tuning to a new channel or when some part of the RDS data, such as Radio Text, is changed. When this event is received, the eventData parameter will be a Short object that is the Programme Identification of the program where new data was received.

Value RDS_NEW_DATA is assigned to RDS_NEW_DATA.

See Also:
Constant Field Values

RDS_NEW_ALARM

public static final java.lang.String RDS_NEW_ALARM
Posted to PlayerListener when the Programme TYpe (PTY) field of a Player changes to "alarm". When this event is received, the eventData parameter will be a Short object that is the Programme Identification of the program where the alarm was switched on.

Value RDS_ALARM is assigned to RDS_NEW_ALARM.

See Also:
Constant Field Values

RADIO_CHANGED

public static final java.lang.String RADIO_CHANGED
Posted to PlayerListener when the tuning settings (usually the frequency) of a radio Player have been changed automatically for some reason. This typically happens when the radio has been ordered to change, based on RDS, the transmitter, for example, to get stronger signal when moving the location of the mobile device or when Traffic Announcement is on in an other program. When this event is received, the eventData parameter will be a Short object that is the Programme Identification of the new program.

Value radio_changed is assigned to RADIO_CHANGED.

See Also:
Constant Field Values
Method Detail

isRDSSignal

public boolean isRDSSignal()
Returns the status of the RDS reception.

Returns:
true if RDS signal can be recepted, false otherwise

getPS

public java.lang.String getPS()
Gets the current Programme Service name.

Returns:
name of the Programme Service or a zero-length String if unknown

getRT

public java.lang.String getRT()
Gets the current Radio Text.

Returns:
Radio Text or zero-length String if unknown

getPTY

public short getPTY()
Gets the current Programme TYpe as short. The return value zero corresponds to No Programme Type or to undefined type.

Please note that PTYs in RBDS differ from the ones in RDS.

Returns:
Programme TYpe or zero for undefined type

getPTYString

public java.lang.String getPTYString(boolean longer)
Gets the current Programme TYpe as a String with the maximum of 8 or 16 characters in English.

Please note that PTYs in RBDS differ from the ones in RDS.

Parameters:
longer - true for the maximum lenght of 16 characters, false for the maximum lenght of 8 characters
Returns:
Programme TYpe or "None" for an undefined type

getPI

public short getPI()
Gets the current Programme Identification code.

Returns:
Programme Identification code or zero for an undefined PI code

getFreqsByPTY

public int[] getFreqsByPTY(short PTY)
Gets the frequencies sending the given Programme TYpe. Based on the EON field. The alternate frequencies will not be returned.

Returns:
frequencies of programs in 100 Hertzs or null if none are found

getFreqsByTA

public int[][] getFreqsByTA(boolean TA)
Gets the frequencies sending Traffic Anouncements (TA). Based on EON field.

Parameters:
TA - true to get TAs, false to get no TAs
Returns:
matrix of Programmes * Alternative Frequencies in 100 Hertzs or null if none is found

getPSByPTY

public java.lang.String[] getPSByPTY(short PTY)
Gets the Programme Service names (PS) sending the given Programme TYpe. Based on the EON field.

Parameters:
PTY - the Programme TYpe of programmes whose Programme Service names to get
Returns:
Programme Service names or null if none are found

getPSByTA

public java.lang.String[] getPSByTA(boolean TA)
Gets the Programme Service names (PS) sending Traffic Anouncements. Based on the EON field.

Parameters:
TA - true to get TAs, false to get no TAs
Returns:
Programme Service names or null if none are found

getCT

public java.util.Date getCT()
Gets the current Clock Time and date (CT).

Returns:
current time and date or null if unknown

getTA

public boolean getTA()
Gets the current status of the Traffic Anouncement (TA) switch.

Returns:
true if TA is on, false otherwise

getTP

public boolean getTP()
Gets the current status of the Traffic Programme (TP) switch.

Returns:
true if TP is on, false otherwise

setAutomaticSwitching

public void setAutomaticSwitching(boolean automatic)
                           throws javax.microedition.media.MediaException
Sets the automatic switching of the transmitter in the case of a stronger transmitter with the same PI presence. Based on AF and/or EON fields.

Parameters:
automatic - true to turn on the automatic switching, false to turn it off
Throws:
javax.microedition.media.MediaException - if setting the given value is not supported

getAutomaticSwitching

public boolean getAutomaticSwitching()
Gets the mode of the automatic switching of the transmitter in case of a stronger transmitter with the same PI presence.

Returns:
true if the automatic switching is on, false otherwise

setAutomaticTA

public void setAutomaticTA(boolean automatic)
                    throws javax.microedition.media.MediaException
Sets the automatic switching of the program in case of the presence of Traffic Anouncement in another program. Based on TP and TA fields.

Parameters:
automatic - true to turn on the automatic switching, false to turn it off
Throws:
javax.microedition.media.MediaException - if setting the given value is not supported

getAutomaticTA

public boolean getAutomaticTA()
Gets the mode of the automatic switching of the program in case of the presence of Traffic Anouncement in another program. Based on TP and TA fields.

Returns:
true if the automatic switching is on, false otherwise

1.0: Final Release

Copyright © 2004-2005 Nokia Corporation. See the Copyright for details.