Init commit

This commit is contained in:
Kyle Kiteveles 2023-08-04 12:52:37 -04:00
commit 2e8e9cd177
9 changed files with 2738 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/target

831
CTempFamily.xml Normal file
View file

@ -0,0 +1,831 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<FAMILY name="FmTEMP">
<!--====================================-->
<!--Species Key Reference -->
<!-- ====================================-->
<SPECIES_KEY>
<GENUS name="GnDATA">
<SPECIES name="SpSTANDARD" defaultvalue="0"/>
<SPECIES name="SpDATA" defaultvalue="1"/>
<SPECIES name="SpENGDATA" defaultvalue="2"/>
<SPECIES name="SpPROBEDATA" defaultvalue="3"/>
<SPECIES name="SpHARDWARESTATE" defaultvalue="4"/>
<SPECIES name="SpLOCK" defaultvalue="5"/>
<SPECIES name="SpRAWDATA" defaultvalue="6"/>
<SPECIES name="SpSTATUS" defaultvalue="7"/>
<SPECIES name="SpADSAMPLEDATA" defaultvalue="8"/>
<SPECIES name="SpTOUCHDATA" defaultvalue="9"/>
<SPECIES name="SpTHERMDATA" defaultvalue="10"/>
</GENUS>
<GENUS name="GnCONFIG">
<SPECIES name="SpSTANDARD" defaultvalue="0"/>
<SPECIES name="SpDATA" defaultvalue="1"/>
<SPECIES name="SpCALIBRATION" defaultvalue="2"/>
</GENUS>
<GENUS name="GnPARAMETER">
<SPECIES name="SpMSG_ARGUMENTS" defaultvalue="0" />
<SPECIES name="SpDATA" defaultvalue="1"/>
<SPECIES name="SpSELECTOR" defaultvalue="2" comment="Used to indicate that the Value is a selector"/>
</GENUS>
</SPECIES_KEY>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<DEFINITION class="CTempDStd" abrv="CTMPDSTD" version="104" family="FmTEMP" genus="GnDATA" species="SpSTANDARD">
<MEMBERS>
<!-- Version 001 -->
<MEMBER type="TIME" name="STime" minversion="100" maxversion="CURRENT_VERSION" comment="Time reading was taken"/>
<MEMBER type="uint16" name="Status" minversion="100" maxversion="CURRENT_VERSION" comment="DATA_NOT_AVAIL, DATA_COMPLETE, etc"/>
<MEMBER type="uint16" name="ExtStatus" minversion="100" maxversion="CURRENT_VERSION" comment="Extended status/error code"/>
<MEMBER type="uint16" name="Source" minversion="100" maxversion="CURRENT_VERSION" comment="Source of data "/>
<MEMBER type="uint8" name="Mode" minversion="100" maxversion="CURRENT_VERSION" comment="Mode of operation"/>
<MEMBER type="uint8" name="Method" minversion="100" maxversion="CURRENT_VERSION" comment="Method used"/>
<MEMBER type="float" name="Temperature" minversion="100" maxversion="CURRENT_VERSION" comment="Temperature {in deg K}"/>
</MEMBERS>
<ENUMERATION name="Status">
<!-- ====== -->
<!-- Status -->
<!-- ====== -->
<!-- Generic Status codes -->
<ENUM name="DATA_NOT_AVAIL" defaultvalue="0"/>
<ENUM name="DATA_COMPLETE"/>
<ENUM name="DATA_FAILURE"/>
<ENUM name="DATA_EXCEPTION"/>
<ENUM name="DATA_PROCESSING"/>
<!-- No Class Status codes -->
</ENUMERATION>
<ENUMERATION name="ExtStatus">
<!-- =============== -->
<!-- Extended Status -->
<!-- =============== -->
<!-- One Generic Extended Status codes -->
<ENUM name="NONE" defaultvalue="0"/>
<!-- Extended Status codes when Status is Data Failure or Data Exception -->
<!-- Class Status codes -->
<!-- Codes for SureTemp Plus -->
<ENUM name="FINAL_POSITION"/>
<ENUM name="FINAL_OVER_TEMP"/>
<ENUM name="FINAL_OVER_TEMP_POSITION"/>
<ENUM name="FINAL_UNDER_TEMP"/>
<ENUM name="FINAL_UNDER_TEMP_POSITION"/>
<ENUM name="MONITOR_POSITION"/>
<ENUM name="MONITOR_OVER_TEMP"/>
<ENUM name="MONITOR_OVER_TEMP_POSITION"/>
<ENUM name="MONITOR_UNDER_TEMP"/>
<ENUM name="MONITOR_UNDER_TEMP_POSITION"/>
<!--Braun communication errors-->
<ENUM name="CRC_FAILURE"/>
<ENUM name="COMM_FAILURE"/>
<ENUM name="FINAL_UNADJUSTED"/>
<ENUM name="BUTTON_RANGE_ERROR" comment="The button index was not in range of the specified array size"/>
<ENUM name="AMB_RANGE_ERROR" comment="Ambient drop between button press sample and the last sample are too low or too high"/>
<ENUM name="ENTRY_RANGE_ERROR" comment="Entry temperature was either too low or too high"/>
<ENUM name="TT_RANGE_ERROR" comment="Target temperature was either too low or too high"/>
<ENUM name="TT_SLOPE_RANGE_ERROR" comment="Target temperature slope was either too low or too high"/>
<ENUM name="OUTPUT_RANGE_ERROR" comment="Technique Compensation temperature was either too high or too low"/>
<ENUM name="CAP_STABILITY_ERROR" comment="The difference between the max and min capacitance value is more than 2"/>
<ENUM name="CAP_ENTRY_ERROR" comment="The capacitance entry into the ear was not detected"/>
<ENUM name="PREMATURE_BUTTON_PRESS" comment="There was not enough pre-button samples"/>
<ENUM name="CALIBRATION" defaultvalue="23" comment="Temperature was taken in calibration mode"/>
<ENUM name="UNADJUSTED_NO_OFFSETS" defaultvalue="24" comment="Temperature reported without technique compensation or any offsets applied"/>
</ENUMERATION>
<ENUMERATION name="Source">
<!-- ====== -->
<!-- Source -->
<!-- ====== -->
<!-- Generic Source codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<!-- Class Source codes begin at 10 -->
<ENUM name="SURETEMP_SW" defaultvalue="10"/>
<ENUM name="SURETEMP"/>
<ENUM name="SURETEMP_PLUS"/>
<ENUM name="BRAUN_PRO4000"/>
<ENUM name="BRAUN_PRO6000"/>
</ENUMERATION>
<ENUMERATION name="Mode">
<!-- ==== -->
<!-- Mode -->
<!-- ==== -->
<!-- Generic Mode codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<!-- Class Mode codes begin at 10 -->
<ENUM name="ORAL" defaultvalue="10"/>
<ENUM name="RECTAL"/>
<ENUM name="PED_AXIL"/>
<ENUM name="CAL_KEY"/>
<ENUM name="ADULT_AXIL"/>
<ENUM name="TYMPANIC"/>
</ENUMERATION>
<ENUMERATION name="Method">
<!-- ====== -->
<!-- Method -->
<!-- ====== -->
<!-- Generic Method codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<ENUM name="MANUAL"/>
<ENUM name="DEVICE"/>
<ENUM name="REMOTE"/>
<!-- Class Method codes begin at 10 -->
<ENUM name="PREDICT" defaultvalue="10"/>
<ENUM name="MONITOR"/>
<ENUM name="IR"/>
<ENUM name="BRAUN_CALC" comment="Temperature calculated by the Braun IRT"/>
<ENUM name="TECHNIQUE_COMPENSATION_CALC" comment="Temperature calculated by the Technique Compensation algorithm"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpSTANDARD"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<DEFINITION class="CTempDData" abrv="CTMPDDTA" version="205" family="FmTEMP" genus="GnDATA" species="SpDATA">
<MEMBERS>
<MEMBER type="TIME" name="STime" minversion="200" maxversion="CURRENT_VERSION" comment="Time reading was taken"/>
<MEMBER type="uint16" name="Status" minversion="200" maxversion="CURRENT_VERSION" comment="DATA_NOT_AVAIL, DATA_COMPLETE, etc"/>
<MEMBER type="uint16" name="ExtStatus" minversion="200" maxversion="CURRENT_VERSION" comment="Extended status/error code"/>
<MEMBER type="uint16" name="Source" minversion="200" maxversion="CURRENT_VERSION" comment="Source of data "/>
<MEMBER type="uint8" name="Mode" minversion="200" maxversion="CURRENT_VERSION" comment="Mode of operation"/>
<MEMBER type="uint8" name="Method" minversion="200" maxversion="CURRENT_VERSION" comment="Method used"/>
<MEMBER type="OBJECT" name="Temperature" class="CNumDFloat" minversion="200" maxversion="CURRENT_VERSION" comment="Temperature {in deg K}"/>
</MEMBERS>
<ENUMERATION name="Status">
<!-- ====== -->
<!-- Status -->
<!-- ====== -->
<!-- Generic Status codes -->
<ENUM name="DATA_NOT_AVAIL" defaultvalue="0"/>
<ENUM name="DATA_COMPLETE"/>
<ENUM name="DATA_FAILURE"/>
<ENUM name="DATA_EXCEPTION"/>
<ENUM name="DATA_PROCESSING"/>
<!-- No Class Status codes -->
</ENUMERATION>
<ENUMERATION name="ExtStatus">
<!-- =============== -->
<!-- Extended Status -->
<!-- =============== -->
<!-- One Generic Extended Status codes -->
<ENUM name="NONE" defaultvalue="0"/>
<!-- Extended Status codes when Status is Data Failure or Data Exception -->
<!-- Class Status codes -->
<!-- Codes for SureTemp Plus -->
<ENUM name="FINAL_POSITION"/>
<ENUM name="FINAL_OVER_TEMP"/>
<ENUM name="FINAL_OVER_TEMP_POSITION"/>
<ENUM name="FINAL_UNDER_TEMP"/>
<ENUM name="FINAL_UNDER_TEMP_POSITION"/>
<ENUM name="MONITOR_POSITION"/>
<ENUM name="MONITOR_OVER_TEMP"/>
<ENUM name="MONITOR_OVER_TEMP_POSITION"/>
<ENUM name="MONITOR_UNDER_TEMP"/>
<ENUM name="MONITOR_UNDER_TEMP_POSITION"/>
<!--Braun communication errors-->
<ENUM name="CRC_FAILURE"/>
<ENUM name="COMM_FAILURE"/>
<ENUM name="FINAL_UNADJUSTED" comment="Technique Compensation not used."/>
<ENUM name="BUTTON_RANGE_ERROR" comment="The button index was not in range of the specified array size. Braun calculated temperature returned."/>
<ENUM name="AMB_RANGE_ERROR" comment="Ambient drop between button press sample and the last sample are too low or too high. Braun calculated temperature returned."/>
<ENUM name="ENTRY_RANGE_ERROR" comment="Entry temperature was either too low or too high. Braun calculated temperature returned."/>
<ENUM name="TT_RANGE_ERROR" comment="Target temperature was either too low or too high. Braun calculated temperature returned."/>
<ENUM name="TT_SLOPE_RANGE_ERROR" comment="Target temperature slope was either too low or too high. Braun calculated temperature returned."/>
<ENUM name="OUTPUT_RANGE_ERROR" comment="Technique Compensation temperature was either too high or too low. Braun calculated temperature returned."/>
<ENUM name="CAP_STABILITY_ERROR" comment="The difference between the max and min capacitance value is more than 2. Braun calculated temperature returned."/>
<ENUM name="CAP_ENTRY_ERROR" comment="The capacitance entry into the ear was not detected. Braun calculated temperature returned."/>
<ENUM name="PREMATURE_BUTTON_PRESS" comment="There was not enough pre-button samples. Braun calculated temperature returned."/>
<ENUM name="CALIBRATION" defaultvalue="23" comment="Temperature was taken in calibration mode"/>
<ENUM name="UNADJUSTED_NO_OFFSETS" defaultvalue="24" comment="Temperature reported without technique compensation or any offsets applied"/>
</ENUMERATION>
<ENUMERATION name="Source">
<!-- ====== -->
<!-- Source -->
<!-- ====== -->
<!-- Generic Source codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<!-- Class Source codes begin at 10 -->
<ENUM name="SURETEMP_SW" defaultvalue="10"/>
<ENUM name="SURETEMP"/>
<ENUM name="SURETEMP_PLUS"/>
<ENUM name="BRAUN_PRO4000"/>
<ENUM name="BRAUN_PRO6000"/>
</ENUMERATION>
<ENUMERATION name="Mode">
<!-- ==== -->
<!-- Mode -->
<!-- ==== -->
<!-- Generic Mode codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<!-- Class Mode codes begin at 10 -->
<ENUM name="ORAL" defaultvalue="10"/>
<ENUM name="RECTAL"/>
<ENUM name="PED_AXIL"/>
<ENUM name="CAL_KEY"/>
<ENUM name="ADULT_AXIL"/>
<ENUM name="TYMPANIC"/>
</ENUMERATION>
<ENUMERATION name="Method">
<!-- ====== -->
<!-- Method -->
<!-- ====== -->
<!-- Generic Method codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<ENUM name="MANUAL"/>
<ENUM name="DEVICE"/>
<ENUM name="REMOTE"/>
<!-- Class Method codes begin at 10 -->
<ENUM name="PREDICT" defaultvalue="10"/>
<ENUM name="MONITOR"/>
<ENUM name="IR"/>
<ENUM name="BRAUN_CALC" comment="Temperature calculated by the Braun IRT"/>
<ENUM name="TECHNIQUE_COMPENSATION_CALC" comment="Temperature calculated by the Technique Compensation algorithm"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpDATA" defaultvalue="1"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Platform SureTemp Objects-->
<!--Full Eng Temp Record-->
<DEFINITION class="CSTPTempDEng" abrv="CSTPDENG" version="101" family="FmTEMP" genus="GnDATA" species="SpENGDATA">
<MEMBERS>
<MEMBER type="float" name="temp" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="probe_temp" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="heater" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="reserved_1" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="method" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="algo" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="status" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="error" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint8" name="active" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="probe_type" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="resistance" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="ambient_temp" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="ptb_resistance" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="battery" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="probe_temp_min" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="probe_temp_max" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint8" name="complete" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint32" name="sample" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<ENUMERATION name="method">
<ENUM name="PREDICT" defaultvalue="0" comment="If the reading started in predict mode"/>
<ENUM name="MONITOR" defaultvalue="1" comment="If the reading started in monitor mode"/>
<ENUM name="CLINICAL" defaultvalue="2" comment="If the reading is being run in the clinical mode"/>
</ENUMERATION>
<ENUMERATION name="algo">
<ENUM name="NONE" defaultvalue="0" comment="No algorithm"/>
<ENUM name="ORAL_ALG" defaultvalue="1" comment="Oral algorithm"/>
<ENUM name="PED_AX_ALG" defaultvalue="2" comment="Pediatric axillary"/>
<ENUM name="ADULT_AX_ALG" defaultvalue="3" comment="Adult axillary"/>
<ENUM name="RECTAL_ALG" defaultvalue="4" comment="Rectal"/>
</ENUMERATION>
<ENUMERATION name="status">
<ENUM name="IDLE" defaultvalue="0" comment="Device is idle"/>
<ENUM name="NOT_READY" defaultvalue="1" comment="Device is not ready warming probe"/>
<ENUM name="READY" defaultvalue="2" comment="Device is ready"/>
<ENUM name="PREDICT" defaultvalue="3" comment="Device is in the predict state"/>
<ENUM name="PREDICT_DISPLAY" defaultvalue="4" comment="Display a predict state notification"/>
<ENUM name="PREDICT_POS" defaultvalue="5" comment="Display the predict position icon"/>
<ENUM name="FINAL" defaultvalue="6" comment="Final predict reading complete"/>
<ENUM name="FINAL_POS" defaultvalue="7" comment="Final predict reading complete and display position icon."/>
<ENUM name="FINAL_OVER_TEMP" defaultvalue="8" comment="Final predict reading is over temperature"/>
<ENUM name="FINAL_UNDER_TEMP" defaultvalue="9" comment="Final predict reading is under temperature"/>
<ENUM name="FINAL_OVER_TEMP_POS" defaultvalue="10" comment="Final predict reading is over temperature and display the position icon"/>
<ENUM name="FINAL_UNDER_TEMP_POS" defaultvalue="11" comment="Final predict reading is under temperature and display the position icon"/>
<ENUM name="NO_PREDICT" defaultvalue="12" comment="A predict reading could not be taken"/>
<ENUM name="ERROR" defaultvalue="13" comment="The device is in the error state"/>
<ENUM name="MONITOR" defaultvalue="14" comment="The device is in monitoring mode"/>
</ENUMERATION>
<ENUMERATION name="error">
<ENUM name="NO_ERROR" defaultvalue="0" comment="No Errors found"/>
<ENUM name="ERROR_ALG_PROBE_OVER_TEMP" defaultvalue="1" comment="Probe exceeded temp range"/>
<ENUM name="ERROR_ALG_EXCESSIVE_HTR_ENERGY" defaultvalue="2" comment="Excessive heater energy"/>
<ENUM name="ERROR_ALG_OVER_AMB_TEMP" defaultvalue="3" comment="Ambient temperature too high"/>
<ENUM name="ERROR_ALG_UNDER_AMB_TEMP" defaultvalue="4" comment="Ambient temperature too low"/>
<ENUM name="ERROR_ALG_NO_PROBE_TEMP_RISE" defaultvalue="5" comment="No probe temperature rise detected"/>
<ENUM name="ERROR_ALG_BAD_PROBE_GAIN" defaultvalue="6" comment="Invalid probe gain"/>
<ENUM name="ERROR_ALG_BAD_PROBE_RESP_VAL" defaultvalue="7" comment="Invalid probe response value"/>
<ENUM name="ERROR_HTR_ON_NOT_OFF" defaultvalue="8" comment="Heater is on when it should be off"/>
<ENUM name="ERROR_HTR_OFF_NOT_ON" defaultvalue="9" comment="Heater is off when it should be on"/>
<ENUM name="ERROR_HTR_VOLT_HIGH_Q" defaultvalue="10" comment="Heater Q is on and heater C is off but there is still an output voltage"/>
<ENUM name="ERROR_HTR_VOLT_Q_HIGH_IMP" defaultvalue="11" comment="Heater Q is tri-state with heater c enabled and there is still an output voltage"/>
<ENUM name="ERROR_HTR_VOLT_LOW" defaultvalue="12" comment="Turned Q and C on and heater voltage is too low"/>
<ENUM name="ERROR_HTR_FAILSAFE" defaultvalue="13" comment="Heater failsafe didn't trip"/>
<ENUM name="ERROR_AD_PULSE_LONG" defaultvalue="14" comment="Thermistor A/D pulse too long"/>
<ENUM name="ERROR_AD_PULSE_SHORT" defaultvalue="15" comment="Thermistor A/D pulse too short"/>
<ENUM name="ERROR_AD_RCAL_LONG" defaultvalue="16" comment="RCAL resistor pulse too long"/>
<ENUM name="ERROR_AD_RCAL_SHORT" defaultvalue="17" comment="RCAL resistor pulse too short"/>
<ENUM name="ERROR_AD_PTB_OVER" defaultvalue="18" comment="PTB resistor above 98.55F"/>
<ENUM name="ERROR_AD_PTB_UNDER" defaultvalue="19" comment="PTB resistor below 98.15F"/>
<ENUM name="ERROR_AD_TIMEOUT" defaultvalue="20" comment="A/D converstion timeout"/>
<ENUM name="ERROR_CFG_XFER" defaultvalue="21" comment="Failure to transfer data to EEPROM"/>
<ENUM name="ERROR_CFG_SET_CRC" defaultvalue="22" comment="Device Settings CRC failure"/>
<ENUM name="ERROR_CFG_PROBE_CRC" defaultvalue="23" comment="Probe CRC failure"/>
<ENUM name="ERROR_CFG_CAL_CRC" defaultvalue="24" comment="Devcie calibration CRC failure"/>
<ENUM name="ERROR_CFG_LOG_CRC" defaultvalue="25" comment="Error Log CRC failrue"/>
<ENUM name="ERROR_CFG_NO_PROBE" defaultvalue="26" comment="No probe detected"/>
<ENUM name="ERROR_CFG_UNIT_PROBE" defaultvalue="27" comment="Uninitialized probe"/>
<ENUM name="ERROR_CFG_ACK" defaultvalue="28" comment="I2C ACK failure"/>
<ENUM name="ERROR_CFG_INIT" defaultvalue="29" comment="Config initialization failure"/>
<ENUM name="ERROR_BAT_HIGH" defaultvalue="30" comment="Input voltage too high"/>
<ENUM name="ERROR_BAT_LOW" defaultvalue="31" comment="Input voltage too low"/>
<ENUM name="ERROR_BAD_VIBES" defaultvalue="32" comment="Power supply is compromised"/>
<ENUM name="ERROR_NO_PROBE_WELL" defaultvalue="33" comment="The probe well is not in the device"/>
<ENUM name="ERROR_POST_FAIL" defaultvalue="34" comment="A post failure was detected"/>
<ENUM name="ERROR_INTERNAL_FAULT" defaultvalue="35" comment="An internal fault was detected"/>
</ENUMERATION>
<ENUMERATION name="probe_type">
<ENUM name="NO_PROBE" defaultvalue="0" comment="No probe connected"/>
<ENUM name="ORAL" defaultvalue="1" comment="Oral probe connected"/>
<ENUM name="RECTAL" defaultvalue="2" comment="Rectal probe connected"/>
<ENUM name="CALKEY" defaultvalue="3" comment="Calibration key connected"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpENGDATA" defaultvalue="2"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Temp Status Record-->
<DEFINITION class="CSTPDStat" abrv="CSTPDST" version="102" family="FmTEMP" genus="GnDATA" species="SpSTATUS">
<MEMBERS>
<MEMBER type="uint16" name="state" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="error" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="hardwareState" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="finalTemp" minversion="100" maxversion="CURRENT_VERSION" comment="Temperature in degrees K"/>
<MEMBER type="float" name="probeTemp" minversion="100" maxversion="CURRENT_VERSION" comment="Temperature in degrees K"/>
<MEMBER type="uint16" name="method" minversion="100" maxversion="CURRENT_VERSION" comment="The temperature reading method"/>
<MEMBER type="uint16" name="probeType" minversion="100" maxversion="CURRENT_VERSION" comment="The temperature probe type"/>
<MEMBER type="uint16" name="algorithm" minversion="100" maxversion="CURRENT_VERSION" comment="The algorithm used"/>
<MEMBER type="uint16" name="battery" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<ENUMERATION name="state">
<ENUM name="IDLE" defaultvalue="0" comment="Device is idle"/>
<ENUM name="NOT_READY" defaultvalue="1" comment="Device is not ready warming probe"/>
<ENUM name="READY" defaultvalue="2" comment="Device is ready"/>
<ENUM name="PREDICT" defaultvalue="3" comment="Device is in the predict state"/>
<ENUM name="PREDICT_DISPLAY" defaultvalue="4" comment="Display a predict state notification"/>
<ENUM name="PREDICT_POS" defaultvalue="5" comment="Display the predict position icon"/>
<ENUM name="FINAL" defaultvalue="6" comment="Final predict reading complete"/>
<ENUM name="FINAL_POS" defaultvalue="7" comment="Final predict reading complete and display position icon."/>
<ENUM name="FINAL_OVER_TEMP" defaultvalue="8" comment="Final predict reading is over temperature"/>
<ENUM name="FINAL_UNDER_TEMP" defaultvalue="9" comment="Final predict reading is under temperature"/>
<ENUM name="FINAL_OVER_TEMP_POS" defaultvalue="10" comment="Final predict reading is over temperature and display the position icon"/>
<ENUM name="FINAL_UNDER_TEMP_POS" defaultvalue="11" comment="Final predict reading is under temperature and display the position icon"/>
<ENUM name="NO_PREDICT" defaultvalue="12" comment="A predict reading could not be taken"/>
<ENUM name="ERROR" defaultvalue="13" comment="The device is in the error state"/>
<ENUM name="MONITOR" defaultvalue="14" comment="The device is in monitoring mode"/>
</ENUMERATION>
<ENUMERATION name="error">
<ENUM name="NO_ERROR" defaultvalue="0" comment="No Errors found"/>
<ENUM name="ERROR_ALG_PROBE_OVER_TEMP" defaultvalue="1" comment="Probe exceeded temp range"/>
<ENUM name="ERROR_ALG_EXCESSIVE_HTR_ENERGY" defaultvalue="2" comment="Excessive heater energy"/>
<ENUM name="ERROR_ALG_OVER_AMB_TEMP" defaultvalue="3" comment="Ambient temperature too high"/>
<ENUM name="ERROR_ALG_UNDER_AMB_TEMP" defaultvalue="4" comment="Ambient temperature too low"/>
<ENUM name="ERROR_ALG_NO_PROBE_TEMP_RISE" defaultvalue="5" comment="No probe temperature rise detected"/>
<ENUM name="ERROR_ALG_BAD_PROBE_GAIN" defaultvalue="6" comment="Invalid probe gain"/>
<ENUM name="ERROR_ALG_BAD_PROBE_RESP_VAL" defaultvalue="7" comment="Invalid probe response value"/>
<ENUM name="ERROR_HTR_ON_NOT_OFF" defaultvalue="8" comment="Heater is on when it should be off"/>
<ENUM name="ERROR_HTR_OFF_NOT_ON" defaultvalue="9" comment="Heater is off when it should be on"/>
<ENUM name="ERROR_HTR_VOLT_HIGH_Q" defaultvalue="10" comment="Heater Q is on and heater C is off but there is still an output voltage"/>
<ENUM name="ERROR_HTR_VOLT_Q_HIGH_IMP" defaultvalue="11" comment="Heater Q is tri-state with heater c enabled and there is still an output voltage"/>
<ENUM name="ERROR_HTR_VOLT_LOW" defaultvalue="12" comment="Turned Q and C on and heater voltage is too low"/>
<ENUM name="ERROR_HTR_FAILSAFE" defaultvalue="13" comment="Heater failsafe didn't trip"/>
<ENUM name="ERROR_AD_PULSE_LONG" defaultvalue="14" comment="Thermistor A/D pulse too long"/>
<ENUM name="ERROR_AD_PULSE_SHORT" defaultvalue="15" comment="Thermistor A/D pulse too short"/>
<ENUM name="ERROR_AD_RCAL_LONG" defaultvalue="16" comment="RCAL resistor pulse too long"/>
<ENUM name="ERROR_AD_RCAL_SHORT" defaultvalue="17" comment="RCAL resistor pulse too short"/>
<ENUM name="ERROR_AD_PTB_OVER" defaultvalue="18" comment="PTB resistor above 98.55F"/>
<ENUM name="ERROR_AD_PTB_UNDER" defaultvalue="19" comment="PTB resistor below 98.15F"/>
<ENUM name="ERROR_AD_TIMEOUT" defaultvalue="20" comment="A/D converstion timeout"/>
<ENUM name="ERROR_CFG_XFER" defaultvalue="21" comment="Failure to transfer data to EEPROM"/>
<ENUM name="ERROR_CFG_SET_CRC" defaultvalue="22" comment="Device Settings CRC failure"/>
<ENUM name="ERROR_CFG_PROBE_CRC" defaultvalue="23" comment="Probe CRC failure"/>
<ENUM name="ERROR_CFG_CAL_CRC" defaultvalue="24" comment="Devcie calibration CRC failure"/>
<ENUM name="ERROR_CFG_LOG_CRC" defaultvalue="25" comment="Error Log CRC failrue"/>
<ENUM name="ERROR_CFG_NO_PROBE" defaultvalue="26" comment="No probe detected"/>
<ENUM name="ERROR_CFG_UNIT_PROBE" defaultvalue="27" comment="Uninitialized probe"/>
<ENUM name="ERROR_CFG_ACK" defaultvalue="28" comment="I2C ACK failure"/>
<ENUM name="ERROR_CFG_INIT" defaultvalue="29" comment="Config initialization failure"/>
<ENUM name="ERROR_BAT_HIGH" defaultvalue="30" comment="Input voltage too high"/>
<ENUM name="ERROR_BAT_LOW" defaultvalue="31" comment="Input voltage too low"/>
<ENUM name="ERROR_BAD_VIBES" defaultvalue="32" comment="Power supply is compromised"/>
<ENUM name="ERROR_NO_PROBE_WELL" defaultvalue="33" comment="The probe well is not in the device"/>
<ENUM name="ERROR_POST_FAIL" defaultvalue="34" comment="A post failure was detected"/>
<ENUM name="ERROR_INTERNAL_FAULT" defaultvalue="35" comment="An internal fault was detected"/>
</ENUMERATION>
<ENUMERATION name="hardwareState">
<ENUM name="probeConnected" defaultvalue="32768" comment="bit 15 - Probe Connected state"/>
<ENUM name="probePulled" defaultvalue="16384" comment="bit 14 - Probe pulled state"/>
<ENUM name="probeWellIn" defaultvalue="8192" comment="bit 13 - Probe well state"/>
<ENUM name="savingCal" defaultvalue="4096" comment="bit 12 - Saving the cal record to nonvolatile memory"/>
<ENUM name="savingSettings" defaultvalue="2048" comment="bit 11 - Saving the settings record to nonvolatile memory"/>
<ENUM name="takeReadingActive" defaultvalue="1024" comment="bit 10 - Take Reading Active"/>
</ENUMERATION>
<ENUMERATION name="method">
<ENUM name="PREDICT" defaultvalue="0" comment="If the reading started in predict mode"/>
<ENUM name="MONITOR" defaultvalue="1" comment="If the reading started in monitor mode"/>
<ENUM name="CLINICAL" defaultvalue="2" comment="If the reading is being run in the clinical mode"/>
</ENUMERATION>
<ENUMERATION name="probeType">
<ENUM name="NO_PROBE" defaultvalue="0" comment="No probe connected"/>
<ENUM name="ORAL" defaultvalue="1" comment="Oral probe connected"/>
<ENUM name="RECTAL" defaultvalue="2" comment="Rectal probe connected"/>
<ENUM name="CALKEY" defaultvalue="3" comment="Calibration key connected"/>
</ENUMERATION>
<ENUMERATION name="algorithm">
<ENUM name="NONE" defaultvalue="0" comment="No algorithm"/>
<ENUM name="ORAL_ALG" defaultvalue="1" comment="Oral algorithm"/>
<ENUM name="PED_AX_ALG" defaultvalue="2" comment="Pediatric axillary"/>
<ENUM name="ADULT_AX_ALG" defaultvalue="3" comment="Adult axillary"/>
<ENUM name="RECTAL_ALG" defaultvalue="4" comment="Rectal"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpSTATUS" defaultvalue="7"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnCONFIG-->
<!--==================================== -->
<DEFINITION class="CTempCStd" abrv="CTMPCSTD" version="101" family="FmTEMP" genus="GnCONFIG" species="SpSTANDARD">
<MEMBERS>
<MEMBER type="boolean" name="Enabled" minversion="100" maxversion="CURRENT_VERSION" comment="True if thermometer enabled"/>
<MEMBER type="uint16" name="InstalledModule" minversion="100" maxversion="CURRENT_VERSION" comment="Thermometer module"/>
<MEMBER type="uint16" name="DisplayUnits" minversion="100" maxversion="CURRENT_VERSION" comment="Thermerature display units"/>
<MEMBER type="uint16" name="Mode" minversion="100" maxversion="CURRENT_VERSION" comment="Mode of operation"/>
</MEMBERS>
<ENUMERATION name="InstalledModule">
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<ENUM name="SURETEMP_SW" defaultvalue="10"/>
<ENUM name="SURETEMP"/>
<ENUM name="SURETEMP_PLUS"/>
<ENUM name="BRAUN_PRO4000"/>
<ENUM name="BRAUN_PRO6000"/>
</ENUMERATION>
<ENUMERATION name="DisplayUnits">
<ENUM name="DEG_F" defaultvalue="0"/>
<ENUM name="DEG_C"/>
</ENUMERATION>
<ENUMERATION name="Mode">
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<ENUM name="ORAL" defaultvalue="10"/>
<ENUM name="ADULT_AXIL"/>
<ENUM name="PED_AXIL"/>
<ENUM name="LAST"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpSTANDARD" defaultvalue="0"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnCONFIG-->
<!--==================================== -->
<!--Temp Settings Record-->
<DEFINITION class="CSTPCStd" abrv="CSTPCSTD" version="100" family="FmTEMP" genus="GnCONFIG" species="SpDATA">
<MEMBERS>
<MEMBER type="uint16" name="clinicalPause" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint8" name="deviceType" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint8" name="dfltAlgorithm" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="ambientBias" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<ENUMERATION name="dfltAlgorithm">
<ENUM name="ORAL" defaultvalue="0" comment="Oral probe in mouth"/>
<ENUM name="PED_AXILLARY" defaultvalue="1" comment="Oral probe in pediatric axilla"/>
<ENUM name="ADULT_AXILLARY" defaultvalue="2" comment="Oral probe in adult axilla"/>
<ENUM name="LAST" defaultvalue="3" comment="Last algorithm used"/>
</ENUMERATION>
<ENUMERATION name="deviceType">
<ENUM name="PREDICT_DEVICE" defaultvalue="0" comment="Device is a predictive thermometer"/>
<ENUM name="MONITOR_DEVICE" defaultvalue="1" comment="Device is a monitoring thermometer"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpDATA" defaultvalue="1"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnCONFIG-->
<!--==================================== -->
<!--Temp Calibration Record-->
<DEFINITION class="CSTPCCal" abrv="CSTPCCAL" version="100" family="FmTEMP" genus="GnCONFIG" species="SpCALIBRATION">
<MEMBERS>
<MEMBER type="uint32" name="signature" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="TIME" name="dateTime" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="modConfig" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="Yp0" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="Rp0" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="RPTBEff" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="RCalEff" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="vRef" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpCALIBRATION" defaultvalue="2"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Temp Probe Record-->
<DEFINITION class="CSTPDProbe" abrv="CSTPDPROBE" version="101" family="FmTEMP" genus="GnDATA" species="SpPROBEDATA">
<MEMBERS>
<MEMBER type="int8" name="probeType" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int8" name="partNumber" size="8" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint32" name="lotCode" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int16" name="lotSeqNum" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int16" name="probeArrayLoc" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int16" name="testPassFailCode" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int32" name="calSignature" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="TIME" name="calDateTime" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="heaterGain" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="heaterTimeDelay" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="responses" size="15" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="thermCalM" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="thermCalB" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefA" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefB" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefC" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefD" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefE" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint32" name="probeCycleCount" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="deviceCount" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int8" name="lastDeviceSN" size="15" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<ENUMERATION name="probeType">
<ENUM name="ORAL" defaultvalue="0" comment="Oral probe"/>
<ENUM name="CALKEY" defaultvalue="1" comment="Calibration key"/>
<ENUM name="RECTAL" defaultvalue="2" comment="Rectal probe"/>
<ENUM name="NONE" defaultvalue="3" comment="No probe attached"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpPROBEDATA" defaultvalue="3"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<DEFINITION class="CSTPDHState" abrv="CSTPDHST" version="100" family="FmTEMP" genus="GnDATA" species="SpHARDWARESTATE">
<MEMBERS>
<MEMBER type="int16" name="hardware" minversion="100" maxversion="CURRENT_VERSION" comment="The index of the hardware to get/set the state of"/>
<MEMBER type="int16" name="state" minversion="100" maxversion="CURRENT_VERSION" comment="The state of the hardware"/>
</MEMBERS>
<ENUMERATION name="hardware">
<ENUM name="PROBE_WELL_SW" defaultvalue="0" comment="The switch that signals if the probe well is in place"/>
<ENUM name="PROBE_SW" comment="The switch that signals if the probe is in the well"/>
<ENUM name="PROBE_CONNECTED_SW" comment="The switch that signals if the probe is connected"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpHARDWARESTATE" defaultvalue="4"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Device Test Locks-->
<DEFINITION class="CSTPDLock" abrv="CSTPDLCK" version="100" family="FmTEMP" genus="GnDATA" species="SpLOCK">
<MEMBERS>
<MEMBER type="int16" name="lock" minversion="100" maxversion="CURRENT_VERSION" comment="The lock to get/set"/>
<MEMBER type="int8" name="state" minversion="100" maxversion="CURRENT_VERSION" comment="state The state of the lock"/>
</MEMBERS>
<ENUMERATION name="lock">
<ENUM name="DIGITAL_INPUT_LOCK" defaultvalue="0" comment="Locks the digital input status check"/>
<ENUM name="AD_CHANNEL" comment="Locks the AD channel"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpLOCK" defaultvalue="5"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--AD Raw Data-->
<DEFINITION class="CSTPDRData" abrv="CSTPDRDT" version="100" family="FmTEMP" genus="GnDATA" species="SpRAWDATA">
<MEMBERS>
<MEMBER type="uint32" name="thermistor" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts of the thermistor"/>
<MEMBER type="uint32" name="PTBResistor" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts for the PTB resistor"/>
<MEMBER type="uint32" name="rCalResistor" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts for the RCAL resistor"/>
<MEMBER type="uint32" name="vRef" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts for the battery voltage"/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpRAWDATA" defaultvalue="6"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--AD Sample Data-->
<DEFINITION class="CSTPDSample" abrv="CSTPDSMP" version="100" family="FmTEMP" genus="GnDATA" species="SpADSAMPLEDATA">
<MEMBERS>
<MEMBER type="uint8" name="channel" minversion="100" maxversion="CURRENT_VERSION" comment="The channel for this sample."/>
<MEMBER type="uint8" name="error" minversion="100" maxversion="CURRENT_VERSION" comment="The error for the sample 0 no error anything else an error has occured."/>
<MEMBER type="uint32" name="sample" minversion="100" maxversion="CURRENT_VERSION" comment="The sample number for this sample."/>
<MEMBER type="uint32" name="data" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts for the sample."/>
<MEMBER type="float" name="temperature" minversion="100" maxversion="CURRENT_VERSION" comment="The kelvin temperature for the sample."/>
<MEMBER type="float" name="resistance" minversion="100" maxversion="CURRENT_VERSION" comment="The resistance for the sample."/>
<MEMBER type="uint32" name="last_rcal" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts of the last RCal measurement."/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpADSAMPLEDATA" defaultvalue="8"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnPARAMETER-->
<!--==================================== -->
<!--Temp Reading -->
<DEFINITION class="CSTPPSelector" abrv="CSTPPSEL" version="200" family="FmTEMP" genus="GnPARAMETER" species="SpSELECTOR">
<MEMBERS>
<MEMBER type="uint32" name="Value" minversion="200" maxversion="CURRENT_VERSION" comment="Value is used to specify the desired option when needed or Species selected."/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpSELECTOR" defaultvalue="2" comment="Used to indicate that the Value is a selector"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnPARAMETER-->
<!--==================================== -->
<!--Temp Settings -->
<DEFINITION class="CTempPMsgArg" abrv="CTEMPPARG" version="102" family="FmTEMP" genus="GnPARAMETER" species="SpMSG_ARGUMENTS">
<MEMBERS>
<MEMBER type="uint32" name="IOParameterA" minversion="100" maxversion="CURRENT_VERSION" comment="Species ID of the device requested."/>
<MEMBER type="uint32" name="IOParameterB" minversion="100" maxversion="CURRENT_VERSION" comment="IO parameter for device message."/>
</MEMBERS>
<ENUMERATION name="ThermometerSettings">
<ENUM name="NONE" defaultvalue="0" comment="None specified"/>
<ENUM name="ANTI_THEFT_TIME" defaultvalue="1" comment="Numerical value (hrs) thermometer will be allowed to be not in its cradle before a theft alarm will sound (0=OFF; 1-24)."/>
<ENUM name="F_C_SELECTION_ENABLED" defaultvalue="2" comment="Enables the F/C button on the front of the thermometer. (0:Disabled; 1:Enabled [Default])"/>
<ENUM name="TIMER_ICON_ENABLED" defaultvalue="3" comment="Enable UI to show the Timer Icon. (0:Disabled; 1:Enabled [Default])"/>
<ENUM name="TECHNIQUE_COMPENSATION_ENABLED" defaultvalue="4" comment="Enable Technique Compensation algorithm processing. (0:Disabled; 1:Enabled [Default])"/>
<ENUM name="SELECT_F_C_DEFAULT_STATE" defaultvalue="5" comment="Determines which unit will be used when the thermometer is powered on. (0: Celsius [Default] 1:Fahrenheit)"/>
<ENUM name="F_C_HW_SWITCH_ENABLED" defaultvalue="6" comment="Enables the hardware switch used to select default unit (F or C). Located in battery compartment (0:Disabled; 1:Enabled [Default])"/>
<ENUM name="UNADJUSTED_MODE_ENABLED" defaultvalue="7" comment="Sets the UI for Unadjusted Mode (0:Disabled [Default] 1:Enabled)"/>
</ENUMERATION>
<ENUMERATION name="TempSource">
<ENUM name="NONE" defaultvalue="0" comment="None specified"/>
<ENUM name="DISPLAY" defaultvalue="1" comment="Retrieves the display temperature"/>
<ENUM name="BRAUN_CALC" defaultvalue="2" comment="Retrieves the Braun calculated temperature"/>
<ENUM name="TECHNIQUE_COMPENSATION_CALC" defaultvalue="3" comment="Retrives the technique compensation calculated temperature"/>
<ENUM name="ALL" defaultvalue="255" comment="Retrives all avaliable temperatures"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpMSG_ARGUMENTS" defaultvalue="0" comment="Indicates that the object is a message argument rather than a result."/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Touch Data-->
<DEFINITION class="CTempDTouch" abrv="CTMPDTOUCH" version="101" family="FmTEMP" genus="GnDATA" species="SpTOUCHDATA">
<MEMBERS>
<MEMBER type="uint16" name="ele0" minversion="100" maxversion="CURRENT_VERSION" comment="ELE0 Electrode Filtered Data LSB"/>
<MEMBER type="uint16" name="ele1" minversion="100" maxversion="CURRENT_VERSION" comment="ELE1 Electrode Filtered Data LSB"/>
<MEMBER type="uint16" name="ele2" minversion="100" maxversion="CURRENT_VERSION" comment="ELE2 Electrode Filtered Data LSB"/>
<MEMBER type="uint16" name="touchStatus" minversion="100" maxversion="CURRENT_VERSION" comment="ELE0 - ELE7 Touch Status"/>
<MEMBER type="uint8" name="ele0bv" minversion="100" maxversion="CURRENT_VERSION" comment="ELE0 Baseline Value"/>
<MEMBER type="uint8" name="ele1bv" minversion="100" maxversion="CURRENT_VERSION" comment="ELE1 Baseline Value"/>
<MEMBER type="uint8" name="ele2bv" minversion="100" maxversion="CURRENT_VERSION" comment="ELE2 Baseline Value"/>
<MEMBER type="uint16" name="hardwareStateIR" minversion="100" maxversion="CURRENT_VERSION" format="BITMASK" comment="Indication for TAKE_READING_ACTIVE"/>
<MEMBER type="uint32" name="sampleCount" minversion="101" maxversion="CURRENT_VERSION" comment="Sample count for the object. Increment by 1 on each packet. Reset on power up"/>
</MEMBERS>
<ENUMERATION name="hardwareStateIR">
<ENUM name="TAKE_READING_ACTIVE" defaultvalue="0" comment="bit 0 - Take Reading Active"/>
<ENUM name="PROBE_COVER_ON" defaultvalue="1" comment="bit 1 - Probe Cover On"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpTOUCHDATA" defaultvalue="9"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Therm Data-->
<DEFINITION class="CTempDTherm" abrv="CTMPDTHERM" version="106" family="FmTEMP" genus="GnDATA" species="SpTHERMDATA">
<MEMBERS>
<MEMBER type="float" name="ambient" minversion="100" maxversion="CURRENT_VERSION" comment="Ambient Temperature, Fahrenheit"/>
<MEMBER type="int32" name="ambient_count" minversion="100" maxversion="CURRENT_VERSION" comment="Ambient Temperature Count, reset on power up"/>
<MEMBER type="float" name="thermopile" minversion="100" maxversion="CURRENT_VERSION" comment="Thermopile Temperature, Fahrenheit"/>
<MEMBER type="int32" name="thermopile_count" minversion="100" maxversion="CURRENT_VERSION" comment="Thermopile Temperature Count"/>
<MEMBER type="uint32" name="sampleCount" minversion="101" maxversion="CURRENT_VERSION" comment="Sample count for the object. Increment by 1 on each packet. Reset on power up."/>
<MEMBER type="int16" name="heaterPWM" minversion="102" maxversion="CURRENT_VERSION" comment="Heater PWM count for the object, Range: 0-1000"/>
<MEMBER type="int16" name="heaterState" minversion="103" maxversion="CURRENT_VERSION" comment="Shows heater state"/>
<MEMBER type="int16" name="heaterError" minversion="103" maxversion="CURRENT_VERSION" comment="Shows errors with heater. If error occurs, this value is 1. If no error occurs, this value is 0."/>
<MEMBER type="float" name="braun_ambient" minversion="104" maxversion="CURRENT_VERSION" comment="Ambient temperature of Braun circuitry, Fahrenheit"/>
<MEMBER type="float" name="TCValue" minversion="105" maxversion="CURRENT_VERSION" comment="Represents the technique compensated value output from the device."/>
<MEMBER type="uint8" name="pre_num" minversion="106" maxversion="CURRENT_VERSION" comment="Represents the number of samples before the button press"/>
<MEMBER type="uint8" name="post_num" minversion="106" maxversion="CURRENT_VERSION" comment="Reperesents the number of samples after the button press"/>
</MEMBERS>
<ENUMERATION name="heaterState">
<ENUM name="IDLE" defaultvalue="0" comment="Heater is not on"/>
<ENUM name="HEATER_TEST" defaultvalue="1" comment="Runs failsafes to make sure heater is operational"/>
<ENUM name="HEATER_ON" defaultvalue="2" comment="Heater is turned on"/>
<ENUM name="READY" defaultvalue="3" comment="Heater is ready to be turned off"/>
<ENUM name="ERROR" defaultvalue="4" comment="Error detected with heater, turns heater off"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpTHERMDATA" defaultvalue="10"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATAEXT-->
<!--==================================== -->
<DEFINITION class="CTempDExtStd" abrv="CTEMPDXTSTD" version="200" family="FmTEMP" genus="GnDATAEXT" species="SpSTANDARD">
<MEMBERS>
<MEMBER name="Container" class="ANY_CLASS" comment="Contains a list of CTempDData objects." maxversion="CURRENT_VERSION" minversion="200" type="OBJECT" size="UNBOUNDED"/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpSTANDARD" defaultvalue="0"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--Messages -->
<!-- ====================================-->
<MESSAGES>
<MSG type="Request" name="GET_TEMP" comment="May contain and optional selector object, CSTPPSelector to indicate what GnDATA object to retrieve (SpeciesSelector: SpSTANDARD = CTempDStd | SpDATA = CTempDData). With no selector, the CTempDStd is returned."/>
<MSG type="Request" name="GET_CONFIG"/>
<MSG type="Response" name="PUT_TEMP" comment="May contain a CTempDStd or CTempDData"/>
<MSG type="Response" name="PUT_CONFIG"/>
<MSG type="Command" name="WRITE_CONFIG"/>
<MSG type="Status" name="REPORT_TEMPERATURE"/>
<MSG type="Request" name="GET_ENG_STATUS"/>
<MSG type="Response" name="PUT_ENG_STATUS" comment="Requires a CSTPTempDEng object"/>
<MSG type="Stream" name="REPORT_ENG_STATUS" comment="Requires a CSTPTempDEng object"/>
<MSG type="Command" name="MSG_PUSH_ENABLE" comment="Requires a CSTPPSelector"/>
<MSG type="Command" name="MSG_SET_ALG" comment="Requires a CSTPPSelector"/>
<MSG type="Command" name="MSG_SET_MODE" comment="Requires a CSTPPSelector"/>
<!--Platform Temp Messages-->
<!--Temp Status-->
<MSG type="Request" name="STATUS"/>
<MSG type="Response" name="PUT_STATUS" comment="Requires a CSTPDStat"/>
<MSG type="Stream" name="REPORT_STATUS" comment="Requires a CSTPDStat"/>
<MSG type="Command" name="RESET_DEVICE"/>
<!--Probe Record-->
<MSG type="Request" name="GET_PROBE_INFO"/>
<MSG type="Response" name="PUT_PROBE_INFO" comment="Requires a CSTPDProbe object"/>
<!--Temp Calibration-->
<MSG type="Request" name="GET_CALIBRATION" comment=""/>
<MSG type="Response" name="PUT_CALIBRATION" comment="Requires CSTPCCal."/>
<MSG type="Command" name="SET_CALIBRATION" comment="Requires CSTPCCal."/>
<MSG type="Command" name="SAVE_CALIBRATION" comment=""/>
<MSG type="Command" name="LOAD_CALIBRATION" comment=""/>
<MSG type="Command" name="RESTORE_DFLT_CALIBRATION" comment=""/>
<!--Temp Settings-->
<MSG type="Request" name="GET_SETTINGS"/>
<MSG type="Response" name="PUT_SETTINGS" comment="Requires CSTPCStd"/>
<MSG type="Command" name="SET_SETTINGS" comment="Requires CSTPCStd"/>
<MSG type="Command" name="SAVE_SETTINGS" />
<MSG type="Command" name="LOAD_SETTINGS"/>
<MSG type="Command" name="RESTORE_DFLT_SETTINGS"/>
<!--Hardware State-->
<MSG type="Request" name="GET_HARDWARE_STATE" comment ="Requires a CSTPPSelector"/>
<MSG type="Response" name="PUT_HARDWARE_STATE" comment="Requires a CSTPDHState"/>
<MSG type="Command" name="SET_HARDWARE_STATE" comment="Requires a CSTPDHState"/>
<!--Device Test Locks-->
<MSG type="Request" name="GET_TEST_LOCK" comment ="Requires a CSTPPSelector"/>
<MSG type="Response" name="PUT_TEST_LOCK" comment="Requires a CSTPDLock"/>
<MSG type="Command" name="SET_TEST_LOCK" comment="Requires a CSTPDLock"/>
<!--AD Raw Data-->
<MSG type="Request" name="GET_RAW_DATA"/>
<MSG type="Response" name="PUT_RAW_DATA" comment="Requires a CSTPDRData"/>
<!--AD Sample Data-->
<MSG type="Request" name="GET_SAMPLE"/>
<MSG type="Response" name="PUT_SAMPLE" comment="Requires a CSTPDSample"/>
<MSG type="Stream" name="REPORT_SAMPLE" comment="Requires a CSTPDSample"/>
<!--Touch Data-->
<MSG type="Request" name="GET_TOUCH" comment=""/>
<MSG type="Response" name="PUT_TOUCH" comment=""/>
<MSG type="Stream" name="REPORT_TOUCH" comment="Requires a CTempDTouch"/>
<!--Therm Data-->
<MSG type="Request" name="GET_THERM" comment=""/>
<MSG type="Response" name="PUT_THERM" comment=""/>
<MSG type="Command" name="SET_THERM" comment=""/>
<MSG type="Stream" name="REPORT_THERM" comment="Requires a CTempDTherm"/>
<MSG type="Command" name="START_ACQUIRE" comment="Command to start sending TOUCH or THERM data."/>
<MSG type="Command" name="STOP_ACQUIRE" comment="Command to stop sending TOUCH or THERM data."/>
<!-- Temp Settings -->
<MSG type="Request" name="GET_THERMOMETER_SETTINGS" comment="Requires a CTempPMsgArg"/>
<MSG type="Response" name="PUT_THERMOMETER_SETTINGS" comment="Requires a CTempPMsgArg"/>
<MSG type="Command" name="WRITE_THERMOMETER_SETTINGS" comment="Requires a CTempPMsgArg"/>
</MESSAGES>
</FAMILY>

453
Cargo.lock generated Normal file
View file

@ -0,0 +1,453 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "RustXMLParseTest"
version = "0.1.0"
dependencies = [
"clap",
"enum_index",
"enum_index_derive",
"lazy_static",
"phf",
"roxmltree",
"strum",
]
[[package]]
name = "anstream"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd"
[[package]]
name = "anstyle-parse"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
dependencies = [
"anstyle",
"windows-sys",
]
[[package]]
name = "bitflags"
version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
[[package]]
name = "cc"
version = "1.0.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0"
dependencies = [
"libc",
]
[[package]]
name = "clap"
version = "4.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d"
dependencies = [
"clap_builder",
"clap_derive",
"once_cell",
]
[[package]]
name = "clap_builder"
version = "4.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050"
dependencies = [
"heck",
"proc-macro2",
"quote 1.0.32",
"syn 2.0.28",
]
[[package]]
name = "clap_lex"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
[[package]]
name = "colorchoice"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
[[package]]
name = "enum_index"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5532bdea562e7be83060c36185eecccba82fe16729d2eaad2891d65417656dd"
[[package]]
name = "enum_index_derive"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ab22c8085548bf06190113dca556e149ecdbb05ae5b972a2b9899f26b944ee4"
dependencies = [
"quote 0.3.15",
"syn 0.11.11",
]
[[package]]
name = "errno"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f"
dependencies = [
"errno-dragonfly",
"libc",
"windows-sys",
]
[[package]]
name = "errno-dragonfly"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
[[package]]
name = "is-terminal"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
dependencies = [
"hermit-abi",
"rustix",
"windows-sys",
]
[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
[[package]]
name = "linux-raw-sys"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503"
[[package]]
name = "once_cell"
version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "phf"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
dependencies = [
"phf_macros",
"phf_shared",
]
[[package]]
name = "phf_generator"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
dependencies = [
"phf_shared",
"rand",
]
[[package]]
name = "phf_macros"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
dependencies = [
"phf_generator",
"phf_shared",
"proc-macro2",
"quote 1.0.32",
"syn 2.0.28",
]
[[package]]
name = "phf_shared"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
dependencies = [
"siphasher",
]
[[package]]
name = "proc-macro2"
version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
[[package]]
name = "quote"
version = "1.0.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
[[package]]
name = "roxmltree"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8f595a457b6b8c6cda66a48503e92ee8d19342f905948f29c383200ec9eb1d8"
dependencies = [
"xmlparser",
]
[[package]]
name = "rustix"
version = "0.38.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ee020b1716f0a80e2ace9b03441a749e402e86712f15f16fe8a8f75afac732f"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
"windows-sys",
]
[[package]]
name = "siphasher"
version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "strum"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
[[package]]
name = "syn"
version = "0.11.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
dependencies = [
"quote 0.3.15",
"synom",
"unicode-xid",
]
[[package]]
name = "syn"
version = "2.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567"
dependencies = [
"proc-macro2",
"quote 1.0.32",
"unicode-ident",
]
[[package]]
name = "synom"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
dependencies = [
"unicode-xid",
]
[[package]]
name = "unicode-ident"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
[[package]]
name = "unicode-xid"
version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
[[package]]
name = "utf8parse"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "windows-sys"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.48.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
[[package]]
name = "windows_i686_gnu"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
[[package]]
name = "windows_i686_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
[[package]]
name = "xmlparser"
version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"

15
Cargo.toml Normal file
View file

@ -0,0 +1,15 @@
[package]
name = "RustXMLParseTest"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
roxmltree = "0.18.0"
strum = "0.25.0"
enum_index = "0.2.0"
enum_index_derive = "0.2.0"
phf = { version = "0.11.2", features = ["macros"] }
lazy_static = "1.4.0"
clap = { version = "4.3.19", features = ["derive"] }

831
src/CTempFamily.xml Normal file
View file

@ -0,0 +1,831 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<FAMILY name="FmTEMP">
<!--====================================-->
<!--Species Key Reference -->
<!-- ====================================-->
<SPECIES_KEY>
<GENUS name="GnDATA">
<SPECIES name="SpSTANDARD" defaultvalue="0"/>
<SPECIES name="SpDATA" defaultvalue="1"/>
<SPECIES name="SpENGDATA" defaultvalue="2"/>
<SPECIES name="SpPROBEDATA" defaultvalue="3"/>
<SPECIES name="SpHARDWARESTATE" defaultvalue="4"/>
<SPECIES name="SpLOCK" defaultvalue="5"/>
<SPECIES name="SpRAWDATA" defaultvalue="6"/>
<SPECIES name="SpSTATUS" defaultvalue="7"/>
<SPECIES name="SpADSAMPLEDATA" defaultvalue="8"/>
<SPECIES name="SpTOUCHDATA" defaultvalue="9"/>
<SPECIES name="SpTHERMDATA" defaultvalue="10"/>
</GENUS>
<GENUS name="GnCONFIG">
<SPECIES name="SpSTANDARD" defaultvalue="0"/>
<SPECIES name="SpDATA" defaultvalue="1"/>
<SPECIES name="SpCALIBRATION" defaultvalue="2"/>
</GENUS>
<GENUS name="GnPARAMETER">
<SPECIES name="SpMSG_ARGUMENTS" defaultvalue="0" />
<SPECIES name="SpDATA" defaultvalue="1"/>
<SPECIES name="SpSELECTOR" defaultvalue="2" comment="Used to indicate that the Value is a selector"/>
</GENUS>
</SPECIES_KEY>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<DEFINITION class="CTempDStd" abrv="CTMPDSTD" version="104" family="FmTEMP" genus="GnDATA" species="SpSTANDARD">
<MEMBERS>
<!-- Version 001 -->
<MEMBER type="TIME" name="STime" minversion="100" maxversion="CURRENT_VERSION" comment="Time reading was taken"/>
<MEMBER type="uint16" name="Status" minversion="100" maxversion="CURRENT_VERSION" comment="DATA_NOT_AVAIL, DATA_COMPLETE, etc"/>
<MEMBER type="uint16" name="ExtStatus" minversion="100" maxversion="CURRENT_VERSION" comment="Extended status/error code"/>
<MEMBER type="uint16" name="Source" minversion="100" maxversion="CURRENT_VERSION" comment="Source of data "/>
<MEMBER type="uint8" name="Mode" minversion="100" maxversion="CURRENT_VERSION" comment="Mode of operation"/>
<MEMBER type="uint8" name="Method" minversion="100" maxversion="CURRENT_VERSION" comment="Method used"/>
<MEMBER type="float" name="Temperature" minversion="100" maxversion="CURRENT_VERSION" comment="Temperature {in deg K}"/>
</MEMBERS>
<ENUMERATION name="Status">
<!-- ====== -->
<!-- Status -->
<!-- ====== -->
<!-- Generic Status codes -->
<ENUM name="DATA_NOT_AVAIL" defaultvalue="0"/>
<ENUM name="DATA_COMPLETE"/>
<ENUM name="DATA_FAILURE"/>
<ENUM name="DATA_EXCEPTION"/>
<ENUM name="DATA_PROCESSING"/>
<!-- No Class Status codes -->
</ENUMERATION>
<ENUMERATION name="ExtStatus">
<!-- =============== -->
<!-- Extended Status -->
<!-- =============== -->
<!-- One Generic Extended Status codes -->
<ENUM name="NONE" defaultvalue="0"/>
<!-- Extended Status codes when Status is Data Failure or Data Exception -->
<!-- Class Status codes -->
<!-- Codes for SureTemp Plus -->
<ENUM name="FINAL_POSITION"/>
<ENUM name="FINAL_OVER_TEMP"/>
<ENUM name="FINAL_OVER_TEMP_POSITION"/>
<ENUM name="FINAL_UNDER_TEMP"/>
<ENUM name="FINAL_UNDER_TEMP_POSITION"/>
<ENUM name="MONITOR_POSITION"/>
<ENUM name="MONITOR_OVER_TEMP"/>
<ENUM name="MONITOR_OVER_TEMP_POSITION"/>
<ENUM name="MONITOR_UNDER_TEMP"/>
<ENUM name="MONITOR_UNDER_TEMP_POSITION"/>
<!--Braun communication errors-->
<ENUM name="CRC_FAILURE"/>
<ENUM name="COMM_FAILURE"/>
<ENUM name="FINAL_UNADJUSTED"/>
<ENUM name="BUTTON_RANGE_ERROR" comment="The button index was not in range of the specified array size"/>
<ENUM name="AMB_RANGE_ERROR" comment="Ambient drop between button press sample and the last sample are too low or too high"/>
<ENUM name="ENTRY_RANGE_ERROR" comment="Entry temperature was either too low or too high"/>
<ENUM name="TT_RANGE_ERROR" comment="Target temperature was either too low or too high"/>
<ENUM name="TT_SLOPE_RANGE_ERROR" comment="Target temperature slope was either too low or too high"/>
<ENUM name="OUTPUT_RANGE_ERROR" comment="Technique Compensation temperature was either too high or too low"/>
<ENUM name="CAP_STABILITY_ERROR" comment="The difference between the max and min capacitance value is more than 2"/>
<ENUM name="CAP_ENTRY_ERROR" comment="The capacitance entry into the ear was not detected"/>
<ENUM name="PREMATURE_BUTTON_PRESS" comment="There was not enough pre-button samples"/>
<ENUM name="CALIBRATION" defaultvalue="23" comment="Temperature was taken in calibration mode"/>
<ENUM name="UNADJUSTED_NO_OFFSETS" defaultvalue="24" comment="Temperature reported without technique compensation or any offsets applied"/>
</ENUMERATION>
<ENUMERATION name="Source">
<!-- ====== -->
<!-- Source -->
<!-- ====== -->
<!-- Generic Source codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<!-- Class Source codes begin at 10 -->
<ENUM name="SURETEMP_SW" defaultvalue="10"/>
<ENUM name="SURETEMP"/>
<ENUM name="SURETEMP_PLUS"/>
<ENUM name="BRAUN_PRO4000"/>
<ENUM name="BRAUN_PRO6000"/>
</ENUMERATION>
<ENUMERATION name="Mode">
<!-- ==== -->
<!-- Mode -->
<!-- ==== -->
<!-- Generic Mode codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<!-- Class Mode codes begin at 10 -->
<ENUM name="ORAL" defaultvalue="10"/>
<ENUM name="RECTAL"/>
<ENUM name="PED_AXIL"/>
<ENUM name="CAL_KEY"/>
<ENUM name="ADULT_AXIL"/>
<ENUM name="TYMPANIC"/>
</ENUMERATION>
<ENUMERATION name="Method">
<!-- ====== -->
<!-- Method -->
<!-- ====== -->
<!-- Generic Method codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<ENUM name="MANUAL"/>
<ENUM name="DEVICE"/>
<ENUM name="REMOTE"/>
<!-- Class Method codes begin at 10 -->
<ENUM name="PREDICT" defaultvalue="10"/>
<ENUM name="MONITOR"/>
<ENUM name="IR"/>
<ENUM name="BRAUN_CALC" comment="Temperature calculated by the Braun IRT"/>
<ENUM name="TECHNIQUE_COMPENSATION_CALC" comment="Temperature calculated by the Technique Compensation algorithm"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpSTANDARD"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<DEFINITION class="CTempDData" abrv="CTMPDDTA" version="205" family="FmTEMP" genus="GnDATA" species="SpDATA">
<MEMBERS>
<MEMBER type="TIME" name="STime" minversion="200" maxversion="CURRENT_VERSION" comment="Time reading was taken"/>
<MEMBER type="uint16" name="Status" minversion="200" maxversion="CURRENT_VERSION" comment="DATA_NOT_AVAIL, DATA_COMPLETE, etc"/>
<MEMBER type="uint16" name="ExtStatus" minversion="200" maxversion="CURRENT_VERSION" comment="Extended status/error code"/>
<MEMBER type="uint16" name="Source" minversion="200" maxversion="CURRENT_VERSION" comment="Source of data "/>
<MEMBER type="uint8" name="Mode" minversion="200" maxversion="CURRENT_VERSION" comment="Mode of operation"/>
<MEMBER type="uint8" name="Method" minversion="200" maxversion="CURRENT_VERSION" comment="Method used"/>
<MEMBER type="OBJECT" name="Temperature" class="CNumDFloat" minversion="200" maxversion="CURRENT_VERSION" comment="Temperature {in deg K}"/>
</MEMBERS>
<ENUMERATION name="Status">
<!-- ====== -->
<!-- Status -->
<!-- ====== -->
<!-- Generic Status codes -->
<ENUM name="DATA_NOT_AVAIL" defaultvalue="0"/>
<ENUM name="DATA_COMPLETE"/>
<ENUM name="DATA_FAILURE"/>
<ENUM name="DATA_EXCEPTION"/>
<ENUM name="DATA_PROCESSING"/>
<!-- No Class Status codes -->
</ENUMERATION>
<ENUMERATION name="ExtStatus">
<!-- =============== -->
<!-- Extended Status -->
<!-- =============== -->
<!-- One Generic Extended Status codes -->
<ENUM name="NONE" defaultvalue="0"/>
<!-- Extended Status codes when Status is Data Failure or Data Exception -->
<!-- Class Status codes -->
<!-- Codes for SureTemp Plus -->
<ENUM name="FINAL_POSITION"/>
<ENUM name="FINAL_OVER_TEMP"/>
<ENUM name="FINAL_OVER_TEMP_POSITION"/>
<ENUM name="FINAL_UNDER_TEMP"/>
<ENUM name="FINAL_UNDER_TEMP_POSITION"/>
<ENUM name="MONITOR_POSITION"/>
<ENUM name="MONITOR_OVER_TEMP"/>
<ENUM name="MONITOR_OVER_TEMP_POSITION"/>
<ENUM name="MONITOR_UNDER_TEMP"/>
<ENUM name="MONITOR_UNDER_TEMP_POSITION"/>
<!--Braun communication errors-->
<ENUM name="CRC_FAILURE"/>
<ENUM name="COMM_FAILURE"/>
<ENUM name="FINAL_UNADJUSTED" comment="Technique Compensation not used."/>
<ENUM name="BUTTON_RANGE_ERROR" comment="The button index was not in range of the specified array size. Braun calculated temperature returned."/>
<ENUM name="AMB_RANGE_ERROR" comment="Ambient drop between button press sample and the last sample are too low or too high. Braun calculated temperature returned."/>
<ENUM name="ENTRY_RANGE_ERROR" comment="Entry temperature was either too low or too high. Braun calculated temperature returned."/>
<ENUM name="TT_RANGE_ERROR" comment="Target temperature was either too low or too high. Braun calculated temperature returned."/>
<ENUM name="TT_SLOPE_RANGE_ERROR" comment="Target temperature slope was either too low or too high. Braun calculated temperature returned."/>
<ENUM name="OUTPUT_RANGE_ERROR" comment="Technique Compensation temperature was either too high or too low. Braun calculated temperature returned."/>
<ENUM name="CAP_STABILITY_ERROR" comment="The difference between the max and min capacitance value is more than 2. Braun calculated temperature returned."/>
<ENUM name="CAP_ENTRY_ERROR" comment="The capacitance entry into the ear was not detected. Braun calculated temperature returned."/>
<ENUM name="PREMATURE_BUTTON_PRESS" comment="There was not enough pre-button samples. Braun calculated temperature returned."/>
<ENUM name="CALIBRATION" defaultvalue="23" comment="Temperature was taken in calibration mode"/>
<ENUM name="UNADJUSTED_NO_OFFSETS" defaultvalue="24" comment="Temperature reported without technique compensation or any offsets applied"/>
</ENUMERATION>
<ENUMERATION name="Source">
<!-- ====== -->
<!-- Source -->
<!-- ====== -->
<!-- Generic Source codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<!-- Class Source codes begin at 10 -->
<ENUM name="SURETEMP_SW" defaultvalue="10"/>
<ENUM name="SURETEMP"/>
<ENUM name="SURETEMP_PLUS"/>
<ENUM name="BRAUN_PRO4000"/>
<ENUM name="BRAUN_PRO6000"/>
</ENUMERATION>
<ENUMERATION name="Mode">
<!-- ==== -->
<!-- Mode -->
<!-- ==== -->
<!-- Generic Mode codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<!-- Class Mode codes begin at 10 -->
<ENUM name="ORAL" defaultvalue="10"/>
<ENUM name="RECTAL"/>
<ENUM name="PED_AXIL"/>
<ENUM name="CAL_KEY"/>
<ENUM name="ADULT_AXIL"/>
<ENUM name="TYMPANIC"/>
</ENUMERATION>
<ENUMERATION name="Method">
<!-- ====== -->
<!-- Method -->
<!-- ====== -->
<!-- Generic Method codes -->
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<ENUM name="MANUAL"/>
<ENUM name="DEVICE"/>
<ENUM name="REMOTE"/>
<!-- Class Method codes begin at 10 -->
<ENUM name="PREDICT" defaultvalue="10"/>
<ENUM name="MONITOR"/>
<ENUM name="IR"/>
<ENUM name="BRAUN_CALC" comment="Temperature calculated by the Braun IRT"/>
<ENUM name="TECHNIQUE_COMPENSATION_CALC" comment="Temperature calculated by the Technique Compensation algorithm"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpDATA" defaultvalue="1"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Platform SureTemp Objects-->
<!--Full Eng Temp Record-->
<DEFINITION class="CSTPTempDEng" abrv="CSTPDENG" version="101" family="FmTEMP" genus="GnDATA" species="SpENGDATA">
<MEMBERS>
<MEMBER type="float" name="temp" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="probe_temp" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="heater" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="reserved_1" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="method" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="algo" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="status" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="error" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint8" name="active" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="probe_type" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="resistance" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="ambient_temp" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="ptb_resistance" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="battery" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="probe_temp_min" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="probe_temp_max" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint8" name="complete" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint32" name="sample" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<ENUMERATION name="method">
<ENUM name="PREDICT" defaultvalue="0" comment="If the reading started in predict mode"/>
<ENUM name="MONITOR" defaultvalue="1" comment="If the reading started in monitor mode"/>
<ENUM name="CLINICAL" defaultvalue="2" comment="If the reading is being run in the clinical mode"/>
</ENUMERATION>
<ENUMERATION name="algo">
<ENUM name="NONE" defaultvalue="0" comment="No algorithm"/>
<ENUM name="ORAL_ALG" defaultvalue="1" comment="Oral algorithm"/>
<ENUM name="PED_AX_ALG" defaultvalue="2" comment="Pediatric axillary"/>
<ENUM name="ADULT_AX_ALG" defaultvalue="3" comment="Adult axillary"/>
<ENUM name="RECTAL_ALG" defaultvalue="4" comment="Rectal"/>
</ENUMERATION>
<ENUMERATION name="status">
<ENUM name="IDLE" defaultvalue="0" comment="Device is idle"/>
<ENUM name="NOT_READY" defaultvalue="1" comment="Device is not ready warming probe"/>
<ENUM name="READY" defaultvalue="2" comment="Device is ready"/>
<ENUM name="PREDICT" defaultvalue="3" comment="Device is in the predict state"/>
<ENUM name="PREDICT_DISPLAY" defaultvalue="4" comment="Display a predict state notification"/>
<ENUM name="PREDICT_POS" defaultvalue="5" comment="Display the predict position icon"/>
<ENUM name="FINAL" defaultvalue="6" comment="Final predict reading complete"/>
<ENUM name="FINAL_POS" defaultvalue="7" comment="Final predict reading complete and display position icon."/>
<ENUM name="FINAL_OVER_TEMP" defaultvalue="8" comment="Final predict reading is over temperature"/>
<ENUM name="FINAL_UNDER_TEMP" defaultvalue="9" comment="Final predict reading is under temperature"/>
<ENUM name="FINAL_OVER_TEMP_POS" defaultvalue="10" comment="Final predict reading is over temperature and display the position icon"/>
<ENUM name="FINAL_UNDER_TEMP_POS" defaultvalue="11" comment="Final predict reading is under temperature and display the position icon"/>
<ENUM name="NO_PREDICT" defaultvalue="12" comment="A predict reading could not be taken"/>
<ENUM name="ERROR" defaultvalue="13" comment="The device is in the error state"/>
<ENUM name="MONITOR" defaultvalue="14" comment="The device is in monitoring mode"/>
</ENUMERATION>
<ENUMERATION name="error">
<ENUM name="NO_ERROR" defaultvalue="0" comment="No Errors found"/>
<ENUM name="ERROR_ALG_PROBE_OVER_TEMP" defaultvalue="1" comment="Probe exceeded temp range"/>
<ENUM name="ERROR_ALG_EXCESSIVE_HTR_ENERGY" defaultvalue="2" comment="Excessive heater energy"/>
<ENUM name="ERROR_ALG_OVER_AMB_TEMP" defaultvalue="3" comment="Ambient temperature too high"/>
<ENUM name="ERROR_ALG_UNDER_AMB_TEMP" defaultvalue="4" comment="Ambient temperature too low"/>
<ENUM name="ERROR_ALG_NO_PROBE_TEMP_RISE" defaultvalue="5" comment="No probe temperature rise detected"/>
<ENUM name="ERROR_ALG_BAD_PROBE_GAIN" defaultvalue="6" comment="Invalid probe gain"/>
<ENUM name="ERROR_ALG_BAD_PROBE_RESP_VAL" defaultvalue="7" comment="Invalid probe response value"/>
<ENUM name="ERROR_HTR_ON_NOT_OFF" defaultvalue="8" comment="Heater is on when it should be off"/>
<ENUM name="ERROR_HTR_OFF_NOT_ON" defaultvalue="9" comment="Heater is off when it should be on"/>
<ENUM name="ERROR_HTR_VOLT_HIGH_Q" defaultvalue="10" comment="Heater Q is on and heater C is off but there is still an output voltage"/>
<ENUM name="ERROR_HTR_VOLT_Q_HIGH_IMP" defaultvalue="11" comment="Heater Q is tri-state with heater c enabled and there is still an output voltage"/>
<ENUM name="ERROR_HTR_VOLT_LOW" defaultvalue="12" comment="Turned Q and C on and heater voltage is too low"/>
<ENUM name="ERROR_HTR_FAILSAFE" defaultvalue="13" comment="Heater failsafe didn't trip"/>
<ENUM name="ERROR_AD_PULSE_LONG" defaultvalue="14" comment="Thermistor A/D pulse too long"/>
<ENUM name="ERROR_AD_PULSE_SHORT" defaultvalue="15" comment="Thermistor A/D pulse too short"/>
<ENUM name="ERROR_AD_RCAL_LONG" defaultvalue="16" comment="RCAL resistor pulse too long"/>
<ENUM name="ERROR_AD_RCAL_SHORT" defaultvalue="17" comment="RCAL resistor pulse too short"/>
<ENUM name="ERROR_AD_PTB_OVER" defaultvalue="18" comment="PTB resistor above 98.55F"/>
<ENUM name="ERROR_AD_PTB_UNDER" defaultvalue="19" comment="PTB resistor below 98.15F"/>
<ENUM name="ERROR_AD_TIMEOUT" defaultvalue="20" comment="A/D converstion timeout"/>
<ENUM name="ERROR_CFG_XFER" defaultvalue="21" comment="Failure to transfer data to EEPROM"/>
<ENUM name="ERROR_CFG_SET_CRC" defaultvalue="22" comment="Device Settings CRC failure"/>
<ENUM name="ERROR_CFG_PROBE_CRC" defaultvalue="23" comment="Probe CRC failure"/>
<ENUM name="ERROR_CFG_CAL_CRC" defaultvalue="24" comment="Devcie calibration CRC failure"/>
<ENUM name="ERROR_CFG_LOG_CRC" defaultvalue="25" comment="Error Log CRC failrue"/>
<ENUM name="ERROR_CFG_NO_PROBE" defaultvalue="26" comment="No probe detected"/>
<ENUM name="ERROR_CFG_UNIT_PROBE" defaultvalue="27" comment="Uninitialized probe"/>
<ENUM name="ERROR_CFG_ACK" defaultvalue="28" comment="I2C ACK failure"/>
<ENUM name="ERROR_CFG_INIT" defaultvalue="29" comment="Config initialization failure"/>
<ENUM name="ERROR_BAT_HIGH" defaultvalue="30" comment="Input voltage too high"/>
<ENUM name="ERROR_BAT_LOW" defaultvalue="31" comment="Input voltage too low"/>
<ENUM name="ERROR_BAD_VIBES" defaultvalue="32" comment="Power supply is compromised"/>
<ENUM name="ERROR_NO_PROBE_WELL" defaultvalue="33" comment="The probe well is not in the device"/>
<ENUM name="ERROR_POST_FAIL" defaultvalue="34" comment="A post failure was detected"/>
<ENUM name="ERROR_INTERNAL_FAULT" defaultvalue="35" comment="An internal fault was detected"/>
</ENUMERATION>
<ENUMERATION name="probe_type">
<ENUM name="NO_PROBE" defaultvalue="0" comment="No probe connected"/>
<ENUM name="ORAL" defaultvalue="1" comment="Oral probe connected"/>
<ENUM name="RECTAL" defaultvalue="2" comment="Rectal probe connected"/>
<ENUM name="CALKEY" defaultvalue="3" comment="Calibration key connected"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpENGDATA" defaultvalue="2"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Temp Status Record-->
<DEFINITION class="CSTPDStat" abrv="CSTPDST" version="102" family="FmTEMP" genus="GnDATA" species="SpSTATUS">
<MEMBERS>
<MEMBER type="uint16" name="state" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="error" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="hardwareState" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="finalTemp" minversion="100" maxversion="CURRENT_VERSION" comment="Temperature in degrees K"/>
<MEMBER type="float" name="probeTemp" minversion="100" maxversion="CURRENT_VERSION" comment="Temperature in degrees K"/>
<MEMBER type="uint16" name="method" minversion="100" maxversion="CURRENT_VERSION" comment="The temperature reading method"/>
<MEMBER type="uint16" name="probeType" minversion="100" maxversion="CURRENT_VERSION" comment="The temperature probe type"/>
<MEMBER type="uint16" name="algorithm" minversion="100" maxversion="CURRENT_VERSION" comment="The algorithm used"/>
<MEMBER type="uint16" name="battery" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<ENUMERATION name="state">
<ENUM name="IDLE" defaultvalue="0" comment="Device is idle"/>
<ENUM name="NOT_READY" defaultvalue="1" comment="Device is not ready warming probe"/>
<ENUM name="READY" defaultvalue="2" comment="Device is ready"/>
<ENUM name="PREDICT" defaultvalue="3" comment="Device is in the predict state"/>
<ENUM name="PREDICT_DISPLAY" defaultvalue="4" comment="Display a predict state notification"/>
<ENUM name="PREDICT_POS" defaultvalue="5" comment="Display the predict position icon"/>
<ENUM name="FINAL" defaultvalue="6" comment="Final predict reading complete"/>
<ENUM name="FINAL_POS" defaultvalue="7" comment="Final predict reading complete and display position icon."/>
<ENUM name="FINAL_OVER_TEMP" defaultvalue="8" comment="Final predict reading is over temperature"/>
<ENUM name="FINAL_UNDER_TEMP" defaultvalue="9" comment="Final predict reading is under temperature"/>
<ENUM name="FINAL_OVER_TEMP_POS" defaultvalue="10" comment="Final predict reading is over temperature and display the position icon"/>
<ENUM name="FINAL_UNDER_TEMP_POS" defaultvalue="11" comment="Final predict reading is under temperature and display the position icon"/>
<ENUM name="NO_PREDICT" defaultvalue="12" comment="A predict reading could not be taken"/>
<ENUM name="ERROR" defaultvalue="13" comment="The device is in the error state"/>
<ENUM name="MONITOR" defaultvalue="14" comment="The device is in monitoring mode"/>
</ENUMERATION>
<ENUMERATION name="error">
<ENUM name="NO_ERROR" defaultvalue="0" comment="No Errors found"/>
<ENUM name="ERROR_ALG_PROBE_OVER_TEMP" defaultvalue="1" comment="Probe exceeded temp range"/>
<ENUM name="ERROR_ALG_EXCESSIVE_HTR_ENERGY" defaultvalue="2" comment="Excessive heater energy"/>
<ENUM name="ERROR_ALG_OVER_AMB_TEMP" defaultvalue="3" comment="Ambient temperature too high"/>
<ENUM name="ERROR_ALG_UNDER_AMB_TEMP" defaultvalue="4" comment="Ambient temperature too low"/>
<ENUM name="ERROR_ALG_NO_PROBE_TEMP_RISE" defaultvalue="5" comment="No probe temperature rise detected"/>
<ENUM name="ERROR_ALG_BAD_PROBE_GAIN" defaultvalue="6" comment="Invalid probe gain"/>
<ENUM name="ERROR_ALG_BAD_PROBE_RESP_VAL" defaultvalue="7" comment="Invalid probe response value"/>
<ENUM name="ERROR_HTR_ON_NOT_OFF" defaultvalue="8" comment="Heater is on when it should be off"/>
<ENUM name="ERROR_HTR_OFF_NOT_ON" defaultvalue="9" comment="Heater is off when it should be on"/>
<ENUM name="ERROR_HTR_VOLT_HIGH_Q" defaultvalue="10" comment="Heater Q is on and heater C is off but there is still an output voltage"/>
<ENUM name="ERROR_HTR_VOLT_Q_HIGH_IMP" defaultvalue="11" comment="Heater Q is tri-state with heater c enabled and there is still an output voltage"/>
<ENUM name="ERROR_HTR_VOLT_LOW" defaultvalue="12" comment="Turned Q and C on and heater voltage is too low"/>
<ENUM name="ERROR_HTR_FAILSAFE" defaultvalue="13" comment="Heater failsafe didn't trip"/>
<ENUM name="ERROR_AD_PULSE_LONG" defaultvalue="14" comment="Thermistor A/D pulse too long"/>
<ENUM name="ERROR_AD_PULSE_SHORT" defaultvalue="15" comment="Thermistor A/D pulse too short"/>
<ENUM name="ERROR_AD_RCAL_LONG" defaultvalue="16" comment="RCAL resistor pulse too long"/>
<ENUM name="ERROR_AD_RCAL_SHORT" defaultvalue="17" comment="RCAL resistor pulse too short"/>
<ENUM name="ERROR_AD_PTB_OVER" defaultvalue="18" comment="PTB resistor above 98.55F"/>
<ENUM name="ERROR_AD_PTB_UNDER" defaultvalue="19" comment="PTB resistor below 98.15F"/>
<ENUM name="ERROR_AD_TIMEOUT" defaultvalue="20" comment="A/D converstion timeout"/>
<ENUM name="ERROR_CFG_XFER" defaultvalue="21" comment="Failure to transfer data to EEPROM"/>
<ENUM name="ERROR_CFG_SET_CRC" defaultvalue="22" comment="Device Settings CRC failure"/>
<ENUM name="ERROR_CFG_PROBE_CRC" defaultvalue="23" comment="Probe CRC failure"/>
<ENUM name="ERROR_CFG_CAL_CRC" defaultvalue="24" comment="Devcie calibration CRC failure"/>
<ENUM name="ERROR_CFG_LOG_CRC" defaultvalue="25" comment="Error Log CRC failrue"/>
<ENUM name="ERROR_CFG_NO_PROBE" defaultvalue="26" comment="No probe detected"/>
<ENUM name="ERROR_CFG_UNIT_PROBE" defaultvalue="27" comment="Uninitialized probe"/>
<ENUM name="ERROR_CFG_ACK" defaultvalue="28" comment="I2C ACK failure"/>
<ENUM name="ERROR_CFG_INIT" defaultvalue="29" comment="Config initialization failure"/>
<ENUM name="ERROR_BAT_HIGH" defaultvalue="30" comment="Input voltage too high"/>
<ENUM name="ERROR_BAT_LOW" defaultvalue="31" comment="Input voltage too low"/>
<ENUM name="ERROR_BAD_VIBES" defaultvalue="32" comment="Power supply is compromised"/>
<ENUM name="ERROR_NO_PROBE_WELL" defaultvalue="33" comment="The probe well is not in the device"/>
<ENUM name="ERROR_POST_FAIL" defaultvalue="34" comment="A post failure was detected"/>
<ENUM name="ERROR_INTERNAL_FAULT" defaultvalue="35" comment="An internal fault was detected"/>
</ENUMERATION>
<ENUMERATION name="hardwareState">
<ENUM name="probeConnected" defaultvalue="32768" comment="bit 15 - Probe Connected state"/>
<ENUM name="probePulled" defaultvalue="16384" comment="bit 14 - Probe pulled state"/>
<ENUM name="probeWellIn" defaultvalue="8192" comment="bit 13 - Probe well state"/>
<ENUM name="savingCal" defaultvalue="4096" comment="bit 12 - Saving the cal record to nonvolatile memory"/>
<ENUM name="savingSettings" defaultvalue="2048" comment="bit 11 - Saving the settings record to nonvolatile memory"/>
<ENUM name="takeReadingActive" defaultvalue="1024" comment="bit 10 - Take Reading Active"/>
</ENUMERATION>
<ENUMERATION name="method">
<ENUM name="PREDICT" defaultvalue="0" comment="If the reading started in predict mode"/>
<ENUM name="MONITOR" defaultvalue="1" comment="If the reading started in monitor mode"/>
<ENUM name="CLINICAL" defaultvalue="2" comment="If the reading is being run in the clinical mode"/>
</ENUMERATION>
<ENUMERATION name="probeType">
<ENUM name="NO_PROBE" defaultvalue="0" comment="No probe connected"/>
<ENUM name="ORAL" defaultvalue="1" comment="Oral probe connected"/>
<ENUM name="RECTAL" defaultvalue="2" comment="Rectal probe connected"/>
<ENUM name="CALKEY" defaultvalue="3" comment="Calibration key connected"/>
</ENUMERATION>
<ENUMERATION name="algorithm">
<ENUM name="NONE" defaultvalue="0" comment="No algorithm"/>
<ENUM name="ORAL_ALG" defaultvalue="1" comment="Oral algorithm"/>
<ENUM name="PED_AX_ALG" defaultvalue="2" comment="Pediatric axillary"/>
<ENUM name="ADULT_AX_ALG" defaultvalue="3" comment="Adult axillary"/>
<ENUM name="RECTAL_ALG" defaultvalue="4" comment="Rectal"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpSTATUS" defaultvalue="7"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnCONFIG-->
<!--==================================== -->
<DEFINITION class="CTempCStd" abrv="CTMPCSTD" version="101" family="FmTEMP" genus="GnCONFIG" species="SpSTANDARD">
<MEMBERS>
<MEMBER type="boolean" name="Enabled" minversion="100" maxversion="CURRENT_VERSION" comment="True if thermometer enabled"/>
<MEMBER type="uint16" name="InstalledModule" minversion="100" maxversion="CURRENT_VERSION" comment="Thermometer module"/>
<MEMBER type="uint16" name="DisplayUnits" minversion="100" maxversion="CURRENT_VERSION" comment="Thermerature display units"/>
<MEMBER type="uint16" name="Mode" minversion="100" maxversion="CURRENT_VERSION" comment="Mode of operation"/>
</MEMBERS>
<ENUMERATION name="InstalledModule">
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<ENUM name="SURETEMP_SW" defaultvalue="10"/>
<ENUM name="SURETEMP"/>
<ENUM name="SURETEMP_PLUS"/>
<ENUM name="BRAUN_PRO4000"/>
<ENUM name="BRAUN_PRO6000"/>
</ENUMERATION>
<ENUMERATION name="DisplayUnits">
<ENUM name="DEG_F" defaultvalue="0"/>
<ENUM name="DEG_C"/>
</ENUMERATION>
<ENUMERATION name="Mode">
<ENUM name="NONE" defaultvalue="0"/>
<ENUM name="UNKNOWN"/>
<ENUM name="ORAL" defaultvalue="10"/>
<ENUM name="ADULT_AXIL"/>
<ENUM name="PED_AXIL"/>
<ENUM name="LAST"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpSTANDARD" defaultvalue="0"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnCONFIG-->
<!--==================================== -->
<!--Temp Settings Record-->
<DEFINITION class="CSTPCStd" abrv="CSTPCSTD" version="100" family="FmTEMP" genus="GnCONFIG" species="SpDATA">
<MEMBERS>
<MEMBER type="uint16" name="clinicalPause" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint8" name="deviceType" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint8" name="dfltAlgorithm" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="ambientBias" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<ENUMERATION name="dfltAlgorithm">
<ENUM name="ORAL" defaultvalue="0" comment="Oral probe in mouth"/>
<ENUM name="PED_AXILLARY" defaultvalue="1" comment="Oral probe in pediatric axilla"/>
<ENUM name="ADULT_AXILLARY" defaultvalue="2" comment="Oral probe in adult axilla"/>
<ENUM name="LAST" defaultvalue="3" comment="Last algorithm used"/>
</ENUMERATION>
<ENUMERATION name="deviceType">
<ENUM name="PREDICT_DEVICE" defaultvalue="0" comment="Device is a predictive thermometer"/>
<ENUM name="MONITOR_DEVICE" defaultvalue="1" comment="Device is a monitoring thermometer"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpDATA" defaultvalue="1"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnCONFIG-->
<!--==================================== -->
<!--Temp Calibration Record-->
<DEFINITION class="CSTPCCal" abrv="CSTPCCAL" version="100" family="FmTEMP" genus="GnCONFIG" species="SpCALIBRATION">
<MEMBERS>
<MEMBER type="uint32" name="signature" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="TIME" name="dateTime" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="modConfig" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="Yp0" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="Rp0" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="RPTBEff" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="RCalEff" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="vRef" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpCALIBRATION" defaultvalue="2"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Temp Probe Record-->
<DEFINITION class="CSTPDProbe" abrv="CSTPDPROBE" version="101" family="FmTEMP" genus="GnDATA" species="SpPROBEDATA">
<MEMBERS>
<MEMBER type="int8" name="probeType" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int8" name="partNumber" size="8" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint32" name="lotCode" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int16" name="lotSeqNum" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int16" name="probeArrayLoc" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int16" name="testPassFailCode" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int32" name="calSignature" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="TIME" name="calDateTime" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="heaterGain" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="heaterTimeDelay" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="responses" size="15" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="thermCalM" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="thermCalB" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefA" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefB" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefC" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefD" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="float" name="coefE" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint32" name="probeCycleCount" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="uint16" name="deviceCount" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
<MEMBER type="int8" name="lastDeviceSN" size="15" minversion="100" maxversion="CURRENT_VERSION" comment=""/>
</MEMBERS>
<ENUMERATION name="probeType">
<ENUM name="ORAL" defaultvalue="0" comment="Oral probe"/>
<ENUM name="CALKEY" defaultvalue="1" comment="Calibration key"/>
<ENUM name="RECTAL" defaultvalue="2" comment="Rectal probe"/>
<ENUM name="NONE" defaultvalue="3" comment="No probe attached"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpPROBEDATA" defaultvalue="3"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<DEFINITION class="CSTPDHState" abrv="CSTPDHST" version="100" family="FmTEMP" genus="GnDATA" species="SpHARDWARESTATE">
<MEMBERS>
<MEMBER type="int16" name="hardware" minversion="100" maxversion="CURRENT_VERSION" comment="The index of the hardware to get/set the state of"/>
<MEMBER type="int16" name="state" minversion="100" maxversion="CURRENT_VERSION" comment="The state of the hardware"/>
</MEMBERS>
<ENUMERATION name="hardware">
<ENUM name="PROBE_WELL_SW" defaultvalue="0" comment="The switch that signals if the probe well is in place"/>
<ENUM name="PROBE_SW" comment="The switch that signals if the probe is in the well"/>
<ENUM name="PROBE_CONNECTED_SW" comment="The switch that signals if the probe is connected"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpHARDWARESTATE" defaultvalue="4"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Device Test Locks-->
<DEFINITION class="CSTPDLock" abrv="CSTPDLCK" version="100" family="FmTEMP" genus="GnDATA" species="SpLOCK">
<MEMBERS>
<MEMBER type="int16" name="lock" minversion="100" maxversion="CURRENT_VERSION" comment="The lock to get/set"/>
<MEMBER type="int8" name="state" minversion="100" maxversion="CURRENT_VERSION" comment="state The state of the lock"/>
</MEMBERS>
<ENUMERATION name="lock">
<ENUM name="DIGITAL_INPUT_LOCK" defaultvalue="0" comment="Locks the digital input status check"/>
<ENUM name="AD_CHANNEL" comment="Locks the AD channel"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpLOCK" defaultvalue="5"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--AD Raw Data-->
<DEFINITION class="CSTPDRData" abrv="CSTPDRDT" version="100" family="FmTEMP" genus="GnDATA" species="SpRAWDATA">
<MEMBERS>
<MEMBER type="uint32" name="thermistor" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts of the thermistor"/>
<MEMBER type="uint32" name="PTBResistor" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts for the PTB resistor"/>
<MEMBER type="uint32" name="rCalResistor" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts for the RCAL resistor"/>
<MEMBER type="uint32" name="vRef" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts for the battery voltage"/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpRAWDATA" defaultvalue="6"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--AD Sample Data-->
<DEFINITION class="CSTPDSample" abrv="CSTPDSMP" version="100" family="FmTEMP" genus="GnDATA" species="SpADSAMPLEDATA">
<MEMBERS>
<MEMBER type="uint8" name="channel" minversion="100" maxversion="CURRENT_VERSION" comment="The channel for this sample."/>
<MEMBER type="uint8" name="error" minversion="100" maxversion="CURRENT_VERSION" comment="The error for the sample 0 no error anything else an error has occured."/>
<MEMBER type="uint32" name="sample" minversion="100" maxversion="CURRENT_VERSION" comment="The sample number for this sample."/>
<MEMBER type="uint32" name="data" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts for the sample."/>
<MEMBER type="float" name="temperature" minversion="100" maxversion="CURRENT_VERSION" comment="The kelvin temperature for the sample."/>
<MEMBER type="float" name="resistance" minversion="100" maxversion="CURRENT_VERSION" comment="The resistance for the sample."/>
<MEMBER type="uint32" name="last_rcal" minversion="100" maxversion="CURRENT_VERSION" comment="The raw counts of the last RCal measurement."/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpADSAMPLEDATA" defaultvalue="8"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnPARAMETER-->
<!--==================================== -->
<!--Temp Reading -->
<DEFINITION class="CSTPPSelector" abrv="CSTPPSEL" version="200" family="FmTEMP" genus="GnPARAMETER" species="SpSELECTOR">
<MEMBERS>
<MEMBER type="uint32" name="Value" minversion="200" maxversion="CURRENT_VERSION" comment="Value is used to specify the desired option when needed or Species selected."/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpSELECTOR" defaultvalue="2" comment="Used to indicate that the Value is a selector"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnPARAMETER-->
<!--==================================== -->
<!--Temp Settings -->
<DEFINITION class="CTempPMsgArg" abrv="CTEMPPARG" version="102" family="FmTEMP" genus="GnPARAMETER" species="SpMSG_ARGUMENTS">
<MEMBERS>
<MEMBER type="uint32" name="IOParameterA" minversion="100" maxversion="CURRENT_VERSION" comment="Species ID of the device requested."/>
<MEMBER type="uint32" name="IOParameterB" minversion="100" maxversion="CURRENT_VERSION" comment="IO parameter for device message."/>
</MEMBERS>
<ENUMERATION name="ThermometerSettings">
<ENUM name="NONE" defaultvalue="0" comment="None specified"/>
<ENUM name="ANTI_THEFT_TIME" defaultvalue="1" comment="Numerical value (hrs) thermometer will be allowed to be not in its cradle before a theft alarm will sound (0=OFF; 1-24)."/>
<ENUM name="F_C_SELECTION_ENABLED" defaultvalue="2" comment="Enables the F/C button on the front of the thermometer. (0:Disabled; 1:Enabled [Default])"/>
<ENUM name="TIMER_ICON_ENABLED" defaultvalue="3" comment="Enable UI to show the Timer Icon. (0:Disabled; 1:Enabled [Default])"/>
<ENUM name="TECHNIQUE_COMPENSATION_ENABLED" defaultvalue="4" comment="Enable Technique Compensation algorithm processing. (0:Disabled; 1:Enabled [Default])"/>
<ENUM name="SELECT_F_C_DEFAULT_STATE" defaultvalue="5" comment="Determines which unit will be used when the thermometer is powered on. (0: Celsius [Default] 1:Fahrenheit)"/>
<ENUM name="F_C_HW_SWITCH_ENABLED" defaultvalue="6" comment="Enables the hardware switch used to select default unit (F or C). Located in battery compartment (0:Disabled; 1:Enabled [Default])"/>
<ENUM name="UNADJUSTED_MODE_ENABLED" defaultvalue="7" comment="Sets the UI for Unadjusted Mode (0:Disabled [Default] 1:Enabled)"/>
</ENUMERATION>
<ENUMERATION name="TempSource">
<ENUM name="NONE" defaultvalue="0" comment="None specified"/>
<ENUM name="DISPLAY" defaultvalue="1" comment="Retrieves the display temperature"/>
<ENUM name="BRAUN_CALC" defaultvalue="2" comment="Retrieves the Braun calculated temperature"/>
<ENUM name="TECHNIQUE_COMPENSATION_CALC" defaultvalue="3" comment="Retrives the technique compensation calculated temperature"/>
<ENUM name="ALL" defaultvalue="255" comment="Retrives all avaliable temperatures"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpMSG_ARGUMENTS" defaultvalue="0" comment="Indicates that the object is a message argument rather than a result."/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Touch Data-->
<DEFINITION class="CTempDTouch" abrv="CTMPDTOUCH" version="101" family="FmTEMP" genus="GnDATA" species="SpTOUCHDATA">
<MEMBERS>
<MEMBER type="uint16" name="ele0" minversion="100" maxversion="CURRENT_VERSION" comment="ELE0 Electrode Filtered Data LSB"/>
<MEMBER type="uint16" name="ele1" minversion="100" maxversion="CURRENT_VERSION" comment="ELE1 Electrode Filtered Data LSB"/>
<MEMBER type="uint16" name="ele2" minversion="100" maxversion="CURRENT_VERSION" comment="ELE2 Electrode Filtered Data LSB"/>
<MEMBER type="uint16" name="touchStatus" minversion="100" maxversion="CURRENT_VERSION" comment="ELE0 - ELE7 Touch Status"/>
<MEMBER type="uint8" name="ele0bv" minversion="100" maxversion="CURRENT_VERSION" comment="ELE0 Baseline Value"/>
<MEMBER type="uint8" name="ele1bv" minversion="100" maxversion="CURRENT_VERSION" comment="ELE1 Baseline Value"/>
<MEMBER type="uint8" name="ele2bv" minversion="100" maxversion="CURRENT_VERSION" comment="ELE2 Baseline Value"/>
<MEMBER type="uint16" name="hardwareStateIR" minversion="100" maxversion="CURRENT_VERSION" format="BITMASK" comment="Indication for TAKE_READING_ACTIVE"/>
<MEMBER type="uint32" name="sampleCount" minversion="101" maxversion="CURRENT_VERSION" comment="Sample count for the object. Increment by 1 on each packet. Reset on power up"/>
</MEMBERS>
<ENUMERATION name="hardwareStateIR">
<ENUM name="TAKE_READING_ACTIVE" defaultvalue="0" comment="bit 0 - Take Reading Active"/>
<ENUM name="PROBE_COVER_ON" defaultvalue="1" comment="bit 1 - Probe Cover On"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpTOUCHDATA" defaultvalue="9"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATA-->
<!--==================================== -->
<!--Therm Data-->
<DEFINITION class="CTempDTherm" abrv="CTMPDTHERM" version="106" family="FmTEMP" genus="GnDATA" species="SpTHERMDATA">
<MEMBERS>
<MEMBER type="float" name="ambient" minversion="100" maxversion="CURRENT_VERSION" comment="Ambient Temperature, Fahrenheit"/>
<MEMBER type="int32" name="ambient_count" minversion="100" maxversion="CURRENT_VERSION" comment="Ambient Temperature Count, reset on power up"/>
<MEMBER type="float" name="thermopile" minversion="100" maxversion="CURRENT_VERSION" comment="Thermopile Temperature, Fahrenheit"/>
<MEMBER type="int32" name="thermopile_count" minversion="100" maxversion="CURRENT_VERSION" comment="Thermopile Temperature Count"/>
<MEMBER type="uint32" name="sampleCount" minversion="101" maxversion="CURRENT_VERSION" comment="Sample count for the object. Increment by 1 on each packet. Reset on power up."/>
<MEMBER type="int16" name="heaterPWM" minversion="102" maxversion="CURRENT_VERSION" comment="Heater PWM count for the object, Range: 0-1000"/>
<MEMBER type="int16" name="heaterState" minversion="103" maxversion="CURRENT_VERSION" comment="Shows heater state"/>
<MEMBER type="int16" name="heaterError" minversion="103" maxversion="CURRENT_VERSION" comment="Shows errors with heater. If error occurs, this value is 1. If no error occurs, this value is 0."/>
<MEMBER type="float" name="braun_ambient" minversion="104" maxversion="CURRENT_VERSION" comment="Ambient temperature of Braun circuitry, Fahrenheit"/>
<MEMBER type="float" name="TCValue" minversion="105" maxversion="CURRENT_VERSION" comment="Represents the technique compensated value output from the device."/>
<MEMBER type="uint8" name="pre_num" minversion="106" maxversion="CURRENT_VERSION" comment="Represents the number of samples before the button press"/>
<MEMBER type="uint8" name="post_num" minversion="106" maxversion="CURRENT_VERSION" comment="Reperesents the number of samples after the button press"/>
</MEMBERS>
<ENUMERATION name="heaterState">
<ENUM name="IDLE" defaultvalue="0" comment="Heater is not on"/>
<ENUM name="HEATER_TEST" defaultvalue="1" comment="Runs failsafes to make sure heater is operational"/>
<ENUM name="HEATER_ON" defaultvalue="2" comment="Heater is turned on"/>
<ENUM name="READY" defaultvalue="3" comment="Heater is ready to be turned off"/>
<ENUM name="ERROR" defaultvalue="4" comment="Error detected with heater, turns heater off"/>
</ENUMERATION>
<SPECIES_TABLE>
<SPECIES name="SpTHERMDATA" defaultvalue="10"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--GnDATAEXT-->
<!--==================================== -->
<DEFINITION class="CTempDExtStd" abrv="CTEMPDXTSTD" version="200" family="FmTEMP" genus="GnDATAEXT" species="SpSTANDARD">
<MEMBERS>
<MEMBER name="Container" class="ANY_CLASS" comment="Contains a list of CTempDData objects." maxversion="CURRENT_VERSION" minversion="200" type="OBJECT" size="UNBOUNDED"/>
</MEMBERS>
<SPECIES_TABLE>
<SPECIES name="SpSTANDARD" defaultvalue="0"/>
</SPECIES_TABLE>
</DEFINITION>
<!--====================================-->
<!--Messages -->
<!-- ====================================-->
<MESSAGES>
<MSG type="Request" name="GET_TEMP" comment="May contain and optional selector object, CSTPPSelector to indicate what GnDATA object to retrieve (SpeciesSelector: SpSTANDARD = CTempDStd | SpDATA = CTempDData). With no selector, the CTempDStd is returned."/>
<MSG type="Request" name="GET_CONFIG"/>
<MSG type="Response" name="PUT_TEMP" comment="May contain a CTempDStd or CTempDData"/>
<MSG type="Response" name="PUT_CONFIG"/>
<MSG type="Command" name="WRITE_CONFIG"/>
<MSG type="Status" name="REPORT_TEMPERATURE"/>
<MSG type="Request" name="GET_ENG_STATUS"/>
<MSG type="Response" name="PUT_ENG_STATUS" comment="Requires a CSTPTempDEng object"/>
<MSG type="Stream" name="REPORT_ENG_STATUS" comment="Requires a CSTPTempDEng object"/>
<MSG type="Command" name="MSG_PUSH_ENABLE" comment="Requires a CSTPPSelector"/>
<MSG type="Command" name="MSG_SET_ALG" comment="Requires a CSTPPSelector"/>
<MSG type="Command" name="MSG_SET_MODE" comment="Requires a CSTPPSelector"/>
<!--Platform Temp Messages-->
<!--Temp Status-->
<MSG type="Request" name="STATUS"/>
<MSG type="Response" name="PUT_STATUS" comment="Requires a CSTPDStat"/>
<MSG type="Stream" name="REPORT_STATUS" comment="Requires a CSTPDStat"/>
<MSG type="Command" name="RESET_DEVICE"/>
<!--Probe Record-->
<MSG type="Request" name="GET_PROBE_INFO"/>
<MSG type="Response" name="PUT_PROBE_INFO" comment="Requires a CSTPDProbe object"/>
<!--Temp Calibration-->
<MSG type="Request" name="GET_CALIBRATION" comment=""/>
<MSG type="Response" name="PUT_CALIBRATION" comment="Requires CSTPCCal."/>
<MSG type="Command" name="SET_CALIBRATION" comment="Requires CSTPCCal."/>
<MSG type="Command" name="SAVE_CALIBRATION" comment=""/>
<MSG type="Command" name="LOAD_CALIBRATION" comment=""/>
<MSG type="Command" name="RESTORE_DFLT_CALIBRATION" comment=""/>
<!--Temp Settings-->
<MSG type="Request" name="GET_SETTINGS"/>
<MSG type="Response" name="PUT_SETTINGS" comment="Requires CSTPCStd"/>
<MSG type="Command" name="SET_SETTINGS" comment="Requires CSTPCStd"/>
<MSG type="Command" name="SAVE_SETTINGS" />
<MSG type="Command" name="LOAD_SETTINGS"/>
<MSG type="Command" name="RESTORE_DFLT_SETTINGS"/>
<!--Hardware State-->
<MSG type="Request" name="GET_HARDWARE_STATE" comment ="Requires a CSTPPSelector"/>
<MSG type="Response" name="PUT_HARDWARE_STATE" comment="Requires a CSTPDHState"/>
<MSG type="Command" name="SET_HARDWARE_STATE" comment="Requires a CSTPDHState"/>
<!--Device Test Locks-->
<MSG type="Request" name="GET_TEST_LOCK" comment ="Requires a CSTPPSelector"/>
<MSG type="Response" name="PUT_TEST_LOCK" comment="Requires a CSTPDLock"/>
<MSG type="Command" name="SET_TEST_LOCK" comment="Requires a CSTPDLock"/>
<!--AD Raw Data-->
<MSG type="Request" name="GET_RAW_DATA"/>
<MSG type="Response" name="PUT_RAW_DATA" comment="Requires a CSTPDRData"/>
<!--AD Sample Data-->
<MSG type="Request" name="GET_SAMPLE"/>
<MSG type="Response" name="PUT_SAMPLE" comment="Requires a CSTPDSample"/>
<MSG type="Stream" name="REPORT_SAMPLE" comment="Requires a CSTPDSample"/>
<!--Touch Data-->
<MSG type="Request" name="GET_TOUCH" comment=""/>
<MSG type="Response" name="PUT_TOUCH" comment=""/>
<MSG type="Stream" name="REPORT_TOUCH" comment="Requires a CTempDTouch"/>
<!--Therm Data-->
<MSG type="Request" name="GET_THERM" comment=""/>
<MSG type="Response" name="PUT_THERM" comment=""/>
<MSG type="Command" name="SET_THERM" comment=""/>
<MSG type="Stream" name="REPORT_THERM" comment="Requires a CTempDTherm"/>
<MSG type="Command" name="START_ACQUIRE" comment="Command to start sending TOUCH or THERM data."/>
<MSG type="Command" name="STOP_ACQUIRE" comment="Command to stop sending TOUCH or THERM data."/>
<!-- Temp Settings -->
<MSG type="Request" name="GET_THERMOMETER_SETTINGS" comment="Requires a CTempPMsgArg"/>
<MSG type="Response" name="PUT_THERMOMETER_SETTINGS" comment="Requires a CTempPMsgArg"/>
<MSG type="Command" name="WRITE_THERMOMETER_SETTINGS" comment="Requires a CTempPMsgArg"/>
</MESSAGES>
</FAMILY>

136
src/families.rs Normal file
View file

@ -0,0 +1,136 @@
#[derive(Debug, Display, Enum String, EnumIndex, IndexEnum)]
pub enum Families {
FmARCH, //0, This is used by the WACP architecture to provide messages for standard features.
FmECG, //1, This is used for the ElctroCardioGram (ECG) components.
FmIP, //2, This is used for the Impedance Pneumography (IP) Respiration components
FmTEMP, //3, This family is used for all components that perform temperature measurements (SureTemp and Oral/Skin/Core). The different types will be differentiated by species.
FmSPO2, //4, This is used for the SpO2 component that interfaces with all forms of OEM SpO2 boards.
FmNIBP, //5, This is used for all forms of Non-Invasive Blood Pressure (NIBP).
FmICG, //6, Non-Invasive Cardiac Output (Impedance CardioGraphy, ICG)
FmHEMODYNAMICS, //7, Hemodynamic Values
FmCO2, //8, This is used for mainstream and sidestream CO2 monitoring components.
FmIBP, //9, This is used for Invasive Blood Pressure components (IBP).
FmCARDIACOUTPUT, //10, This is used for all forms of cardiac output components.
FmUI, //11, This is used for all manner of user interface components.
FmBARCODE, //12, This is used for components that interface with a barcode reader.
FmCTR, //13, These are the main processing node controllers. An example is a “Monet” controller.
FmPATIENT, //14, Used for context for test results.
FmUSER, //15, Used for context in test results.
FmGLUCOSE, //16, This is used for Glucose components.
FmBODYMASSINDEX, //17, This is used for body mass index components.
FmRESPIRATION, //18, This is used for respiration components.
FmWEIGHT, //19, This is used for weight components.
FmINSURANCE, //20, This is used for insurance definition.
FmPHYSICIAN, //21, This is used for physician definition.
FmSITE, //22, This is used for site definition.
FmSESSION, //23, This is used for session components.
FmDEVICE, //24, Details the basic common attributes of a device or instrument. This may include model, serial etc…
FmINTERPRETATION, //25, This is used for interpretation components generated by a ECG analysis.
FmHEIGHT, //26, This is used for height component definition.
FmSPIRO, //27, This used for Spirometery components.
FmTRAP, //28, An architecture level definition for error and exceptions generated by application processes and OSI framework members. Used in network communications.
FmRENDEZVOUS, //29, A connection based component with messages that facilitate network connection sequences on multiple media.
FmCONNECTION, //30, A connection management component with base capabilities for managing connections (wireless) that are not guaranteed.
FmWAVESAMPLE, //31, The representation of points in any type of measured recording over time.
FmWAVE, //32, The representation of points in any type of measured recording over time.
FmDEV01, //33, Reserved for development use only.
FmDEV02, //34, ''
FmDEV03, //35, ''
FmDEV04, //36, ''
FmDEV05, //37, ''
FmDEV06, //38, ''
FmDEV07, //39, ''
FmDEV08, //40, ''
FmDEV09, //41, ''
FmDEV10, //42, ''
FmDEV11, //43, ''
FmDEV12, //44, ''
FmDEV13, //45, ''
FmDEV14, //46, ''
FmDEV15, //47, ''
FmDEV16, //48, ''
FmDEV17, //49, ''
FmDEV18, //50, ''
FmDEV19, //51, ''
FmDEV20, //52, ''
FmDEV21, //53, ''
FmDEV22, //54, ''
FmDEV23, //55, ''
FmDEV24, //56, ''
FmDEV25, //57, ''
FmDEV26, //58, ''
FmDEV27, //59, ''
FmDEV28, //60, ''
FmDEV29, //61, ''
FmDEV30, //62, ''
FmDEV31, //63, ''
FmDEV32, //64, ''
FmDEV33, //65, ''
FmDEV34, //66, ''
FmDEV35, //67, ''
FmDEV36, //68, ''
FmDEV37, //69, ''
FmDEV38, //70, ''
FmDEV39, //71, ''
FmDEV40, //72, ''
FmDEV41, //73, ''
FmDEV42, //74, ''
FmDEV43, //75, ''
FmDEV44, //76, ''
FmDEV45, //77, ''
FmDEV46, //78, ''
FmDEV47, //79, ''
FmDEV48, //80, ''
FmDEV49, //81, ''
FmDEV50, //82, ''
FmGLOBALMEASUREMENTS, //83,
FmLEADIMPEDANCEARRAY, //84,
FmLEADIMPEDANCE, //85,
FmMEASUREMENTMATRIX, //86,
FmLEADMEASUREMENT, //87,
FmQRSANNOTARRAY, //88,
FmQRSCOMPLEX, //89,
FmPACERARRAY, //90,
FmPACERINFO, //91,
FmDTCOLLECTION, //92, Collection Object
FmWACP, //93, WACP Object
FmFLASH, //94, Flash Programming Object
FmVERSION, //95,
FmPRINTER, //96,
FmRECORD, //97, Results generated by a device.
FmTCPIP, //98, TCPIP Settings
FmLOCATIONID, //99, Network Identification
FmPAIN, //100,
FmCLINICIAN, //101,
FmCALIBRATION, //102,
FmPATIENTLIST, //103,
FmFAX, //104,
FmMODULE, //105,
FmMODEM, //106,
FmNETWORK, //107,
FmTEST, //108,
FmENCRYPTION, //109,
FmTOC, //110,
FmBATTERY, //111,
FmFILESYS, //112,
FmMOIBSTRING, //113,
FmERROR, //114,
FmCOMMAND_LINE, //115,
FmDICTIONARY, //116,
FmNUMERIC, //117,
FmCHANNEL, //118,
FmORDER, //119,
FmQUERY, //120,
FmTYMP, //121,
FmDATATRANSFER, //122,
FmLIST, //123,
FmHR, //124,
FmSPHB, //125,
FmHIM, //126,
FmSPOC, //127,
FmSPCO, //128,
FmSPMET, //129,
FmPATIENT_MOTION, //130,
FmCUSTOM, //131,
FmMAX //132, The FmMAX is a sliding value that will be one enumerated value greater than the last family defined. The actual enumerated value may vary if additional families are added in the Constants Table XML document. This value is used to terminate the family enumeration list.
}

24
src/genera.rs Normal file
View file

@ -0,0 +1,24 @@
#[derive(Debug, Display, Enum String, EnumIndex, IndexEnum)]
pub enum Genera {
GnDATA, //0, An aggregate type that represents a number of attributes related to a particular family.
GnCOMMAND, //1, Used to send commands to components.
GnEVENT, //2, Notify the rest of the system that something has taken place.
GnERROR, //3, Used to notify the system that something has occurred that should not have occurred.
GnPARAMETER, //4, Used to send parameter information.
GnSTATUS, //5, The persistent status of the component during the current power up state of the processing node.
GnNUMERIC, //6, Used primarily for patient vital-signs numeric, but is not limited to representation of other numeric data.
GnRESERVE_A, //7, Reserved
GnCONFIG, //8, Used to contain the configuration data of the components.
GnRESERVE_B, //9, Reserved
GnRESERVE_C, //10, Reserved
GnREQUEST, //11, Used to request that one component send a message directly to another component.
GnRESERVE_D, //12, Reserved
GnRESERVE_E, //13, Reserved
GnRESERVE_F, //14, Reserved
GnRESPONSE, //15, Response
GnRESERVE_G, //16, Reserved
GnSTREAM, //17, Used for messaging while not requiring an ACK or NAK.
GnDATAEXT, //18, An aggregate type that represents a number of attributes related to a particular family, extended to 4 bytes.
GnANNOTATION, //19, Used to contain data that provides additional information for another object.
GnMAX //20, Used to contain data that provides additional information for another object.
}

291
src/main.rs Normal file
View file

@ -0,0 +1,291 @@
mod oop;
use std::{thread::{self, JoinHandle}, fs::copy, ops::Index, clone, borrow::Cow};
use clap::Parser;
use roxmltree::{self, Document};
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Args {
#[arg(short, long)]
dir: String
}
fn main() {
let mut arg = Args::parse();
let mut objects_filenames: Vec<String> = Vec::new();
let mut messages_filenames: Vec<String> = Vec::new();
let mut docs: Vec<Document> = Vec::new();
let mut handles: Vec<thread::JoinHandle<()>> = Vec::new();
let mut file_name: Vec<String> = Vec::new();
let opt = roxmltree::ParsingOptions {
allow_dtd: true,
..roxmltree::ParsingOptions::default()
};
let paths = std::fs::read_dir(arg.dir).expect("No directory found.");
let mut temp:Vec<JoinHandle<Document>> = Vec::new();
for path in paths {
match path {
Ok(real_path) => {
file_name.push(real_path.path().to_string_lossy().to_string());
},
Err(unreal_path) => {panic!("Bad file path.")}
};
objects_filenames.push(file_name.last().unwrap().trim_end_matches(".xml").to_string() + "_objects.rs");
messages_filenames.push(file_name.last().unwrap().trim_end_matches(".xml").to_string() + "_messages.rs");
temp.push(thread::spawn(move || {
let new_file_name = file_name.last().unwrap().to_owned();
roxmltree::Document::parse_with_options(new_file_name.as_str(), opt).unwrap()
}));
}
for path in paths {
temp.push(thread::spawn(move || {
let file_name;
match path {
Ok(real_path) => {
file_name = real_path.path().to_string_lossy().to_string();
},
Err(unreal_path) => {panic!("Bad file path.")}
};
roxmltree::Document::parse_with_options(&file_name, opt).unwrap()
}));
}
/*for arg in 0..args.files.len() {
let temp = args.files.remove(0);
objects_filenames.push(temp.trim_end_matches(".xml").to_string() + "_objects.rs");
messages_filenames.push(temp.trim_end_matches(".xml").to_string() + "_messages.rs");
docs.push(roxmltree::Document::parse_with_options(&temp, opt).unwrap());
}*/
for doc in docs {
}
for handle in handles {
handle.join().unwrap();
}
}
fn parse(doc: &Document) -> oop::Family{
let mut family: oop::Family = oop::Family::new(String::new(), Vec::new(), Vec::new());
let mut messages: oop::Messages = oop::Messages::new(Vec::new(), Vec::new(), Vec::new(), Vec::new(), Vec::new());
if doc.root_element().has_children() {
for child1 in doc.root_element().first_children() {
if child1.is_element() {
print!("\n{:?}: ", child1.tag_name());
if child1.tag_name().name().to_string().as_str() == "FAMILY" {
for attr in child1.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value());
if attr.name() == "name" {
family.name = attr.value().to_string();
}
else {
panic!("No family name found. Failed to initialize data structure.")
}
}
}
if child1.has_children() {
for child2 in child1.children() {
if child2.is_element() {
print!("\n {:?}: ", child2.tag_name());
if child2.tag_name().name().to_string().as_str() == "SPECIES_KEY" {
for attr in child2.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value())
}
}
if child2.has_children() {
for child3 in child2.children() {
if child3.is_element() {
print!("\n {:?}: ", child3.tag_name());
if child3.tag_name().name().to_string().as_str() == "GENUS" {
for attr in child3.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value());
if attr.name() == "name" {
family.push_genus(oop::Genus::new(attr.value().to_string(), Vec::new()));
}
}
}
if child3.has_children() {
for child4 in child3.children() {
if child4.is_element() {
print!("\n {:?}: {:?}={:?} {:?}={:?}", child4.tag_name(), child4.attribute_node("name").unwrap().name().to_string(), child4.attribute_node("name").unwrap().value().to_string(), child4.attribute_node("defaultvalue").unwrap().name().to_string(), child4.attribute_node("defaultvalue").unwrap().value().to_string());
if child4.tag_name().name().to_string().as_str() == "SPECIES" {
family.genera.last_mut().unwrap().push(oop::Species::new(child4.attribute_node("name").unwrap().value().to_string(), child4.attribute_node("defaultvalue").unwrap().value().to_string(), Vec::new()));
}
}
}
}
}
}
}
}
}
else if child2.tag_name().name().to_string().as_str() == "DEFINITION" {
for attr in child2.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value())
}
}
if let Some(f) = child2.attribute_node("family") {
if f.value() == family.name {
for genus in family.genera.as_mut_slice() {
if let Some(g) = child2.attribute_node("genus") {
if g.value() == genus.name {
for species in genus.species.as_mut_slice() {
if let Some(s) = child2.attribute_node("species") {
if s.value() == species.name {
species.push(oop::Object::new(child2.attribute_node("class").unwrap().value().to_string(), child2.attribute_node("abrv").unwrap().value().to_string(), child2.attribute_node("version").unwrap().value().to_string(), Vec::new()))
}
}
}
}
}
}
}
}
if child2.has_children() {
for child3 in child2.children() {
if child3.is_element() {
if child3.tag_name().name().to_string().as_str() == "MEMBERS" {
print!("\n {:?}: ", child3.tag_name());
for attr in child3.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value())
}
}
if child3.has_children() {
for child4 in child3.children() {
if child4.is_element() {
print!("\n {:?}: ", child4.tag_name());
for attr in child4.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value())
}
}
if child4.tag_name().name().to_string().as_str() == "MEMBER" {
if let Some(s) = child2.attribute_node("family") {
if s.value() == family.name{
for genus in family.genera.as_mut_slice() {
if let Some(g) = child2.attribute_node("genus") {
if g.value() == genus.name {
for species in genus.species.as_mut_slice() {
if let Some(s) = child2.attribute_node("species") {
if s.value() == species.name {
for object in species.objects.as_mut_slice() {
object.push(oop::ObjectMember::new(child4.attribute_node("type").unwrap().value().to_string(), child4.attribute_node("name").unwrap().value().to_string(), child4.attribute_node("minversion").unwrap().value().to_string(), child4.attribute_node("maxversion").unwrap().value().to_string(), Vec::new()));
}
}
}
}
}
}
}
}
}
}
}
}
}
}
else if child3.tag_name().name().to_string().as_str() == "ENUMERATION" {
print!("\n {:?}: ", child3.tag_name());
for attr in child3.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value())
}
}
if child3.has_children() {
for child4 in child3.children() {
if child4.is_element() {
print!("\n {:?}: ", child4.tag_name());
for attr in child4.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value())
}
}
if child4.tag_name().name().to_string().as_str() == "ENUM" {
if let Some(f) = child2.attribute_node("family") {
if f.value() == family.name {
for genus in family.genera.as_mut_slice() {
if let Some(g) = child2.attribute_node("genus") {
if g.value() == genus.name {
for species in genus.species.as_mut_slice() {
if let Some(s) = child2.attribute_node("species") {
if s.value() == species.name {
for object in species.objects.as_mut_slice() {
for member in object.members.as_mut_slice() {
if let Some(m) = child3.attribute_node("name") {
if m.value() == member.name {
if child4.has_attribute("defaultvalue") {
member.enumerations.push(oop::MemberEnumeration::new(child4.attribute_node("name").unwrap().value().to_string(), child4.attribute_node("defaultvalue").unwrap().value().to_string()));
}
else {
member.enumerations.push(oop::MemberEnumeration::new(child4.attribute_node("name").unwrap().value().to_string(), String::new()));
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
else if child2.tag_name().name().to_string().as_str() == "MESSAGES" {
for attr in child2.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value())
}
}
if child2.has_children() {
for child3 in child2.children() {
if child3.is_element() {
print!("\n {:?}: ", child3.tag_name());
if child3.tag_name().name().to_string().as_str() == "MSG" {
for attr in child3.attributes() {
if attr.name() != "comment" {
print!("{:?}={:?} " , attr.name(), attr.value())
}
}
messages.push(child3);
}
}
}
}
}
}
}
}
}
}
}
}
family.push_messages(messages);
return family;
}
fn output(family: oop::Family) {
}

156
src/oop.rs Normal file
View file

@ -0,0 +1,156 @@
use phf::phf_ordered_map;
use crate::roxmltree::Node;
const MESSAGETYPE: phf::OrderedMap<&'static str, &'static str> = phf_ordered_map! {
"Request" => "requests",
"Response" => "responses",
"Command" => "commands",
"Status" => "statuses",
"Stream" => "streams",
};
#[derive(Debug)]
pub struct Family {
pub name: String,
pub genera: Vec<Genus>,
pub messages: Vec<Vec<String>>,
}
impl Family {
pub fn new(name: String, genera: Vec<Genus>, messages: Vec<Vec<String>>) -> Self {
Self { name, genera, messages }
}
pub fn push_genus(&mut self, genus: Genus) {
self.genera.push(genus);
}
pub fn push_messages(&mut self, messages: Messages) {
self.messages.push(messages.requests);
self.messages.push(messages.responses);
self.messages.push(messages.commands);
self.messages.push(messages.statuses);
self.messages.push(messages.streams);
}
}
#[derive(Debug)]
pub struct Genus {
pub name: String,
pub species: Vec<Species>,
}
impl Genus {
pub fn new(name: String, species: Vec<Species>) -> Self {
Self { name, species }
}
pub fn push(&mut self, species: Species) {
self.species.push(species);
}
}
#[derive(Debug)]
pub struct Species {
pub name: String,
default_value: String,
pub objects: Vec<Object>,
}
impl Species {
pub fn new(name: String, default_value: String, objects: Vec<Object>) -> Self {
Self { name, default_value, objects }
}
pub fn push(&mut self, object: Object) {
self.objects.push(object);
}
}
#[derive(Debug)]
pub struct Object {
pub name: String,
abrv: String,
version: String,
pub members: Vec<ObjectMember>,
}
impl Object {
pub fn new(name: String, abrv: String, version: String, members: Vec<ObjectMember>) -> Self {
Self { name, abrv, version, members }
}
pub fn push(&mut self, member: ObjectMember) {
self.members.push(member);
}
}
#[derive(Debug)]
pub struct ObjectMember {
member_type: String,
pub name: String,
minversion: String,
maxversion: String,
pub enumerations: Vec<MemberEnumeration>,
}
impl ObjectMember {
pub fn new(member_type: String, name: String, minversion: String, maxversion: String, enumerations: Vec<MemberEnumeration>) -> Self {
Self { member_type, name, minversion, maxversion, enumerations }
}
pub fn push(&mut self, enumeration: MemberEnumeration) {
self.enumerations.push(enumeration);
}
}
#[derive(Debug)]
pub struct MemberEnumeration {
name: String,
default_value: String,
}
impl MemberEnumeration {
pub fn new(name: String, default_value: String) -> Self {
Self { name, default_value }
}
}
#[derive(Debug)]
pub struct Messages {
pub requests: Vec<String>,
pub responses: Vec<String>,
pub commands: Vec<String>,
pub statuses: Vec<String>,
pub streams: Vec<String>,
error: String,
}
impl Messages {
pub fn new(requests: Vec<String>, responses: Vec<String>, commands: Vec<String>, statuses: Vec<String>, streams: Vec<String>) -> Self {
Self { requests, responses, commands, statuses, streams, error: String::from("") }
}
pub fn push(&mut self, message: Node<'_, '_>) {
if let Some(t) = message.attribute_node("type") {
let message_type = t.value();
if MESSAGETYPE.contains_key(message_type) {
if let Some(n) = message.attribute_node("name") {
let message_name = n.value();
match MESSAGETYPE.get_index(message_type).unwrap().to_string().as_str() {
"0" => self.requests.push(message_name.to_string()),
"1" => self.responses.push(message_name.to_string()),
"2" => self.commands.push(message_name.to_string()),
"3" => self.statuses.push(message_name.to_string()),
"4" => self.streams.push(message_name.to_string()),
_ => {
let error_position = format!("{}{}", "Error: Unrecognized message type at position ", n.position().to_string().as_str());
self.error.insert_str(0, error_position.as_str())
}
};
}
}
}
}
}