本文整理汇总了Java中org.onosproject.ospf.controller.LinkInformation.setLinkSrcIdNotRouterId方法的典型用法代码示例。如果您正苦于以下问题:Java LinkInformation.setLinkSrcIdNotRouterId方法的具体用法?Java LinkInformation.setLinkSrcIdNotRouterId怎么用?Java LinkInformation.setLinkSrcIdNotRouterId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.onosproject.ospf.controller.LinkInformation
的用法示例。
在下文中一共展示了LinkInformation.setLinkSrcIdNotRouterId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addLocalLink
import org.onosproject.ospf.controller.LinkInformation; //导入方法依赖的package包/类
/**
* Adds link information to LinkInformationMap.
*
* @param advertisingRouter advertising router
* @param linkData link data address
* @param linkSrc link source address
* @param linkDest link destination address
* @param opaqueEnabled opaque enabled or not
* @param linkSrcIdNotRouterId link source id or not
*/
public void addLocalLink(String advertisingRouter, Ip4Address linkData, Ip4Address linkSrc, Ip4Address linkDest,
boolean opaqueEnabled, boolean linkSrcIdNotRouterId) {
String linkKey = "link:";
LinkInformation linkInformation = new LinkInformationImpl();
linkInformation.setLinkId(advertisingRouter);
linkInformation.setLinkSourceId(linkSrc);
linkInformation.setLinkDestinationId(linkDest);
linkInformation.setAlreadyCreated(false);
linkInformation.setLinkSrcIdNotRouterId(linkSrcIdNotRouterId);
linkInformation.setInterfaceIp(linkData);
if (linkDest != null) {
linkInformation.setLinkSrcIdNotRouterId(false);
}
linkKey = linkKey + "-" + linkSrc + "-" + linkDest;
setLinkInformationMap(linkKey, linkInformation);
}
示例2: addLocalLinkForPointToPoint
import org.onosproject.ospf.controller.LinkInformation; //导入方法依赖的package包/类
/**
* Adds link information to LinkInformationMap for PointToPoint.
*
* @param advertisingRouter advertising router
* @param linkData link data
* @param linkSrc link source
* @param linkDest link destination
* @param opaqueEnabled whether opaque is enabled or not
* @param linkSrcIdNotRouterId whether link is source id or router id
*/
public void addLocalLinkForPointToPoint(String advertisingRouter, Ip4Address linkData, Ip4Address linkSrc,
Ip4Address linkDest, boolean opaqueEnabled, boolean linkSrcIdNotRouterId) {
String linkKey = "link:";
LinkInformation linkInformation = new LinkInformationImpl();
linkInformation.setLinkId(advertisingRouter);
linkInformation.setLinkSourceId(linkSrc);
linkInformation.setLinkDestinationId(linkDest);
linkInformation.setAlreadyCreated(false);
linkInformation.setLinkSrcIdNotRouterId(linkSrcIdNotRouterId);
linkInformation.setInterfaceIp(linkData);
if (linkDest != null) {
linkInformation.setLinkSrcIdNotRouterId(false);
}
linkKey = linkKey + "-" + linkSrc + "-" + linkDest;
setLinkInformationMapForPointToPoint(linkKey, linkInformation);
}