}
protected byte convertAlarmChannelUIDToChannelByte(ChannelUID channelUID) {
- return Byte.parseByte(channelUID.getIdWithoutGroup());
+ return Byte.parseByte(channelUID.getIdWithoutGroup().replaceAll(CHANNEL, ""));
}
protected boolean isTextAnalogInputChannel(ChannelUID channelUID) {
}
protected byte convertRawAnalogInputChannelUIDToChannelByte(ChannelUID channelUID) {
- return Byte.parseByte(channelUID.getIdWithoutGroup().replaceAll(RAW_CHANNEL_SUFFIX, ""));
+ return Byte
+ .parseByte(channelUID.getIdWithoutGroup().replaceAll(CHANNEL, "").replaceAll(RAW_CHANNEL_SUFFIX, ""));
}
protected byte convertTextAnalogInputChannelUIDToChannelByte(ChannelUID channelUID) {
- return Byte.parseByte(channelUID.getIdWithoutGroup());
+ return Byte.parseByte(channelUID.getIdWithoutGroup().replaceAll(CHANNEL, ""));
}
protected String convertAnalogInputChannelByteToRawChannelUID(byte channelByte) {
}
protected String convertAnalogInputChannelByteToChannelUID(byte channelByte) {
- return ANALOG_INPUT_GROUP + "#" + channelByte;
+ return ANALOG_INPUT_GROUP + "#" + CHANNEL + channelByte;
}
protected boolean isAnalogOutputChannel(ChannelUID channelUID) {
}
protected byte convertAnalogOutputChannelUIDToChannelByte(ChannelUID channelUID) {
- return Byte.parseByte(channelUID.getIdWithoutGroup());
+ return Byte.parseByte(channelUID.getIdWithoutGroup().replaceAll(CHANNEL, ""));
}
@Override