// Creates a port description from the specified port. private PortDescription description(Port p) { switch (p.type()) { case OMS: OmsPort op = (OmsPort) p; return new OmsPortDescription( op.number(), op.isEnabled(), op.minFrequency(), op.maxFrequency(), op.grid()); case OCH: OchPort ochp = (OchPort) p; return new OchPortDescription( ochp.number(), ochp.isEnabled(), ochp.signalType(), ochp.isTunable(), ochp.lambda()); case ODUCLT: OduCltPort odup = (OduCltPort) p; return new OduCltPortDescription(odup.number(), odup.isEnabled(), odup.signalType()); default: return new DefaultPortDescription(p.number(), p.isEnabled(), p.type(), p.portSpeed()); } }
// Creates a port description from the specified port. private PortDescription description(Port p) { return new DefaultPortDescription(p.number(), p.isEnabled(), p.type(), p.portSpeed()); }