/* * config sensor sdr in here. * Author:Jimbo */ #include #include #include "com_IPMI_SDRRecord.h" /* * sdr table */ const MgmtCtrlrDevLocator_T bmc_sdr = { /* SDR Record Header */ { 0x01, //Record ID 0x51, //SDR Version MGMT_CTRL_DEV_LOCATOR_SDR_REC, //Record Type 11+MAX_ID_STR_LEN, //Record Length = 11+string length }, /* Record Key Bytes*/ 0x20, /* Slave address - 0x20 Primary BMC */ 0x00, /* ChannelNumber - 0x00 Primary BMC */ /* Record Body Bytes*/ 0x0, /* power state notification */ 0xff, /* Device Capablities */ {0, 0, 0,}, /* RESERVED */ 0x0, /* Entity ID */ 0x1, /* Entity Instance */ 0x0, /* OEM */ 0xc0 +MAX_ID_STR_LEN, /* ID String Type / Length Code */ "STM32F429_BMC" }; /***************** Attation ************************ * , must be modified!!! **************************************************/ const FullSensorRec_T full_sdr_tbl[] = { /* * sensor number: 1 * sensor name: ltc2990_Temp * brief: ltc2990 internal temperature */ { /* SDR Record Header */ { 0x02, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x01, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x1, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 0x1, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0x0<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0x7f, //Normal Maximum 0x80, //Normal Minimum 0x7f, //Sensor Maximum Reading 0x80, //Sensor Minimum Reading 0x7f, //Upper Non-Recoverable Threshold 0x7f, //Upper Critical Threshold 0x7f, //Upper Non-Critical Threshold 0x80, //Lower Non-Recoverable Threshold 0x80, //Lower Critical Threshold 0x80, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2990_Temp" }, /* * sensor number: 2 * sensor name: ltc2990_VCC * brief: ltc2990 supply */ { /* SDR Record Header */ { 0x03, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x02, //Sensor Number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x4, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization /* M = 0x12e x 10^-4 */ 195, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 25, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (uint8_t)(0xfc<<4)+(0x3&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0xff, //Normal Maximum 0x00, //Normal Minimum 0xff, //Sensor Maximum Reading 0x00, //Sensor Minimum Reading 0xff, //Upper Non-Recoverable Threshold 0xff, //Upper Critical Threshold 0xff, //Upper Non-Critical Threshold 0x00, //Lower Non-Recoverable Threshold 0x00, //Lower Critical Threshold 0x00, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2990_VCC" }, /* * sensor number: 3 * sensor name: ltc2990_V1_+5V * brief: ltc2990 V1 */ { /* SDR Record Header */ { 0x04, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x03, //Sensor Number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x5, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization /* M = 0x12e x 10^-4 */ 391&0xff, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((391>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0xff, //Normal Maximum 0x00, //Normal Minimum 0xff, //Sensor Maximum Reading 0x00, //Sensor Minimum Reading 0xff, //Upper Non-Recoverable Threshold 0xff, //Upper Critical Threshold 0xff, //Upper Non-Critical Threshold 0x0, //Lower Non-Recoverable Threshold 0x0, //Lower Critical Threshold 0x0, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2990_V1_+5V" }, /* * sensor number: 4 * sensor name: ltc2990_V2_+5V * brief: ltc2990 V2 */ { /* SDR Record Header */ { 0x05, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x04, //Sensor Number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x5, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization /* M = 0x12e x 10^-4 */ 391&0xff, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((391>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0xff, //Normal Maximum 0x00, //Normal Minimum 0xff, //Sensor Maximum Reading 0x00, //Sensor Minimum Reading 0xff, //Upper Non-Recoverable Threshold 0xff, //Upper Critical Threshold 0xff, //Upper Non-Critical Threshold 0x0, //Lower Non-Recoverable Threshold 0x0, //Lower Critical Threshold 0x0, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2990_V2_+5V" }, /* * sensor number: 5 * sensor name: ltc2990_TR2_Temp * brief: ltc2990 TR2 */ { /* SDR Record Header */ { 0x06, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x05, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x1, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 0x1, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0x0<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0x7f, //Normal Maximum 0x80, //Normal Minimum 0x7f, //Sensor Maximum Reading 0x80, //Sensor Minimum Reading 0x7f, //Upper Non-Recoverable Threshold 0x7f, //Upper Critical Threshold 0x7f, //Upper Non-Critical Threshold 0x80, //Lower Non-Recoverable Threshold 0x80, //Lower Critical Threshold 0x80, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2990_TR2_Temp" }, /* * sensor number: 6 * sensor name: Current_+3.3V * brief: adc_ch1, STMC109 */ { /* SDR Record Header */ { 0x07, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x06, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x5, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 55, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0xfc<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0xff, //Normal Maximum 0x00, //Normal Minimum 0xff, //Sensor Maximum Reading 0x00, //Sensor Minimum Reading 0xff, //Upper Non-Recoverable Threshold 0xff, //Upper Critical Threshold 0xff, //Upper Non-Critical Threshold 0x00, //Lower Non-Recoverable Threshold 0x00, //Lower Critical Threshold 0x00, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "Current_+3.3V" }, /* * sensor number: 7 * sensor name: ltc2991_Temp * brief: ltc2991 internal temperature */ { /* SDR Record Header */ { 0x08, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x07, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x1, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 0x1, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0x0<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0x7f, //Normal Maximum 0x80, //Normal Minimum 0x7f, //Sensor Maximum Reading 0x80, //Sensor Minimum Reading 0x7f, //Upper Non-Recoverable Threshold 0x7f, //Upper Critical Threshold 0x7f, //Upper Non-Critical Threshold 0x80, //Lower Non-Recoverable Threshold 0x80, //Lower Critical Threshold 0x80, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2991_Temp" }, /* * sensor number: 8 * sensor name: ltc2991_VCC * brief: ltc2991 supply */ { /* SDR Record Header */ { 0x09, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x08, //Sensor Number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x4, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization /* M = 0x12e x 10^-4 */ 195, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 25, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (uint8_t)(0xfc<<4)+(0x3&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0xff, //Normal Maximum 0x00, //Normal Minimum 0xff, //Sensor Maximum Reading 0x00, //Sensor Minimum Reading 0xff, //Upper Non-Recoverable Threshold 0xff, //Upper Critical Threshold 0xff, //Upper Non-Critical Threshold 0x00, //Lower Non-Recoverable Threshold 0x00, //Lower Critical Threshold 0x00, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2991_VCC" }, /* * sensor number: 9 * sensor name: ltc2991_V3_+5V * brief: ltc2991 V3 */ { /* SDR Record Header */ { 0x0A, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x09, //Sensor Number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x4, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization /* M = 0x12e x 10^-4 */ 391&0xff, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((391>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0xff, //Normal Maximum 0x00, //Normal Minimum 0xff, //Sensor Maximum Reading 0x00, //Sensor Minimum Reading 0xff, //Upper Non-Recoverable Threshold 0xff, //Upper Critical Threshold 0xff, //Upper Non-Critical Threshold 0x0, //Lower Non-Recoverable Threshold 0x0, //Lower Critical Threshold 0x0, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2991_V3_+5V" }, /* * sensor number: 10 * sensor name: ltc2991_V4_+5V * brief: ltc2991 V4 */ { /* SDR Record Header */ { 0x0B, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 0x0A, //Sensor Number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x02, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x0<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x4, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization /* M = 0x12e x 10^-4 */ 391&0xff, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((391>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (uint8_t)(0xfc<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0xff, //Normal Maximum 0x00, //Normal Minimum 0xff, //Sensor Maximum Reading 0x00, //Sensor Minimum Reading 0xff, //Upper Non-Recoverable Threshold 0xff, //Upper Critical Threshold 0xff, //Upper Non-Critical Threshold 0x0, //Lower Non-Recoverable Threshold 0x0, //Lower Critical Threshold 0x0, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2990_V4_+5V" }, /* * sensor number: 11 * sensor name: ltc2991_TR3_Temp * brief: ltc2991 TR3 */ { /* SDR Record Header */ { 0x0C, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 11, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x1, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 0x1, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0x0<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0x7f, //Normal Maximum 0x80, //Normal Minimum 0x7f, //Sensor Maximum Reading 0x80, //Sensor Minimum Reading 0x7f, //Upper Non-Recoverable Threshold 0x7f, //Upper Critical Threshold 0x7f, //Upper Non-Critical Threshold 0x80, //Lower Non-Recoverable Threshold 0x80, //Lower Critical Threshold 0x80, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2991_TR3_Temp" }, /* * sensor number: 12 * sensor name: ltc2991_TR4_Temp * brief: ltc2991 TR4 */ { /* SDR Record Header */ { 0x0D, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 12, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x1, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 0x1, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0x0<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0x7f, //Normal Maximum 0x80, //Normal Minimum 0x7f, //Sensor Maximum Reading 0x80, //Sensor Minimum Reading 0x7f, //Upper Non-Recoverable Threshold 0x7f, //Upper Critical Threshold 0x7f, //Upper Non-Critical Threshold 0x80, //Lower Non-Recoverable Threshold 0x80, //Lower Critical Threshold 0x80, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "ltc2991_TR4_Temp" }, /* * sensor number: 13 * sensor name: LM75A_Temp * brief: */ { /* SDR Record Header */ { 14, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 13, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x1, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 0x1, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0x0<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0x7f, //Normal Maximum 0x80, //Normal Minimum 0x7f, //Sensor Maximum Reading 0x80, //Sensor Minimum Reading 0x7f, //Upper Non-Recoverable Threshold 0x7f, //Upper Critical Threshold 0x7f, //Upper Non-Critical Threshold 0x80, //Lower Non-Recoverable Threshold 0x80, //Lower Critical Threshold 0x80, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "LM75A_Temp" }, /* * sensor number: 14 * sensor name: LM73_Temp * brief: */ { /* SDR Record Header */ { 15, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 14, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x1, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 0x1, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0x0<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0x7f, //Normal Maximum 0x80, //Normal Minimum 0x7f, //Sensor Maximum Reading 0x80, //Sensor Minimum Reading 0x7f, //Upper Non-Recoverable Threshold 0x7f, //Upper Critical Threshold 0x7f, //Upper Non-Critical Threshold 0x80, //Lower Non-Recoverable Threshold 0x80, //Lower Critical Threshold 0x80, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "LM73_Temp" }, /* * sensor number: 15 * sensor name: NST175_Temp * brief: NST175 */ { /* SDR Record Header */ { 16, //Record ID === !!!!!!!! === 0x51, //SDR Version FULL_SDR_REC, //Record Type 43+MAX_ID_STR_LEN, //Record Length = 43+string length }, /* Record Key Bytes */ 0x20, //Sensor Owner ID 0x0, //Sensor Owner LUN 15, //Sensor number === !!!!!!!! === /* Record Body Bytes */ 0x7, //Entity ID 0x1, //Entity Instance 0x7f, //Entity Initialization 0x68, //Sensor Capabilities 0x01, //Sensor Type: 01-temperature, 02-voltage, 03-current, 04-fan 0x01, //Event / Reading Type 0x7a95, //Lower Threshold Reading Mask 0x7a95, //Upper Threshold Reading Mask 0x3f3f, //Settable / Readable Threshold Mask /* [7:6] - Analog (numeric) Data Format** 00b = unsigned 01b = 1's complement(singed) 10b = 2's complement(singed) 11b = Does not return analog (numeric) reading [5:3] - Rate unit 000b = none 001b = per µS 010b = per ms 011b = per s 100b = per minute 101b = per hour 110b = per day 111b = reserved [2:1] - Modifier unit 00b = none 01b = Basic Unit / Modifier Unit 10b = Basic Unit * Modifier Unit 11b = reserved [0] - Percentage 0b = no, 1b = yes */ (0x2<<6)+(0x0<<3)+(0x0<<1)+0x0, //Sensor Units 1 /* 0 unspecified 1 degrees C 2 degrees F 3 degrees K 4 Volts 5 Amps */ 0x1, //Sensor Units 2 - Base Unit 0x0, //Sensor Units 3 - Modifier Unit 0x0, //Linerization 0x1, //M_LSB === !!!!!!!! === /* [7:6] - M: MS 2 bits [5:0] - Tolerance: 6 bits, unsigned (Tolerance in +/- ½ raw counts) */ ((0x0>>2)&0xC0)+(0x0&0x3F), //M,Tolerance === !!!!!!!! === 0x0, //B_LSB /* [7:6] - B: MS 2 bits Unsigned, 10-bit Basic Sensor Accuracy in 1/100 percent scaled up by unsigned Accuracy exponent: [5:0] - Accuracy: LS 6 bits */ ((0x0>>2)&0xC0)+(0x0&0x3F), //B,Accuracy ((0x0>>2)&0xF0)+(0x0&0x0C)+0x0, //Accuracy,Accuracy exponent (0x0<<4)+(0x0&0x0F), //R exponent,B exponent === !!!!!!!! === 0x0, //Analog Characteristics Flags 0x7f, //Nominal Reading 0x7f, //Normal Maximum 0x80, //Normal Minimum 0x7f, //Sensor Maximum Reading 0x80, //Sensor Minimum Reading 0x7f, //Upper Non-Recoverable Threshold 0x7f, //Upper Critical Threshold 0x7f, //Upper Non-Critical Threshold 0x80, //Lower Non-Recoverable Threshold 0x80, //Lower Critical Threshold 0x80, //Lower Non-Critical threshold 0x1, //Positive - threshold Hysteresis value 0x1, //Negative - threshold Hysteresis value 0x0, //Reserved 0x0, //Reserved 0x0, //OEM 0xC0+MAX_ID_STR_LEN, //ID String Type / Length Code "NST175_Temp" } }; const CompactSensorRec_T Compact_sdr_tbl[] = { {0}, //dummy sensor, make compiler happy. };