Package com.motorola.oem.osc

OSC - OEM System Control Package Set and get the device system's properties, system's indications (battery, temperature, and antenna), power related operations (power save, shutdown, Alarm and more), MIDlet SW watchdog and system's date & time, FPGA Configuration (Display).

See:
          Description

Interface Summary
OSCAlarmListener Listener type for alarm events.
OSCAntennaListener Listener type for antenna status changes.
OSCBatteryListener Listener type for battery measurements changes.
OSCDateTimeListener Listener type for date & time state changes.
OSCTemperatureListener Listener type for temperature measurements changes.
OSCWdogListener Listener type for watchdog pings.
 

Class Summary
DisplayConfig Configure and control the main display FPGA settings.
OSC The OSC class provides control over the OEM system.
 

Exception Summary
OSCException  
 

Package com.motorola.oem.osc Description

OSC - OEM System Control Package Set and get the device system's properties, system's indications (battery, temperature, and antenna), power related operations (power save, shutdown, Alarm and more), MIDlet SW watchdog and system's date & time, FPGA Configuration (Display).

Set property example:



         import com.motorola.oem.OEMException;
         import com.motorola.oem.osc.OSC;
         import com.motorola.oem.osc.OSCException;
         import javax.microedition.midlet.MIDlet;


         public class UserMIDlet ... {
         ....
          protected void startApp() ... {  
            try{
                OSC.setProperty("oem.audio.digital","on"); 
            }
            catch (OSCException e) 
            {
                System.out.println("In catch Receive OSCException " +e);     
                System.out.println("In catch OSC.setProperty(\"oem.audio.digital\")");  
             } 
           }
         }
      

Get property example:




     import com.motorola.oem.OEMException;
     import com.motorola.oem.osc.OSC;
     import com.motorola.oem.osc.OSCException;
     import javax.microedition.midlet.MIDlet;


     public class UserMIDlet ... {
     ....
        protected void startApp() ... {
        String return_value = null;   

        try{
                return_value = OSC.getProperty("oem.lastfault.running"); 
                System.out.println("OSC.getProperty(\"oem.lastfault.running\") Return value=" +return_value);  
        }
        catch(OSCException e)
        {
                System.out.println("In catch Receive OSCException " +e);
                System.out.println("In catch OSC.getProperty(\"oem.lastfault.running\") Return value=" +return_value); 
        }  
       }
     }
  

FPGA load example:




     import com.motorola.oem.osc.DisplayConfig;
     import javax.microedition.midlet.MIDlet;


     public class UserMIDlet ... {
     ....
        protected void startApp() ... {

        try{
           DisplayConfig.loadFpgaConfigFile("/Xilinx320x240R480x640V001.bin");
        }
        catch(Exception e)
        {
          e.printStacktrace();
        }  
       // Set rescaler algorithm 
       DisplayConfig.sendFpgaCommand(0x44);
       ...
       //// DO SOME CANVAS ACTIVITY HERE...

       }
     }