/// <summary> /// Retrieves the Product Code from a Morning Star Charge Controller /// </summary> /// <param name="messenger">The ModbusMessenger to perform the transaction on</param> /// <returns>The Product Code of the charge controller</returns> public static string GetProductCode(ModbusMessenger messenger) { ModbusMessage pc = messenger.ReadDeviceInformation(1, 1); return(System.Text.Encoding.ASCII.GetString(pc.DataPoints.ToArray())); }
/// <summary> /// Retrieves the Software Version from a Morning Star Charge Controller /// </summary> /// <param name="messenger">The ModbusMessenger to perform the transaction on</param> /// <returns>The Software Version of the charge controller</returns> public static string GetSoftwareVersion(ModbusMessenger messenger) { ModbusMessage mmr = messenger.ReadDeviceInformation(2, 1); return(System.Text.Encoding.ASCII.GetString(mmr.DataPoints.ToArray())); }
/// <summary> /// Retrieves the Vendor Name from a Morning Star Charge Controller /// </summary> /// <param name="messenger">The ModbusMessenger to perform the transaction on</param> /// <returns>The Vendor Name of the charge controller</returns> public static string GetVendorName(ModbusMessenger messenger) { ModbusMessage vn = messenger.ReadDeviceInformation(0, 1); return(System.Text.Encoding.ASCII.GetString(vn.DataPoints.ToArray())); }