Specifications

AVIDdirector-M2M Technical Reference Guide
February 5, 2009 ©AVIDwireless 2004-2009 All Rights Reserved Page 37 of 55
import java.io.InputStream;
import java.io.IOException;
import java.util.Hashtable;
import java.util.Enumeration;
/**
* <b>Demo_M2Mlet</b>
* <p>
* This handles the on device hardware IO for the AVIDdirector-M2M device
* using the simulation board.
* <p>
* This is for device initiated or monitored hardware. You have to create a
* class that implements M2Mlet methods. The configuration file
* contains classes that are loaded when the device starts polls the device
* per the polling interval. Each class will report to the M2M-XML portal
* the results of how it is setup.
*
* <hr>
* Developed by AVIDWireless, division of VoiceDataWare Inc. and SensorLogic Inc. <br>
* Contains PROPRIETARY/CONFIDENTIAL information. Use is subject to license terms.<br>
* Copyright 2004, All Rights Reserved
* <p>
* @author AVIDWireless <a href="http://www.avidwireless.com>http://www.avidwireless.com</a>
* @version $Revision: 12 $ $JustDate: 2/21/05 $<br>
* @since Apr 19, 2004
*
*/
public class Demo_M2Mlet extends M2Mlet implements Runnable {
/* Our source safe revision numbers */
final static String REVISION = "$Revision: 12 $"; // for tracking revisions
/*
* $NoKeywords: $ */
//############ STATIC DATA AND CONSTANTS ##################
/** Configuration file value to enable or disable the demo mode */
final static String CONFIG_FILE_DEMO_MODE =
CONFIG_FILE_M2MLET_PREFIX+".DEMO_ENABLED";
//################# INSTANCE DATA #########################
/** Array of our M2M sensors we are using to poll */
M2M_IODevice[] sensors;
/** The output devices */
M2M_IODevice lamp, greenLed, redLed;
/** Set true if this is enabled */
volatile boolean demoM2mletEnabled;
/** Set true of the old demo board */
private boolean oldDemoBoard;
/** Variables to manage a background thread to perform the readings */
private Thread thread;
private volatile boolean threadRunning;
//################# CONSTRUCTORS #########################
/**
* M2Mlets require a null constructor
*/
public Demo_M2Mlet() {
// null constructor
}
//################ INSTANCE METHODS ########################