com.alarexgroup.m2mplf.adapters.hw
Class CriticalTemperatureAdapter

java.lang.Object
  extended by com.alarexgroup.m2mplf.adapters.hw.CriticalTemperatureAdapter
All Implemented Interfaces:
ATCommanderListener
public class CriticalTemperatureAdapter
extends java.lang.Object
implements ATCommanderListener

Adapter for monitoring module's and battery's temperature.
Example:

import com.alarexgroup.m2mplf.M2Mlet;
import com.alarexgroup.m2mplf.adapters.hw.CriticalTemperatureAdapter;
import com.alarexgroup.m2mplf.adapters.hw.CriticalTemperatureAdapterListener;
import com.alarexgroup.m2mplf.logging.Logger;

public class CriticalAdapterExample extends M2Mlet implements CriticalTemperatureAdapterListener{
    
    public CriticalAdapterExample() {
    }

  
    public void onCriticalTemperatureEvent(int source, int code) {
        Logger.logInfo(""+source+" "+code);
    }

    public void appStart() {
        CriticalTemperatureAdapter crit = CriticalTemperatureAdapter.getCriticalTemperatureAdapter(this);
    }
    
    public void appStop(boolean unconditional) {
    }

    public void appPause() {
    }
}

Field Summary
static int ABOVE_UPPER_ALERT_LIMIT
          Temperature above the highest limit
static int ABOVE_UPPERMOST_LIMIT
          Temperature near the highest limit
static int BELLOW_LOW_ALERT_LIMIT
          Temperature below the lowest limit
static int BELLOW_LOWEST_LIMIT
          Temperature near the lowest limit
static int NORMAL
          Normal temperature
static int SOURCE_BATTERY
          BATTERY
static int SOURCE_BOARD
          SOURCE BOARD
 
Method Summary
static CriticalTemperatureAdapter getCriticalTemperatureAdapter(CriticalTemperatureAdapterListener listener)
          Initialize adapter
 void onURCEvent(java.lang.String urc)
          This method is called when gets AT command answer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCE_BATTERY

public static final int SOURCE_BATTERY
BATTERY

See Also:
Constant Field Values

SOURCE_BOARD

public static final int SOURCE_BOARD
SOURCE BOARD

See Also:
Constant Field Values

BELLOW_LOWEST_LIMIT

public static final int BELLOW_LOWEST_LIMIT
Temperature near the lowest limit

See Also:
Constant Field Values

BELLOW_LOW_ALERT_LIMIT

public static final int BELLOW_LOW_ALERT_LIMIT
Temperature below the lowest limit

See Also:
Constant Field Values

NORMAL

public static final int NORMAL
Normal temperature

See Also:
Constant Field Values

ABOVE_UPPER_ALERT_LIMIT

public static final int ABOVE_UPPER_ALERT_LIMIT
Temperature above the highest limit

See Also:
Constant Field Values

ABOVE_UPPERMOST_LIMIT

public static final int ABOVE_UPPERMOST_LIMIT
Temperature near the highest limit

See Also:
Constant Field Values
Method Detail

getCriticalTemperatureAdapter

public static CriticalTemperatureAdapter getCriticalTemperatureAdapter(CriticalTemperatureAdapterListener listener)
Initialize adapter

Parameters:
listener -
Returns:
adapter instance

onURCEvent

public void onURCEvent(java.lang.String urc)
Description copied from interface: ATCommanderListener
This method is called when gets AT command answer.

Specified by:
onURCEvent in interface ATCommanderListener
Parameters:
urc - - URC string