Example #1
0
        public void TestInit()
        {
            var policies = new Policies();

            var sub20Interfaces = new Sub20Interfaces();

            _s20 = new CSub20(Sub20SerialNumber, sub20Interfaces);

            II2C i2C = new Sub20I2C(_s20);
            var  gpioConfiguration = new GpioConfiguration(0x00380000, 0x00380000);
            var  gpio = new Sub20Gpio(_s20, gpioConfiguration);

            gpio.GpioInitialize();
            var dutGpio = new DutGpio.DutGpio(null, gpio, new DutGpioBits(16, 17, 18));

            var modPres = dutGpio.ModPresentAsserted;

            Assert.IsTrue(modPres);

            var deviceIO    = new DeviceIO(i2C, dutGpio, policies.PolicyWrap);
            var cyclops     = new Cyclops(deviceIO);
            var qsfp100GFRS = new Qsfp100G(deviceIO);
            var maCom       = new MaCom(deviceIO);

            _module = new Module(deviceIO, qsfp100GFRS, cyclops, maCom, policies.PolicyWrap);
        }
Example #2
0
        public static Module ModuleFactory(ISub20 sub20, AsyncPolicyWrap policyWrap)
        {
            var i2C = new Sub20I2C(sub20);

            var   gpioConfiguration = new GpioConfiguration(0x00380000, 0x00380000);
            IGpio gpio = new Sub20Gpio(sub20, gpioConfiguration);

            gpio.GpioInitialize();
            var dutGpio = new DutGpio.DutGpio(null, gpio, new DutGpioBits(16, 17, 18));

            var deviceIO    = new DeviceIO(i2C, dutGpio, policyWrap);
            var cyclops     = new Cyclops.Cyclops(deviceIO);
            var qsfp100GFRS = new Qsfp100G(deviceIO);
            var macom       = new MaCom.MaCom(deviceIO);
            var module      = new Module(deviceIO, qsfp100GFRS, cyclops, macom, policyWrap);

            return(module);
        }