001package jmri.jmrix.marklin.simulation; 002 003import jmri.jmrix.marklin.MarklinListener; 004import jmri.jmrix.marklin.MarklinMessage; 005import jmri.jmrix.marklin.MarklinReply; 006 007/** 008 * Traffic Controller for Simulated Marklin connections. 009 * @author Steve Young Copyright (C) 2024 010 */ 011public class MarklinSimTrafficController extends jmri.jmrix.marklin.MarklinTrafficController { 012 013 public MarklinSimTrafficController() { 014 super(); 015 defaultUserName = "Marklin Network Simulation"; 016 } 017 018 @Override 019 protected void forwardMessage(jmri.jmrix.AbstractMRListener client, jmri.jmrix.AbstractMRMessage m) { 020 ((MarklinListener) client).message((MarklinMessage) m); 021 } 022 023 @Override 024 protected void forwardReply(jmri.jmrix.AbstractMRListener client, jmri.jmrix.AbstractMRReply r) { 025 ((MarklinListener) client).reply( (MarklinReply) r); 026 } 027 028 @Override 029 public void sendMarklinMessage(MarklinMessage m, MarklinListener l ) { 030 notifyMessage(m, l); 031 } 032 033}