1 // 2 // Copyright (c) 2010-2024 Antmicro 3 // Copyright (c) 2011-2015 Realtime Embedded 4 // 5 // This file is licensed under the MIT License. 6 // Full license text is available in 'licenses/MIT.txt'. 7 // 8 9 namespace Antmicro.Renode.Peripherals.Bus 10 { 11 public class BusRegistered<T> : IBusRegistered<T> where T : IBusPeripheral 12 { BusRegistered(T what, BusRangeRegistration where)13 public BusRegistered(T what, BusRangeRegistration where) 14 { 15 Peripheral = what; 16 RegistrationPoint = where; 17 } 18 ToString()19 public override string ToString() 20 { 21 return $"{Peripheral.GetName()} registered at {RegistrationPoint}"; 22 } 23 24 public T Peripheral { get; private set; } 25 public BusRangeRegistration RegistrationPoint { get; private set; } 26 27 } 28 } 29 30