public void AddDevice(IGPIBDevice device) { if (_devices.Contains(device)) { throw new InvalidOperationException("This component has already been added to the GPIB bus."); } _devices.Add(device); _deviceDispatch[device.DeviceID] = device; }
private GPIBBus() { _deviceDispatch = new IGPIBDevice[16]; _devices = new List <IGPIBDevice>(16); // // Attach devices. This should eventually be configurable, // though I have no idea what aside from the BitPadOne digitizer we'd // ever expect to support. (Actually, the POS Print command supports // at least one GPIB-connected printer... dot-matrix baby!) // AddDevice(new BitPadOne()); Reset(); }