示例#1
0
    /// <summary>
    ///   BusController constructor
    /// </summary>
    /// <param name="address">Node address</param>
    /// <param name="ports">HBus communication ports</param>
    public BusController(Address address, Port[] ports)
    {
      Status = BusStatus.Reset;
      Address = address;
      _ports = ports;

      foreach (var port in _ports)
        port.MessageReceived += MessageReceived;

      Status = BusStatus.Ready;
    }
示例#2
0
 /// <summary>
 ///   BusController 1 port contructor
 /// </summary>
 /// <param name="address">Node address</param>
 /// <param name="port">HBus communication single port</param>
 public BusController(Address address, Port port)
   : this(address, new[] {port})
 {
 }