public IBoard CreateDriver(string driverType, ILog logger, Dictionary <string, string> param) { _log = logger; IBoard driver = null; switch (driverType.Trim()) { case "TEST_TYPE": driver = new TestType(param, _log); break; case "CFP8TOSA": driver = new Cfp8Tosa(param, _log); break; case "TOSA25G": driver = new Tosa25G(param, _log); break; case "QSFP28G_TEC": driver = new Qsfp28G(param, _log); break; case "QSFP28G_NOTEC": driver = new Qsfp28GNoTec(param, _log); break; case "TOSA32G": driver = new Tosa32G(param, _log); break; case "CFP4": //driver = new QSFP28GNoTec(param, _log); break; case "IQMGenI": driver = new IqmGenI(param, _log); break; case "PARALLEL_QSFP28G_INTERNAL": var vbmsAddr = VbmsDriverAddr.Inst(); var cmd = VbmsCmd.Inst(); var parallelProtocol = ParallelProtocolQsfp28G.Inst(vbmsAddr, cmd); driver = new ParallelQsfp28(param, parallelProtocol, _log); break; default: _log.Error("BiBsp don't support the driver:" + driverType); break; } return(driver); }
public void TestMethodGetCocTypeBySn() { var drvCfp8Tosa = new Cfp8Tosa(CreateParam, MockIlog()); string[] info; string msg; const string sn = "TW1729J04-07"; var mes = new MesServiceClient(); mes.GetCocInfoBySn(sn, out info, out msg); var bhType = drvCfp8Tosa.GetCocTypeBySn("TW1729J04-07", info); Assert.AreEqual(bhType, "BH1"); }
public void TestMethodConstruct() { var drvCfp8Tosa = new Cfp8Tosa(CreateParam, MockIlog()); Assert.AreNotEqual(drvCfp8Tosa, null); }