All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zepben.evolve.services.network.tracing.connectivity.ConnectedEquipmentTraversal.kt Maven / Gradle / Ivy

There is a newer version: 0.24.0rc1
Show newest version
/*
 * Copyright 2022 Zeppelin Bend Pty Ltd
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

package com.zepben.evolve.services.network.tracing.connectivity

import com.zepben.evolve.cim.iec61970.base.core.ConductingEquipment
import com.zepben.evolve.services.network.tracing.traversals.BasicTraversal
import com.zepben.evolve.services.network.tracing.traversals.Tracker
import com.zepben.evolve.services.network.tracing.traversals.TraversalQueue

/**
 * Traversal of [ConductingEquipmentStep] which wraps [BasicTraversal] for the purposes of starting directly from [ConductingEquipment].
 */
class ConnectedEquipmentTraversal(
    queueNext: QueueNext,
    queue: TraversalQueue,
    tracker: Tracker
) : BasicTraversal(queueNext, queue, tracker) {

    /**
     * Helper function to start the traversal from a [ConductingEquipment] without needing to explicitly creating the [ConductingEquipmentStep].
     *
     * @param conductingEquipment THe [ConductingEquipment] to start from.
     */
    @JvmOverloads
    fun run(conductingEquipment: ConductingEquipment, canStopOnStartItem: Boolean = true): Unit =
        run(ConductingEquipmentStep(conductingEquipment), canStopOnStartItem)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy