com.buglabs.bug.module.pub
Interface IModlet

All Known Implementing Classes:
AudioModlet, BUGBeeModlet, CameraModlet, GPSModlet, LCDModlet, MotionModlet, VonHippelModlet, WifiModlet

public interface IModlet

modlet is a software component that handles all runtime service aspects of a given hardware module.


Method Summary
 java.lang.String getModuleId()
          Return the MODULE ID.
 int getSlotId()
           
 void setup()
          Connect to any devices or do any initialization.
 void start()
          Begin modlet.
 void stop()
          Unregister services and release any resources.
 

Method Detail

getModuleId

java.lang.String getModuleId()
Return the MODULE ID. This comes from the hardware.

Returns:

getSlotId

int getSlotId()
Returns:
Slot that the Module is currently connected to.

setup

void setup()
           throws java.lang.Exception
Connect to any devices or do any initialization. This is a good place to throw an exception if the expected hardware environment is not valid.

Throws:
java.lang.Exception

start

void start()
           throws java.lang.Exception
Begin modlet. Any services that the modlet supports should be registered here.

Throws:
java.lang.Exception

stop

void stop()
          throws java.lang.Exception
Unregister services and release any resources.

Throws:
java.lang.Exception