com.buglabs.bug.emulator.base
Class Activator
java.lang.Object
com.buglabs.bug.emulator.base.Activator
- All Implemented Interfaces:
- IBatteryInfoProvider, ITimeProvider, IToneGenerator, org.osgi.framework.BundleActivator
public class Activator
- extends java.lang.Object
- implements org.osgi.framework.BundleActivator, IBatteryInfoProvider, ITimeProvider, IToneGenerator
This bundle offers base unit features to the runtime, such as date/time and
power information.
Note: This is a emulator of the base bundle specifically tailored for BUG emulation. Please see
com.buglabs.bug.base for hardware specific version of the bundle.
- Author:
- kgilmer
|
Method Summary |
void |
generateTone(byte frequency,
byte duration)
Plays a tone via the piezo electric speaker. |
java.lang.String |
getId()
|
java.util.Date |
getTime()
|
double |
getValue()
|
void |
start(org.osgi.framework.BundleContext context)
|
void |
stop(org.osgi.framework.BundleContext context)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Activator
public Activator()
start
public void start(org.osgi.framework.BundleContext context)
throws java.lang.Exception
- Specified by:
start in interface org.osgi.framework.BundleActivator
- Throws:
java.lang.Exception
stop
public void stop(org.osgi.framework.BundleContext context)
throws java.lang.Exception
- Specified by:
stop in interface org.osgi.framework.BundleActivator
- Throws:
java.lang.Exception
getId
public java.lang.String getId()
- Specified by:
getId in interface IBatteryInfoProvider
getValue
public double getValue()
- Specified by:
getValue in interface IBatteryInfoProvider
getTime
public java.util.Date getTime()
- Specified by:
getTime in interface ITimeProvider
generateTone
public void generateTone(byte frequency,
byte duration)
- Description copied from interface:
IToneGenerator
- Plays a tone via the piezo electric speaker.
- Specified by:
generateTone in interface IToneGenerator
duration - A number 0-15 which represents the duration of the tone.