/**
* Parses the channel informations into the binding model.
*/
@SuppressWarnings("unchecked")
private HmChannel parseChannel(HmDevice device, Map<String, ?> channelData) throws IllegalAccessException {
HmChannel channel = new HmChannel();
FieldUtils.writeField(channel, "device", device, true);
FieldUtils.writeField(channel, "number", String.valueOf(channelData.get("INDEX")), true);
Map<String, ?> paramsList = (Map<String, ?>) channelData.get("PARAMSET");
for (String name : paramsList.keySet()) {
channel.addDatapoint(parseDatapoint(channel, name, (Map<String, ?>) paramsList.get(name)));
}
return channel;
}