//
//  CommandClassControlDetailView.m
//  kneet
//
//  Created by Jason Lee on 3/16/15.
//  Copyright (c) 2015 ntels. All rights reserved.
//

#import "JDObject.h"

#import "RequestHandler.h"
#import "JDJSONModel.h"
#import "DeviceModel.h"

#import "CustomLabel.h"
#import "CommonUtil.h"
#import "CustomButton.h"
#import "CustomRadioGroup.h"

#import "UIImageView+WebCache.h"

#import "CommandClassControlDetailView.h"
#import "CommandClassControlView.h"
#import "CustomImageView.h"

#define GRAPH_ANI_DUR 0.5f
#define DEGREES(radians)((radians) * 180 / M_PI)
#define RADIANS(degree)((degree) * M_PI / 180)

typedef void(^NodeCommandCompletionBlock)(id result);
typedef void(^NodeCommandFailureBlock)(id error);


@implementation CommandClassControlDetailView


+ (CommandClassControlView *)viewForCommandClass:(CmdClsType)cmdClsType
{
    CommandClassControlView *controlView = nil;
    for (UIView *view in [CommonUtil nibViews:@"CommandClassControlDetailView"]) {
        if (view.tag == cmdClsType) {
            controlView = (CommandClassControlView *)view;
            break;
        }
    }

    if (!controlView) {//상위 부모에서 가져옴.
        controlView = [CommandClassControlView viewForCommandClass:cmdClsType];
    }

    return controlView;
}

@end


@implementation CommandClassSwitchDetailView

@end



@implementation CommandClassValveDetailView

@end


#pragma mark - Sensors View

@implementation CommandClassSensorBinaryDetailView

@end


@implementation CommandClassSensorMultiLevelDetailView

@end



