|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Reporter
Represent a device that can report identification information.
Reporting devices might include:
In contrast to Sensors, a Reporter provides more detailed information. A Sensor provides a status of ACTIVE or INACTIVE, while a Reporter returns an Object. The real type of that object can be whatever a particular Reporter finds useful to report. Typical values might be a String or Int, both of which can be displayed, printed, equated, etc.
A Reporter might also not be able to report all the time. The previous value remains available, but it's also possible to distinquish this case by using the getCurrentReport member function.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Sensor,
ReporterManager,
InstanceManager| Field Summary |
|---|
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Method Summary | |
|---|---|
Object |
getCurrentReport()
Query the current report. |
Object |
getLastReport()
Query the last report. |
int |
getState()
Provide an int form of the last report. |
void |
setReport(Object r)
Set the report to an arbitrary object. |
| Method Detail |
|---|
Object getLastReport()
Object getCurrentReport()
void setReport(Object r)
A Reporter object will usually just "report"; its contents usually come from the layout, and hence are only set by lower-level implementation classes. But there are occasionally reasons to set it from inside the program, e.g. debugging via entering values in the Reporter Table. Hence provision of this method.
int getState()
getState in interface NamedBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||