001package jmri.jmrit.logixng;
002
003/**
004 * A LogixNG item that is debugable.
005 * 
006 * @author Daniel Bergqvist Copyright 2019
007 */
008public interface Debugable extends Base {
009
010    /**
011     * Set the debug configuration for this male socket.
012     * <P>
013     * Each implementation of MaleSocket has their own implementation of
014     * DebugConfig. Use reflection to get the proper class
015     * &lt;package-name&gt;.debug.&lt;ClassName&gt;Debug that returns a JPanel
016     * that can configure debugging for this male socket.
017     * 
018     * @param config the new configuration or null to turn off debugging
019     */
020    void setDebugConfig(DebugConfig config);
021
022    /**
023     * Get the debug configuration for this male socket.
024     * 
025     * @return the configuration or null if debugging is turned off for this male socket
026     */
027    DebugConfig getDebugConfig();
028
029    /**
030     * Create a debug configuration for this male socket.
031     * 
032     * @return the new configuration
033     */
034    DebugConfig createDebugConfig();
035
036    /**
037     * Debug configuration for this male socket.
038     * <P>
039     * In some cases, it may be desirable to be able to execute the LogixNG
040     * without fully working agains the layout. For example, when developing
041     * a LogixNG for a club layout, it may be desirable to be able to run the
042     * LogixNG without affecting turnouts on the layout while testing the
043     * LogixNG.
044     */
045    interface DebugConfig {
046        
047        DebugConfig getCopy();
048        
049    }
050    
051}