using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static IStation.Model.Camera;
namespace IStation.Application
{
///
///
///
public class CameraHikLogicDto
{
///
///
///
public CameraHikLogicDto() { }
///
///
///
public CameraHikLogicDto(Model.Product rhs)
{
this.ID = rhs.ID;
this.Name = rhs.Name;
this.Code = rhs.Code;
this.Specification = rhs.Specification;
this.SeriesNO = rhs.RatedParas.SeriesNO;
this.VerificationCode = rhs.RatedParas.VerificationCode;
this.Pixel = rhs.RatedParas.Pixel;
this.StorageCode = rhs.RatedParas.StorageCode;
this.StorageMode = rhs.RatedParas.StorageMode;
this.WaterproofGrade = rhs.RatedParas.WaterproofGrade;
this.NightType = rhs.RatedParas.NightType;
this.FocalDistance = rhs.RatedParas.FocalDistance;
this.IsZoomble = rhs.RatedParas.IsZoomble;
this.IsRotateAble = rhs.RatedParas.IsRotateAble;
var account = Model.CameraHikAccount.ToModel(rhs.RatedParas.Account);
this.AppKey = account.AppKey;
this.AppSecret = account.AppSecret;
var channel = Model.CameraHikChannel.ToModel(rhs.RatedParas.Channel);
this.ChannelNo = channel.ChannelNo;
this.ChannelName = channel.ChannelName;
this.ViewToken = Ys7Helper.GetAccessToken(this.AppKey, this.AppSecret);
this.LiveUrl = Ys7Helper.GetLiveUrl(this.AppKey, this.AppSecret, this.VerificationCode, this.SeriesNO, this.ChannelNo);
}
///
///
///
public CameraHikLogicDto(Model.Product rhs, string manufacturerName) : this(rhs)
{
this.ManufacturerName = manufacturerName;
}
///
/// 标识
///
public long ID { get; set; }
///
/// 编号
///
public string NO { get; set; }
///
/// 名称
///
public string Name { get; set; }
///
/// 厂商
///
public string ManufacturerName { get; set; }
///
/// 型号
///
public string Code { get; set; }
///
/// 规格
///
public string Specification { get; set; }
///
/// 设备序列号
///
public string SeriesNO { get; set; }
///
/// 设备验证码
///
public string VerificationCode { get; set; }
///
/// 像素
///
public string Pixel { get; set; }
///
/// 存储编码
///
public string StorageCode { get; set; }
///
/// 存储方式
///
public eStorageMode StorageMode { get; set; }
///
/// 防水等级
///
public eWaterproofGrade WaterproofGrade { get; set; }
///
/// 夜视类型
///
public eNightType NightType { get; set; }
///
/// 焦距 mm
///
public int FocalDistance { get; set; }
///
/// 可变焦
///
public bool IsZoomble { get; set; }
///
/// 可旋转
///
public bool IsRotateAble { get; set; }
///
/// token
///
public string ViewToken { get; set; }
///
/// 播放地址
///
public string LiveUrl { get; set; }
///
/// 通道号
///
public int ChannelNo { get; set; }
///
/// 通道名称
///
public string ChannelName { get; set; }
///
///
///
public string AppKey { get; set; }
///
///
///
public string AppSecret { get; set; }
}
}