001package jmri.jmrix.marklin;
002
003/**
004 * Define the interface for sending and receiving messages to the Marklin command
005 * station.
006 *
007 * @author Bob Jacobsen Copyright (C) 2001, 2008
008 */
009public interface MarklinInterface {
010
011    void addMarklinListener(MarklinListener l);
012
013    void removeMarklinListener(MarklinListener l);
014
015    /**
016     * Test operational status of interface.
017     *
018     * @return true is interface implementation is operational.
019     */
020    boolean status();
021
022    /**
023     * Send a message through the interface.
024     *
025     * @param m Message to be sent.
026     * @param l Listener to be notified of reply.
027     */
028    void sendMarklinMessage(MarklinMessage m, MarklinListener l);
029
030}