/// <summary> /// Get Rovio’s base firmware version, Rovio also has a UI version and a NS2 version this function only get the base OS version. /// </summary> /// <returns></returns> public FirmwareVersion GetVer() { //Version = Jan 12 2010 14:41:24 $Revision: 5.3503$ RovioResponse response = this.Request("/GetVer.cgi"); return(FirmwareVersion.Parse(response["Version"])); }
protected override void GetContentFromMessage(List <byte> payload) { byte[] data = payload.ToArray(); this.Firmware = ParseVersion(data.Skip(1).Take(47).ToArray()); this.RecoveryFirmware = ParseVersion(data.Skip(48).Take(47).ToArray()); }
public override void WriteConsole(ConsoleOutputStyle style) { ConsoleOutputStyle = style; WriteConsoleHeader(false); WriteConsoleEntry("Manufacturer ID", ManufacturerId.ToString()); WriteConsoleEntry("Manufacturer Name", ManufacturerName); WriteConsoleEntry("Manufacturer Model", ManufacturerModel.ToString()); WriteConsoleEntry("Specification version", SpecificationVersion); WriteConsoleEntry("Specification level", SpecificationLevel.ToString()); WriteConsoleEntry("Specification revision", SpecificationRevision.ToString()); WriteConsoleEntry("Specification date", SpecificationDate.ToString("d")); WriteConsoleEntry("Platform-specific family", PlatformSpecificFamily); WriteConsoleEntry("Platform specification level", PlatformSpecificationLevel.ToString()); WriteConsoleEntry("Platform specification revision", PlatformSpecificationRevision.ToString()); WriteConsoleEntry("Platform specification date", PlatformSpecificationDate.ToString("d")); WriteConsoleEntry("Firmware version", FirmwareVersion.ToString()); WriteConsoleEntry("Physical presence version", PhysicalPresenceVersion); WriteConsoleEntry("Memory management", MemoryManagement); WriteConsoleEntry("Supported modes", SupportedModes); WriteConsoleEntry("Permanent attributes", PermanentAttributes); WriteConsoleEntry("Startup attributes", StartupAttributes); }
public WallPlug(Node node, FirmwareVersion version = FirmwareVersion.Latest) : base(node) { Version = version; Node.GetCommandClass <SwitchBinary>().Changed += SwitchBinary_Changed; Node.GetCommandClass <SensorMultiLevel>().Changed += SensorMultiLevel_Changed; Node.GetCommandClass <Meter>().Changed += Meter_Changed; }
/// <summary> /// Computes the hash code for the current metadata object. /// </summary> /// <returns> /// The hash code for the current metadata object, extracted from a combination /// of hashes for the device name and various version numbers. /// </returns> public override int GetHashCode() { return(17 * DeviceName.GetHashCode() + 8971 * FirmwareVersion.GetHashCode() + 2803 * ProtocolVersion.GetHashCode() + 691 * HardwareVersion.GetHashCode() + 1409 * AssemblyNumber.GetHashCode() + 2333 * PrereleaseVersion.GetHashCode()); }
private async Task LoadFirmwareAsync() { FirmwareVersionResponse firmwareResponse = await Pebble.GetFirmwareVersionAsync(); if (firmwareResponse.Success) { Firmware = firmwareResponse.Firmware; RecoveryFirmware = firmwareResponse.RecoveryFirmware; } }
/// <summary> /// Determines whether the specified metadata object is equal to the current metadata. /// </summary> /// <param name="other">The metadata object to compare with the current metadata.</param> /// <returns> /// <b>true</b> if the specified metadata object is equal to the current metadata; /// otherwise, <b>false</b>. /// </returns> public bool Equals(FirmwareMetadata other) { if (other is null) { return(false); } return(DeviceName == other.DeviceName && FirmwareVersion.Equals(other.FirmwareVersion) && ProtocolVersion.Equals(other.ProtocolVersion) && HardwareVersion.Equals(other.HardwareVersion) && AssemblyNumber == other.AssemblyNumber && PrereleaseVersion == other.PrereleaseVersion); }
/// <summary> /// Return the HashCode of this object. /// </summary> /// <returns>The HashCode of this object.</returns> public override Int32 GetHashCode() { unchecked { return(ChargePointVendor.GetHashCode() * 31 ^ ChargePointModel.GetHashCode() * 29 ^ ChargePointSerialNumber.GetHashCode() * 23 ^ FirmwareVersion.GetHashCode() * 17 ^ Iccid.GetHashCode() * 11 ^ IMSI.GetHashCode() * 7 ^ MeterType.GetHashCode() * 5 ^ MeterSerialNumber.GetHashCode()); } }
private async Task LoadFirmwareAsync() { if (_pebble == null || _pebble.IsAlive == false) { return; } FirmwareVersionResponse firmwareResponse = await _pebble.GetFirmwareVersionAsync(); if (firmwareResponse.Success) { Firmware = firmwareResponse.Firmware; RecoveryFirmware = firmwareResponse.RecoveryFirmware; } }
/// <summary> /// Compares two boot notification requests for equality. /// </summary> /// <param name="BootNotificationRequest">A boot notification request to compare with.</param> /// <returns>True if both match; False otherwise.</returns> public override Boolean Equals(BootNotificationRequest BootNotificationRequest) { if ((Object)BootNotificationRequest == null) { return(false); } return(ChargePointVendor.Equals(BootNotificationRequest.ChargePointVendor) && ChargePointModel.Equals(BootNotificationRequest.ChargePointModel) && ChargePointSerialNumber.Equals(BootNotificationRequest.ChargePointSerialNumber) && FirmwareVersion.Equals(BootNotificationRequest.FirmwareVersion) && Iccid.Equals(BootNotificationRequest.Iccid) && IMSI.Equals(BootNotificationRequest.IMSI) && MeterType.Equals(BootNotificationRequest.MeterType) && MeterSerialNumber.Equals(BootNotificationRequest.MeterSerialNumber)); }
//private Result GetVersion( DEV_MODE r_mode ) private Result GetVersion() { MacBootLoaderVersion Version = new MacBootLoaderVersion(); Result result = Result.FAILURE; m_Mode = DEV_MODE.NO; FirmwareVersion ver = new FirmwareVersion(); result = m_clsInterface.API_MacGetFirmwareVersion(ref ver); ControlItem(ENUM_ITEM_TYPE.TEXT_VER, String.Format("[FW] {0}.{1}.{2}", ver.major, ver.minor, ver.release)); //ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, String.Format("[FW] {0}.{1}.{2}",ver.major,ver.minor,ver.release) ); //Show device type ControlItem(ENUM_ITEM_TYPE.TEXT_DEVICE, rfid.clsPacket.TRANS_API_AskDevType().ToString()); return(Result.OK); }
public OnuGeneric(uint oltId, uint oltPortId, uint oltOnuId, IResponseDescriptionDictionaries responseDescriptionDictionaries, IDataService snmpDataService) { _responseDescriptionDictionaries = responseDescriptionDictionaries; _snmpDataService = snmpDataService; OltId = oltId; OltPortId = oltPortId; OltOnuId = oltOnuId; ModelType = new ModelType(); DescriptionName = new DescriptionName(); GponSerialNumber = new GponSerialNumber(); GponProfile = new GponProfile(); FirmwareVersion = new FirmwareVersion(); OpticalConnectionState = new OpticalConnectionState(_responseDescriptionDictionaries); OpticalConnectionDeactivationReason = new OpticalConnectionDeactivationReason(_responseDescriptionDictionaries); OpticalPowerReceived = new OpticalPowerReceived(); OpticalCableDistance = new OpticalCableDistance(); OpticalConnectionUptime = new OpticalConnectionUptime(); OpticalConnectionInactiveTime = new OpticalConnectionInactiveTime(); SystemUptime = new SystemUptime(); BlockStatus = new BlockStatus(_responseDescriptionDictionaries); BlockReason = new BlockReason(_responseDescriptionDictionaries); ModelType.Value = _snmpDataService.GetStringPropertyAsync(oltId, SnmpOIDCollection.snmpOIDGetOnuModelType + "." + oltPortId + "." + oltOnuId).Result; DescriptionName.Value = _snmpDataService.GetStringPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuDescription + "." + oltPortId + "." + oltOnuId).Result; GponSerialNumber.Value = _snmpDataService.GetStringPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuGponSerialNumber + "." + oltPortId + "." + oltOnuId).Result; GponProfile.Value = _snmpDataService.GetStringPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuGponProfile + "." + oltPortId + "." + oltOnuId).Result; FirmwareVersion.Value = _snmpDataService.GetStringPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuFirmwareVersion + "." + oltPortId + "." + oltOnuId).Result; OpticalConnectionState.Value = _snmpDataService.GetIntPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuOpticalConnectionState + "." + oltPortId + "." + oltOnuId).Result; OpticalConnectionDeactivationReason.Value = _snmpDataService.GetIntPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuOpticalConnectionDeactivationReason + "." + oltPortId + "." + oltOnuId).Result; OpticalPowerReceived.Value = _snmpDataService.GetStringPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuOpticalPowerReceived + "." + oltPortId + "." + oltOnuId).Result; OpticalCableDistance.Value = _snmpDataService.GetIntPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuOpticalCabelDistance + "." + oltPortId + "." + oltOnuId).Result; OpticalConnectionUptime.Value = _snmpDataService.GetIntPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuOpticalConnectionUptime + "." + oltPortId + "." + oltOnuId).Result; OpticalConnectionInactiveTime.Value = _snmpDataService.GetIntPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuOpticalConnectionInactiveTime + "." + oltPortId + "." + oltOnuId).Result; SystemUptime.Value = _snmpDataService.GetIntPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuSystemUptime + "." + oltPortId + "." + oltOnuId).Result; BlockStatus.Value = _snmpDataService.GetIntPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuBlockStatus + "." + oltPortId + "." + oltOnuId).Result; BlockReason.Value = _snmpDataService.GetIntPropertyAsync(oltId, SnmpOIDCollection.snmpOIDOnuBlockReason + "." + oltPortId + "." + oltOnuId).Result; }
/// <summary> /// Return a JSON representation of this object. /// </summary> /// <param name="CustomBootNotificationRequestSerializer">A delegate to serialize custom boot notification requests.</param> public JObject ToJSON(CustomJObjectSerializerDelegate <BootNotificationRequest> CustomBootNotificationRequestSerializer = null) { var JSON = JSONObject.Create( new JProperty("chargePointVendor", ChargePointVendor), new JProperty("chargePointModel", ChargePointModel), ChargePointSerialNumber.IsNotNullOrEmpty() ? new JProperty("chargePointSerialNumber", ChargePointSerialNumber) : null, ChargeBoxSerialNumber.IsNotNullOrEmpty() ? new JProperty("chargeBoxSerialNumber", ChargeBoxSerialNumber) : null, FirmwareVersion.IsNotNullOrEmpty() ? new JProperty("firmwareVersion", FirmwareVersion) : null, Iccid.IsNotNullOrEmpty() ? new JProperty("iccid", Iccid) : null, IMSI.IsNotNullOrEmpty() ? new JProperty("imsi", IMSI) : null, MeterType.IsNotNullOrEmpty() ? new JProperty("meterType", MeterType) : null, MeterSerialNumber.IsNotNullOrEmpty() ? new JProperty("meterSerialNumber", MeterSerialNumber) : null ); return(CustomBootNotificationRequestSerializer != null ? CustomBootNotificationRequestSerializer(this, JSON) : JSON); }
/// <summary> /// Return the HashCode of this object. /// </summary> /// <returns>The HashCode of this object.</returns> public override Int32 GetHashCode() { unchecked { return(ChargePointVendor.GetHashCode() * 31 ^ ChargePointModel.GetHashCode() * 29 ^ (ChargePointSerialNumber != null ? ChargePointSerialNumber.GetHashCode() * 21 : 0) ^ (ChargeBoxSerialNumber != null ? ChargeBoxSerialNumber.GetHashCode() * 17 : 0) ^ (FirmwareVersion != null ? FirmwareVersion.GetHashCode() * 13 : 0) ^ (Iccid != null ? Iccid.GetHashCode() * 11 : 0) ^ (IMSI != null ? IMSI.GetHashCode() * 7 : 0) ^ (MeterType != null ? MeterType.GetHashCode() * 5 : 0) ^ (MeterSerialNumber != null ? MeterSerialNumber.GetHashCode() * 3 : 0)); } }
/// <summary> /// Return a JSON representation of this object. /// </summary> /// <param name="CustomEnergyMeterSerializer">A delegate to serialize custom energy meter JSON objects.</param> public JObject ToJSON(CustomJObjectSerializerDelegate <EnergyMeter> CustomEnergyMeterSerializer = null) { var JSON = JSONObject.Create( new JProperty("id", Id.ToString()), Model.IsNotNullOrEmpty() ? new JProperty("model", Model.ToString()) : null, HardwareVersion.IsNotNullOrEmpty() ? new JProperty("hardware_version", HardwareVersion.ToString()) : null, FirmwareVersion.IsNotNullOrEmpty() ? new JProperty("firmware_version", FirmwareVersion.ToString()) : null, Vendor.IsNotNullOrEmpty() ? new JProperty("vendor", Vendor.ToString()) : null, PublicKey.HasValue ? new JProperty("public_key", PublicKey.ToString()) : null, PublicKeyCertificate.IsNotNullOrEmpty() ? new JProperty("public_key_certificate", PublicKeyCertificate.ToString()) : null ); return(CustomEnergyMeterSerializer != null ? CustomEnergyMeterSerializer(this, JSON) : JSON); }
//private Result GetVersion( DEV_MODE r_mode ) private Result GetVersion() { MacBootLoaderVersion Version = new MacBootLoaderVersion(); Result result = Result.FAILURE; m_Mode = DEV_MODE.NO; FirmwareVersion ver = new FirmwareVersion(); result = m_clsInterface.API_MacGetFirmwareVersion(ref ver); ControlItem(ENUM_ITEM_TYPE.TEXT_VER, String.Format("[FW] {0}.{1}.{2}",ver.major,ver.minor,ver.release) ); //ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, String.Format("[FW] {0}.{1}.{2}",ver.major,ver.minor,ver.release) ); //Show device type ControlItem( ENUM_ITEM_TYPE.TEXT_DEVICE, rfid.clsPacket.TRANS_API_AskDevType().ToString() ); return Result.OK; }
protected override void Load( byte[] payload ) { Firmware = ParseVersion( payload.Skip( 1 ).Take( 47 ).ToArray() ); RecoveryFirmware = ParseVersion( payload.Skip( 48 ).Take( 47 ).ToArray() ); }
private Result GetVersion(DEV_MODE r_mode) { MacBootLoaderVersion Version = new MacBootLoaderVersion(); Result result = Result.FAILURE; m_Mode = DEV_MODE.NO; switch (r_mode) { case DEV_MODE.AP: #if _TRACE_OUT_PUT m_clsInterface.PrintMagToTxt("====== Get FW AP Version======"); #endif FirmwareVersion ver = new FirmwareVersion(); result = m_clsInterface.API_MacGetFirmwareVersion(ref ver); if (Result.OK != result) { //ControlItem(ENUM_ITEM_TYPE.STATUS, "Can't get AP version"); return(result); } ControlItem(ENUM_ITEM_TYPE.TEXT_VER, String.Format("[AP] {0}.{1}.{2}", ver.major, ver.minor, ver.release)); ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, String.Format("[AP] {0}.{1}.{2}", ver.major, ver.minor, ver.release)); m_Mode = DEV_MODE.AP; break; case DEV_MODE.BL: #if _TRACE_OUT_PUT m_clsInterface.PrintMagToTxt("====== Get BL AP Version======"); #endif result = m_clsInterface.API_UpdataGetVersion(ref Version); if (Result.OK != result) { //ControlItem(ENUM_ITEM_TYPE.STATUS, "Can't get bootloader version"); return(result); } ControlItem(ENUM_ITEM_TYPE.TEXT_VER, String.Format("[BL] {0}.{1}.{2}", Version.major, Version.minor, Version.release)); ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, String.Format("[BL] {0}.{1}.{2}", Version.major, Version.minor, Version.release)); m_Mode = DEV_MODE.BL; break; case DEV_MODE.BL_ENTER_UPDATE: #if _TRACE_OUT_PUT m_clsInterface.PrintMagToTxt("====== Get BL_ENTER_UPDATE Version======"); #endif //result = m_clsInterface.API_UpdataGetVersion(ref Version); //if (result != Result.OK && result != Result.FWUPD_CMD_IGN) //{ // //ControlItem(ENUM_ITEM_TYPE.STATUS, "Can't get bootloader version"); // return result; //} ControlItem(ENUM_ITEM_TYPE.TEXT_VER, "[BL] Update Mode."); ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, "Enter update Mode."); m_Mode = DEV_MODE.BL_ENTER_UPDATE; break; default: m_Mode = DEV_MODE.NO; return(Result.FAILURE); break; } //Show device type ControlItem(ENUM_ITEM_TYPE.TEXT_DEVICE, rfid.clsPacket.TRANS_API_AskDevType().ToString()); return(Result.OK); }
private Result GetVersion( DEV_MODE r_mode ) { MacBootLoaderVersion Version = new MacBootLoaderVersion(); Result result = Result.FAILURE; m_Mode = DEV_MODE.NO; switch (r_mode) { case DEV_MODE.AP: #if _TRACE_OUT_PUT m_clsInterface.PrintMagToTxt("====== Get FW AP Version======"); #endif FirmwareVersion ver = new FirmwareVersion(); result = m_clsInterface.API_MacGetFirmwareVersion(ref ver); if (Result.OK != result) { //ControlItem(ENUM_ITEM_TYPE.STATUS, "Can't get AP version"); return result; } ControlItem(ENUM_ITEM_TYPE.TEXT_VER, String.Format("[AP] {0}.{1}.{2}",ver.major,ver.minor,ver.release) ); ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, String.Format("[AP] {0}.{1}.{2}",ver.major,ver.minor,ver.release) ); m_Mode = DEV_MODE.AP; break; case DEV_MODE.BL: #if _TRACE_OUT_PUT m_clsInterface.PrintMagToTxt("====== Get BL AP Version======"); #endif result = m_clsInterface.API_UpdataGetVersion(ref Version); if (Result.OK != result) { //ControlItem(ENUM_ITEM_TYPE.STATUS, "Can't get bootloader version"); return result; } ControlItem(ENUM_ITEM_TYPE.TEXT_VER, String.Format("[BL] {0}.{1}.{2}",Version.major,Version.minor,Version.release) ); ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, String.Format("[BL] {0}.{1}.{2}",Version.major,Version.minor,Version.release) ); m_Mode = DEV_MODE.BL; break; case DEV_MODE.BL_ENTER_UPDATE: #if _TRACE_OUT_PUT m_clsInterface.PrintMagToTxt("====== Get BL_ENTER_UPDATE Version======"); #endif //result = m_clsInterface.API_UpdataGetVersion(ref Version); //if (result != Result.OK && result != Result.FWUPD_CMD_IGN) //{ // //ControlItem(ENUM_ITEM_TYPE.STATUS, "Can't get bootloader version"); // return result; //} ControlItem(ENUM_ITEM_TYPE.TEXT_VER, "[BL] Update Mode." ); ControlItem(ENUM_ITEM_TYPE.TEXT_STATUS, "Enter update Mode." ); m_Mode = DEV_MODE.BL_ENTER_UPDATE; break; default: m_Mode = DEV_MODE.NO; return Result.FAILURE; break; } //Show device type ControlItem( ENUM_ITEM_TYPE.TEXT_DEVICE, rfid.clsPacket.TRANS_API_AskDevType().ToString() ); return Result.OK; }
/// <summary> /// Returns the Hash code of this object. /// </summary> /// <returns>The Hash code of this object.</returns> public override int GetHashCode() { return(HardwareVersion.GetHashCode() + FirmwareVersion.GetHashCode()); }
public CreateIPSWFirmwareClickedEventArgs(FirmwareVersion firmwareVersion) { FirmwareVersion = firmwareVersion; }
protected override void Load(byte[] payload) { Firmware = ParseVersion(payload.Skip(1).Take(47).ToArray()); RecoveryFirmware = ParseVersion(payload.Skip(48).Take(47).ToArray()); }
public DslDataReader(string sessionId, FirmwareVersion version, string ipAddress = "192.168.1.1") { this.sessionId = sessionId; this.version = version; this.ipAddress = ipAddress; }