/// <summary> /// Attempts to retrieve the Psu fault status registers. This method /// calls down to the Chassis Manager with SendReceive /// </summary> private PsuResponseBasePacket LogPsuFaultStatus(byte psuId) { // Initialize return packet PsuResponseBasePacket returnPacket = new PsuResponseBasePacket(); returnPacket.CompletionCode = CompletionCode.Success; try { PsuCommandByteResponse response = new PsuCommandByteResponse(); // STATUS_VOUT response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_VOUT, (byte)PmBusResponseLength.STATUS_VOUT), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_VOUT on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_VOUT: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } // STATUS_IOUT response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_IOUT, (byte)PmBusResponseLength.STATUS_IOUT), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_IOUT on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_IOUT: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } // STATUS_INPUT response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_INPUT, (byte)PmBusResponseLength.STATUS_INPUT), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_INPUT on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_INPUT: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } // STATUS_TEMPERATURE response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_TEMPERATURE, (byte)PmBusResponseLength.STATUS_TEMPERATURE), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_TEMPERATURE on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_TEMPERATURE: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } // STATUS_CML response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_CML, (byte)PmBusResponseLength.STATUS_CML), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_CML on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_CML: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } } catch (System.Exception ex) { returnPacket.CompletionCode = CompletionCode.UnspecifiedError; Tracer.WriteError("LogPsuFaultStatus Exception: " + ex); } return(returnPacket); }
/// <summary> /// Attempts to retrieve the Psu fault status registers. This method /// calls down to the Chassis Manager with SendReceive /// </summary> private PsuResponseBasePacket LogPsuFaultStatus(byte psuId) { // Initialize return packet PsuResponseBasePacket returnPacket = new PsuResponseBasePacket(); returnPacket.CompletionCode = CompletionCode.Success; try { PsuCommandByteResponse response = new PsuCommandByteResponse(); // STATUS_VOUT response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_VOUT, (byte)PmBusResponseLength.STATUS_VOUT), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_VOUT on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_VOUT: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } // STATUS_IOUT response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_IOUT, (byte)PmBusResponseLength.STATUS_IOUT), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_IOUT on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_IOUT: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } // STATUS_INPUT response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_INPUT, (byte)PmBusResponseLength.STATUS_INPUT), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_INPUT on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_INPUT: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } // STATUS_TEMPERATURE response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_TEMPERATURE, (byte)PmBusResponseLength.STATUS_TEMPERATURE), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_TEMPERATURE on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_TEMPERATURE: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } // STATUS_CML response = (PsuCommandByteResponse)this.SendReceive(this.PsuDeviceType, this.PsuId, new PsuRequest((byte)PmBusCommand.STATUS_CML, (byte)PmBusResponseLength.STATUS_CML), typeof(PsuCommandByteResponse)); if (response.CompletionCode != 0) { returnPacket.CompletionCode = (CompletionCode)response.CompletionCode; Tracer.WriteWarning("LogPsuFaultStatus: Failed to read STATUS_CML on PSU {0}: Completion Code: {1}", psuId, response.CompletionCode); } else { Tracer.WriteWarning("LogPsuFaultStatus: PSU {0} STATUS_CML: {1}", psuId, System.Convert.ToString(response.PsuByteResponse, 2).PadLeft(8, '0')); } } catch (System.Exception ex) { returnPacket.CompletionCode = CompletionCode.UnspecifiedError; Tracer.WriteError("LogPsuFaultStatus Exception: " + ex); } return returnPacket; }