예제 #1
0
파일: Node.cs 프로젝트: szymonwieloch/DTN
    void createElements(XmlNode configuration)
    {
        //create routing protocol
        XmlNode routingProtocolNode = XmlParser.GetChildNode(configuration, RoutingProtocol.RoutingProtocolTag);

        routingProtocol = RoutingProtocol.Create(routingProtocolNode, this);
        interfaces      = new NetworkInterfaces(this);
        //create data destination
        dataDestination = new DataDestination(this);

        //create bundle protocol instance
        XmlNode bundleProtocolNode = configuration[BundleInstance.BundleProtocolTag];

        if (bundleProtocolNode != null)
        {
            bundleInstance = new BundleInstance(bundleProtocolNode, this);
        }
        else
        {
            bundleInstance = new BundleInstance(this);
        }
        //create data source(if any requested)
        XmlNode dataSourceNode = configuration[DataSource.DataSourceTag];

        if (dataSourceNode != null)
        {
            dataSource = new DataSource(dataSourceNode, this);
        }
    }
예제 #2
0
//CONSTRUCTION
    public BundleBuffer(BundleInstance bundleInstance)
        : base(bundleInstance, bundleBufferTag)
    {
        this.bundleInstance = bundleInstance;
    }