001package jmri.jmrix.bidib; 002 003import java.util.Set; 004import org.bidib.jbidibc.core.MessageListener; 005import org.bidib.jbidibc.core.NodeListener; 006import org.bidib.jbidibc.core.node.listener.TransferListener; 007import org.bidib.jbidibc.messages.ConnectionListener; 008import org.bidib.jbidibc.messages.helpers.Context; 009 010/** 011 * 012 * @author Eckart Meyer Copyright (C) 2023 013 */ 014public interface BiDiBPortController extends jmri.jmrix.PortAdapter { 015 016 /** 017 * Get the physical port name used with jbidibc 018 * 019 * @return physical port name 020 */ 021 public String getRealPortName(); 022 023 /** 024 * Register all Listeners to the specific BiDiB Object. 025 * We need this here since the BidibInterface does not 026 * provide this method. 027 * 028 * @param connectionListener register to this 029 * @param nodeListeners listeners to add 030 * @param messageListeners listeners to add 031 * @param transferListeners listeners to add 032 */ 033 public abstract void registerAllListeners(ConnectionListener connectionListener, Set<NodeListener> nodeListeners, 034 Set<MessageListener> messageListeners, Set<TransferListener> transferListeners); 035 036 /** 037 * Get the Bidib adapter context 038 * 039 * @return Context 040 */ 041 public Context getContext(); 042}