com.biocomfort.TO
Class FirmwareTO

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

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

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

See Also:
MedicalDeviceTO.setFirmware(FirmwareTO), MedicalDeviceTO.getFirmware(), Serialized Form

Constructor Summary
FirmwareTO()
          Constructs a FirmwareTO object with initializing it so that the device type, the mask revision and the firmware revision are 0 and that the firmware date and time represents the time at which it was allocated.
 
Method Summary
 java.lang.Object clone()
          Returns a deep clone of this FirmwareTO object.
 java.lang.String formatFirmware()
          Converts this FirmwareTO object to a String of the form.
 int getDeviceType()
          Returns the device type of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.
 int getFirmware()
          Returns the firmware revision number of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.
 java.util.Date getFirmwareDateTime()
          Returns the firmware's build date and time of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.
 int getFirmwareDay()
          Returns the day of the month of the firmware's build date.
 int getFirmwareHourOfDay()
          Returns the hour of day of the firmware's build time.
 int getFirmwareMinute()
          Returns the number of minutes past the hour of the firmware's build time, as interpreted in the local time zone.
 int getFirmwareMonth()
          Returns a number representing the month that contains or begins with the instant in time of the firmware's build date, as interpreted for the default time zone and local.
 int getFirmwareYear()
          Returns a number representing the year that contains or begins with the instant in time of the firmware's build date, as interpreted for the default time zone and local.
 int getMaskRev()
          Returns the mask revision number (0 = flash type, 1 = first time masked) of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.
 void setDeviceType(int devType)
          Sets the device type of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.
 void setFirmware(int firmware)
          Sets the firmware revision number of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.
 void setFirmwareDateTime(java.util.Date firmwareDate)
          Sets the firmware's build date and time of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.
 void setFirmwareDateTime(int year, int month, int day, int hourOfDay, int minute)
          Sets the firmware's build date and time so that it represents the instant at the start of the minute specified by the year, month, day, hourOfDay, and minute arguments, for the default time zone and local.
 void setMaskRev(int maskRev)
          Sets the mask revision number (0 = flash type, 1 = first time masked) of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.
 java.lang.String toString()
          Converts this FirmwareTO object to a String of the form.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirmwareTO

public FirmwareTO()
Constructs a FirmwareTO object with initializing it so that the device type, the mask revision and the firmware revision are 0 and that the firmware date and time represents the time at which it was allocated.

Method Detail

getDeviceType

public int getDeviceType()
Returns the device type of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.

If a SerialNumberTO data object is assigned to the MedicalDeviceTO object the method SerialNumberTO.getDeviceType() should return the same device type.

Returns:
the medical device's type
See Also:
SerialNumberTO.getDeviceType(), SDK.DEVICE_TYPE_BLOOD_PRESSURE, SDK.DEVICE_TYPE_BLOOD_GLUCOSE, SDK.DEVICE_TYPE_SCALE

setDeviceType

public void setDeviceType(int devType)
Sets the device type of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.

If a SerialNumberTO data object is assigned to the MedicalDeviceTO object the method SerialNumberTO.getDeviceType() should return the same device type.

Parameters:
devType - the new medical device's type
See Also:
SerialNumberTO.getDeviceType(), SDK.DEVICE_TYPE_BLOOD_PRESSURE, SDK.DEVICE_TYPE_BLOOD_GLUCOSE, SDK.DEVICE_TYPE_SCALE

getMaskRev

public int getMaskRev()
Returns the mask revision number (0 = flash type, 1 = first time masked) of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.

Returns:
the medical device's mask revision number

setMaskRev

public void setMaskRev(int maskRev)
Sets the mask revision number (0 = flash type, 1 = first time masked) of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.

Parameters:
maskRev - the new medical device's mask revision number

getFirmware

public int getFirmware()
Returns the firmware revision number of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.

Returns:
the medical device's firmware revision number

setFirmware

public void setFirmware(int firmware)
Sets the firmware revision number of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.

Parameters:
firmware - the new medical device's firmware revision number

getFirmwareDateTime

public java.util.Date getFirmwareDateTime()
Returns the firmware's build date and time of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.

Returns:
the medical device's firmware build date

setFirmwareDateTime

public void setFirmwareDateTime(java.util.Date firmwareDate)
Sets the firmware's build date and time of the medical device to whose MedicalDeviceTO object this firmware data object is assign to.

Parameters:
firmwareDate - the new medical device's firmware build date

setFirmwareDateTime

public void setFirmwareDateTime(int year,
                                int month,
                                int day,
                                int hourOfDay,
                                int minute)
Sets the firmware's build date and time so that it represents the instant at the start of the minute specified by the year, month, day, hourOfDay, and minute arguments, for the default time zone and local.

Parameters:
year - the year
month - the month between 1-12
day - the day of month between 1-31
hourOfDay - the hour of a day between 0-23
minute - the minutes between 0-59

getFirmwareYear

public int getFirmwareYear()
Returns a number representing the year that contains or begins with the instant in time of the firmware's build date, as interpreted for the default time zone and local.

Returns:
the year of the firmware build date

getFirmwareMonth

public int getFirmwareMonth()
Returns a number representing the month that contains or begins with the instant in time of the firmware's build date, as interpreted for the default time zone and local. The value returned is between 1 and 12, with the value 1 representing January.

Returns:
the month of the firmware's build date between 1-12

getFirmwareDay

public int getFirmwareDay()
Returns the day of the month of the firmware's build date. The value returned is between 1 and 31 representing the day of the month that contains or begins with the instant in time of the firmware's build date, as interpreted in the local time.

Returns:
the day of month of the firmware's build date between 1-31

getFirmwareHourOfDay

public int getFirmwareHourOfDay()
Returns the hour of day of the firmware's build time. The returned value is a number (0 through 23) representing the hour within the day that contains or begins with the instant in time of the firmware's build time, as interpreted in the local time zone.

Returns:
the hour of day of the firmware's build time between 0-23

getFirmwareMinute

public int getFirmwareMinute()
Returns the number of minutes past the hour of the firmware's build time, as interpreted in the local time zone. The value returned is between 0 and 59.

Returns:
the minutes of the firmware's build time between 0-59

toString

public java.lang.String toString()
Converts this FirmwareTO object to a String of the form.
 FirmwareTO (devType:<devType>,maskRev:<maskRev>,firmware:<firmware>,firmwareDate:dow mon dd hh:mm:ss zzz yyyy)
 
See java.util.Date.toString() for more details.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this firmware data object
See Also:
Date.toString()

formatFirmware

public java.lang.String formatFirmware()
Converts this FirmwareTO object to a String of the form.
 <devType in hex format> <maskRev in hex format> <firmware in hex format> dd/MM/yyyy HH:mm:ss
 

Returns:
a string representation of this firmware data object

clone

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

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