-
Notifications
You must be signed in to change notification settings - Fork 1
Block Module
Daniel Türk edited this page Mar 6, 2018
·
6 revisions
Use an address of bus 1 for the module:
BlockModule blockModule = device.getBlockModule((byte) 10);
blockModule.addBlockListener(new BlockListener() {
@Override
public void blockOccupied(int blockNr) {
}
@Override
public void blockFreed(int blockNr) {
}
});Extends the Block Module and receive the decoder informations.
byte address = 10;
FeedbackBlockModule blockModule = device.getFeedbackBlockModule(address,
address + 2, address + 1);
blockModule.addFeedbackBlockListener(new BlockListener() {
@Override
public void trainEnterBlock(int blockNumber, int trainAddress,
boolean forward) {
}
@Override
public void trainLeaveBlock(int blockNumber, int trainAddress,
boolean forward) {
}
@Override
public void blockOccupied(int blockNr) {
}
@Override
public void blockFreed(int blockNr) {
}
});