public DeviceControllerTerminalConfiguration getTerminalConfiguration ( final DeviceControllerChannel channel ) throws IOException { if ( channel == null ) { throw new RuntimeException ( "null-channel is not allowed. For devices " + "knowing just one wiper Channel.A is mandatory for " + "parameter 'channel'" ) ; } // read configuration from device int tcon = read ( channel . getTerminalControllAddress ( ) ) ; // build result boolean channelEnabled = ( tcon & channel . getHardwareConfigControlBit ( ) ) > 0 ; boolean pinAEnabled = ( tcon & channel . getTerminalAConnectControlBit ( ) ) > 0 ; boolean pinWEnabled = ( tcon & channel . getWiperConnectControlBit ( ) ) > 0 ; boolean pinBEnabled = ( tcon & channel . getTerminalBConnectControlBit ( ) ) > 0 ; return new DeviceControllerTerminalConfiguration ( channel , channelEnabled , pinAEnabled , pinWEnabled , pinBEnabled ) ; }
Fetches the terminal - configuration from the device for a certain channel .