001package jmri.jmrix.ecos; 002 003/** 004 * Define interface for sending and receiving messages to the ECoS command 005 * station. 006 * 007 * @author Bob Jacobsen Copyright (C) 2001, 2008 008 */ 009public interface EcosInterface { 010 011 void addEcosListener(EcosListener l); 012 013 void removeEcosListener(EcosListener 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 sendEcosMessage(EcosMessage m, EcosListener l); 029 030}