void MovingLightScene::setSceneValue(size_t aChannelIndex, double aValue)
{
  ChannelBehaviourPtr cb = getDevice().getChannelByIndex(aChannelIndex);
  switch (cb->getChannelType()) {
    case channeltype_position_h : hPos = aValue;
    case channeltype_position_v : vPos = aValue;
    default: inherited::setSceneValue(aChannelIndex, aValue); break;
  }
}
double FanCoilUnitScene::sceneValue(int aChannelIndex)
{
  ChannelBehaviourPtr cb = getDevice().getChannelByIndex(aChannelIndex);
  switch (cb->getChannelType()) {
    case channeltype_fcu_operation_mode: return operationMode;
    case channeltype_power_state: return powerState ? 1 : 0;
  }
  return 0;
}
double MovingLightScene::sceneValue(size_t aChannelIndex)
{
  ChannelBehaviourPtr cb = getDevice().getChannelByIndex(aChannelIndex);
  switch (cb->getChannelType()) {
    case channeltype_position_h : return hPos;
    case channeltype_position_v : return vPos;
    default: return inherited::sceneValue(aChannelIndex);
  }
  return 0;
}
void FanCoilUnitScene::setSceneValue(int aChannelIndex, double aValue)
{
  ChannelBehaviourPtr cb = getDevice().getChannelByIndex(aChannelIndex);
  ClimateControlBehaviourPtr ccb = boost::dynamic_pointer_cast<ClimateControlBehaviour>(getOutputBehaviour());
  switch (cb->getChannelType()) {
    case channeltype_fcu_operation_mode:
      setPVar(operationMode, (FcuOperationMode)aValue);
      break;
    case channeltype_power_state:
      setPVar(powerState, aValue>0);
      break;
  }
}