package org.osgi.impl.service.zigbee;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.impl.service.zigbee.basedriver.ZigBeeBaseDriver;

/**
 * Activator for mocked ZigBee basedriver.
 */
public class ZigBeeBundleActivator implements BundleActivator {

	private ZigBeeBaseDriver	basedriver;

	/**
	 * This method is called when ZigBee Bundle starts, so that the Bundle can
	 * perform Bundle specific operations.
	 * 
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext bc) {
		try {
			basedriver = new ZigBeeBaseDriver(bc);
			basedriver.start();
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}

	/**
	 * This method is called when ZigBee Bundle stops.
	 * 
	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext bc) {
		try {
			basedriver.stop();
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}
}

@@ -1,8 +1,9 @@
+%0A
 package 
@@ -607,67 +607,351 @@
 %0A%09%09%09
-basedriver = new ZigBeeBaseDriver(bc);%0A%09%09%09basedriver.start(
+System.out.println(this.getClass().getName() + %22 - Instantiate the ZigBeeBaseDriver.%22);%0A%09%09%09basedriver = new ZigBeeBaseDriver(bc);%0A%09%09%09System.out.println(this.getClass().getName() + %22 - Start the ZigBeeBaseDriver instance.%22);%0A%09%09%09basedriver.start();%0A%09%09%09System.out.println(this.getClass().getName() + %22 - The ZigBeeBaseDriver instance is started.%22
 );%0A%09
@@ -1225,24 +1225,216 @@
 %0A%09%09%09
-basedriver.stop(
+System.out.println(this.getClass().getName() + %22 - Stop the ZigBeeBaseDriver instance.%22);%0A%09%09%09basedriver.stop();%0A%09%09%09System.out.println(this.getClass().getName() + %22 - The ZigBeeBaseDriver instance is stopped.%22
 );%0A%09

Update logs.