com.biocomfort.TO
Class DeviceStatusTO

java.lang.Object
  extended by com.biocomfort.TO.DeviceStatusTO
All Implemented Interfaces:
TO, java.io.Serializable, java.lang.Cloneable

public class DeviceStatusTO
extends java.lang.Object
implements TO, java.io.Serializable, java.lang.Cloneable

The DeviceStatusTO is a data class to store the device status information of a medical device. It is part of the class MedicalDeviceTO but initially not instantiated. To store device status information for a medical device create a new instance of this class and assign it to the MedicalDeviceTO object.

See Also:
MedicalDeviceTO.setDeviceStatus(DeviceStatusTO), MedicalDeviceTO.getDeviceStatus(), Serialized Form

Constructor Summary
DeviceStatusTO()
          Constructs a DeviceStatusTO object with initializing it so that no status bit is set.
DeviceStatusTO(short[] status)
          Constructs a DateTimeTO object with specifying the device status by the given short array of length 2.
 
Method Summary
 java.lang.Object clone()
          Returns a deep clone of this DeviceStatusTO object.
 java.lang.String formatStatus()
          Returns a string representation of the status bits represented by this device status data object.
 short[] getStatus()
          Returns a raw short array of length 2 representing all status bits.
 boolean isBitSet_ST_CLR_MEMORY()
          Returns true if the status bit ST_CLR_MEMORY is set.
 boolean isBitSet_ST_DEL_BINDING()
          Returns true if the status bit ST_DEL_BINDING is set.
 boolean isBitSet_ST_LOW_BAT()
          Returns true if the status bit ST_LOW_BAT is set.
 boolean isBitSet_ST_MEASURE_AVAIL()
          Returns true if the status bit ST_MEASURE_AVAIL is set.
 boolean isBitSet_ST_MEASURE_ERR()
          Returns true if the status bit ST_MEASURE_ERR is set.
 boolean isBitSet_ST_MEASURE_REM()
          Returns true if the status bit ST_MEASURE_REM is set.
 boolean isBitSet_ST_MEASURE_REQ()
          Returns true if the status bit ST_MEASURE_REQ is set.
 boolean isBitSet_ST_MED_DEVICE_OFF()
          Returns true if the status bit ST_MED_DEVICE_OFF is set.
 boolean isBitSet_ST_MED_SLEEP()
          Returns true if the status bit ST_MED_SLEEP is set.
 boolean isBitSet_ST_PAR_CHANGED()
          Returns true if the status bit ST_PAR_CHANGED is set.
 boolean isBitSet_ST_RES_TRANS_FLAG()
          Returns true if the status bit ST_RES_TRANS_FLAG is set.
 boolean isBitSet_ST_RF_ONLINE()
          Returns true if the status bit ST_RF_ONLINE is set.
 boolean isBitSet_ST_SPI_COMM()
          Returns true if the status bit ST_SPI_COMM is set.
 boolean isBitSet_ST_TRX_ON()
          Returns true if the status bit ST_TRX_ON is set.
 void setStatus(short[] value)
          Sets all device status bits specified by the given short array.
 java.lang.String toString()
          Converts this DeviceStatusTO object to a String of the form: DeviceStatusTO (status: <comma separated list of set bits>)
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeviceStatusTO

public DeviceStatusTO()
Constructs a DeviceStatusTO object with initializing it so that no status bit is set.


DeviceStatusTO

public DeviceStatusTO(short[] status)
Constructs a DateTimeTO object with specifying the device status by the given short array of length 2.

Parameters:
status - short array of length 2 representing the device status
Method Detail

getStatus

public short[] getStatus()
Returns a raw short array of length 2 representing all status bits. The concrete position of a specific status bit depends of the implementation of the communication protocol. Use the methods DeviceStatusTO.isBitSet_...() instead to read a single bits.

Returns:
short array of length 2 representing the device status

setStatus

public void setStatus(short[] value)
Sets all device status bits specified by the given short array. The short array must have a length of 2.

Parameters:
value - short array of length 2 representing the device status

isBitSet_ST_MEASURE_REQ

public boolean isBitSet_ST_MEASURE_REQ()
Returns true if the status bit ST_MEASURE_REQ is set.

The DµC sets this bit to inform the RFµC, that a measurement is to be done. This request means, that the RFµC should disconnect from the master and shout down the transceiver.

Returns:
true if the status bit is set.

isBitSet_ST_MEASURE_ERR

public boolean isBitSet_ST_MEASURE_ERR()
Returns true if the status bit ST_MEASURE_ERR is set.

The DµC sets this bit, if an error has occurred during the measurement.

Returns:
true if the status bit is set.

isBitSet_ST_MEASURE_AVAIL

public boolean isBitSet_ST_MEASURE_AVAIL()
Returns true if the status bit ST_MEASURE_AVAIL is set.

This bit indicates, that there are still non transmitted data in the memory. If all data have been transmitted, this bit is zero.

Returns:
true if the status bit is set.

isBitSet_ST_LOW_BAT

public boolean isBitSet_ST_LOW_BAT()
Returns true if the status bit ST_LOW_BAT is set.

This bit is set when the battery voltage is low. In this case the battery symbol on the diagnosis device is also displayed. This bit indicates, that the battery should be changed.

Returns:
true if the status bit is set.

isBitSet_ST_DEL_BINDING

public boolean isBitSet_ST_DEL_BINDING()
Returns true if the status bit ST_DEL_BINDING is set.

This bit is set by the DµC, when the user has in the setting mode selected to delete the binding information. The RFµC should reset this bit as soon as the binding information is deleted.

Returns:
true if the status bit is set.

isBitSet_ST_MED_DEVICE_OFF

public boolean isBitSet_ST_MED_DEVICE_OFF()
Returns true if the status bit ST_MED_DEVICE_OFF is set.

This bit is set by the DµC to inform the RFµC that the DµC will go to sleep mode. This bit does not issue any further communication.

Returns:
true if the status bit is set.

isBitSet_ST_CLR_MEMORY

public boolean isBitSet_ST_CLR_MEMORY()
Returns true if the status bit ST_CLR_MEMORY is set.

This bit is set and reset by the DµC. This bit is set when the memory has to be cleared.

Returns:
true if the status bit is set.

isBitSet_ST_PAR_CHANGED

public boolean isBitSet_ST_PAR_CHANGED()
Returns true if the status bit ST_PAR_CHANGED is set.

This bit is set by the DµC to inform the RFµC that setting parameters are changed (only used by some medical devices like BSC).

Returns:
true if the status bit is set.

isBitSet_ST_RF_ONLINE

public boolean isBitSet_ST_RF_ONLINE()
Returns true if the status bit ST_RF_ONLINE is set.

This bit is set, when there is a radio communication between the diagnosis device and the diagnosis box. In this case the RF symbol on the diagnosis device is displayed.

Returns:
true if the status bit is set.

isBitSet_ST_TRX_ON

public boolean isBitSet_ST_TRX_ON()
Returns true if the status bit ST_TRX_ON is set.

This bit is set, when the transceiver is switched on. This could be sending the heart beat signal or transmitting or receiving data.

Returns:
true if the status bit is set.

isBitSet_ST_MED_SLEEP

public boolean isBitSet_ST_MED_SLEEP()
Returns true if the status bit ST_MED_SLEEP is set.

This bit is set by RFC to issue DµC go directly to sleep mode. The DµC resets this bit in sleep mode.

Returns:
true if the status bit is set.

isBitSet_ST_RES_TRANS_FLAG

public boolean isBitSet_ST_RES_TRANS_FLAG()
Returns true if the status bit ST_RES_TRANS_FLAG is set.

This bit is set by RFµC to set all storages in memory as untransmitted for the active current user, so that the memory can be read out. The DµC resets this bit after resetting all transmit flags.

Returns:
true if the status bit is set.

isBitSet_ST_MEASURE_REM

public boolean isBitSet_ST_MEASURE_REM()
Returns true if the status bit ST_MEASURE_REM is set.

This bit is set to issue a remote controlled measurement and is reset by DµC.

Returns:
true if the status bit is set.

isBitSet_ST_SPI_COMM

public boolean isBitSet_ST_SPI_COMM()
Returns true if the status bit ST_SPI_COMM is set.

This bit is set and reset by the DµC to inform about status bit changes (only used by some medical devices like BSC).

Returns:
true if the status bit is set.

formatStatus

public java.lang.String formatStatus()
Returns a string representation of the status bits represented by this device status data object. For every status bit that is set a string representation is added to a comma separated list.

Returns:
a string representation of the bits that are set

toString

public java.lang.String toString()
Converts this DeviceStatusTO object to a String of the form:
 DeviceStatusTO (status: <comma separated list of set bits>)
 

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this device status data object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a deep clone of this DeviceStatusTO object.

Overrides:
clone in class java.lang.Object
Returns:
a deep clone of this instance
Throws:
java.lang.CloneNotSupportedException