001package jmri.jmrix.ecos; 002 003import jmri.implementation.AbstractSensor; 004 005/** 006 * Implement a Sensor via ECoS communications. 007 * <p> 008 * This object doesn't listen to the Ecos communications. This is because it 009 * should be the only object that is sending messages for this sensor; more than 010 * one Sensor object pointing to a single device is not allowed. 011 * 012 * @author Kevin Dickerson (C) 2009 013 */ 014public class EcosSensor extends AbstractSensor { 015 016 int objectNumber = 0; 017 018 public EcosSensor(String systemName, String userName) { 019 super(systemName, userName); 020 init(systemName); 021 } 022 023 public EcosSensor(String systemName) { 024 super(systemName); 025 init(systemName); 026 } 027 028 private void init(String id) { 029 } 030 031 void setObjectNumber(int o) { 032 objectNumber = o; 033 } 034 035 @Override 036 public void requestUpdateFromLayout() { 037 } 038 039 public int getObject() { 040 return objectNumber; 041 } 042 043}