Package jmri.jmrix.nce
Class NceAIU
java.lang.Object
jmri.jmrix.nce.NceAIU
Model an NCE AIU
These AIUs are numbered ala the cab bus, from 1 to 63. AIU number 1 carries sensors 1 to 14; AIU 2 from 17 to 30, etc.
The array of sensor states is used to update sensor known state only when there's a change on the cab bus. This allows for the sensor state to be updated within the program, keeping this updated state until the next change on the cab bus. E.g. you can manually change a state via an icon, and not have it change back the next time that AIU is polled.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) Sensor[](package private) int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSensor(int index) Return the sensor object for the specified AIUvoidmarkChanges(int bits) voidregisterSensor(Sensor s, int i) The numbers here are 0 to 15, not 1 to 16voidsensorChange(int offset, int newState) set state of a single sensor based on AIU input
-
Field Details
-
sensorArray
-
sensorLastSetting
int[] sensorLastSetting -
lastAIUValue
int lastAIUValue
-
-
Constructor Details
-
NceAIU
public NceAIU()
-
-
Method Details
-
markChanges
- Parameters:
bits- int value of response from poll command
-
sensorChange
set state of a single sensor based on AIU input- Parameters:
offset- sensor number within the current arraynewState- new state (Sensor.ACTIVE / .INACTIVE)
-
registerSensor
The numbers here are 0 to 15, not 1 to 16- Parameters:
s- bit within the AIU cardi- index for AIU card
-
getSensor
Return the sensor object for the specified AIU- Parameters:
index- AIU index (0..15)- Returns:
- sensor object
-