コード例 #1
0
ファイル: ControllerTypeBase.cs プロジェクト: wpmyj/twilight
 protected ControllerTypeBase(SerialComManager serialManager, IProtocolDriver protocolDriver)
 {
     ReceivedB9ConfirmCommand = false;
     ReceivedBBConfirmCommand = false;
     ControllerType           = ControllerType.NONE;
     SerialManager            = serialManager;
     m_ProtocolDriver         = protocolDriver;
 }
コード例 #2
0
        public ProtocolDataBuffer(IProtocolDriver protocolDriver)
        {
            CurrentOffset    = 0;
            InitOffset       = 0;
            DataLength       = 0;
            Capacity         = 1024;
            ReceiveBuffer    = new byte[Capacity];
            m_lstPackage     = new List <byte[]>();
            m_ProtocolDriver = protocolDriver;

            m_lstReceivedDataFromController = new List <byte[]>();
        }
コード例 #3
0
        ControllerTypeBase _controllerType;//用于获取控制器类,作为out参数传递,然后赋值给属性TheControllerType

        private InvokeControllerCom()
        {
            m_protocolDriver   = new ProtocolDriver(); //指定协议处理类
            m_BufferManager    = new ProtocolDataBuffer(m_protocolDriver);
            m_SerialComManager = new SerialComManager();
            dictControllerCom  = new ConcurrentDictionary <ControllerType, ControllerTypeBase>();
            dictControllerCom.TryAdd(ControllerType.NONE, new ControllerTypeUnknown(m_SerialComManager, m_protocolDriver));
            dictControllerCom.TryAdd(ControllerType.NT8036, new ControllerType8036(m_SerialComManager, m_protocolDriver));
            dictControllerCom.TryAdd(ControllerType.NT8001, new ControllerType8001(m_SerialComManager, m_protocolDriver));
            dictControllerCom.TryAdd(ControllerType.NT8007, new ControllerType8007(m_SerialComManager, m_protocolDriver));
            dictControllerCom.TryAdd(ControllerType.FT8003, new ControllerType8003(m_SerialComManager, m_protocolDriver));
            dictControllerCom.TryAdd(ControllerType.FT8000, new ControllerType8000(m_SerialComManager, m_protocolDriver));
            dictControllerCom.TryAdd(ControllerType.NT8021, new ControllerType8021(m_SerialComManager, m_protocolDriver));
        }
コード例 #4
0
 public ControllerType8021(SerialComManager serialManager, IProtocolDriver protocolDriver) : base(serialManager, protocolDriver)
 {
     base.ControllerModel = new Model.ControllerModel(ControllerType.NT8021);
 }
コード例 #5
0
 /// <summary>
 /// 安装协议驱动
 /// </summary>
 /// <param name="driver"></param>
 public void Setup(IProtocolDriver driver)
 {
     ProtocolDriver = driver;
 }
コード例 #6
0
 public ControllerTypeUnknown(SerialComManager serialManager, IProtocolDriver protocolDriver) : base(serialManager, protocolDriver)
 {
     base.ControllerModel = new Model.ControllerModel(ControllerType.NONE);
 }
コード例 #7
0
 public ControllerType8007(SerialComManager serialManager, IProtocolDriver protocolDriver) : base(serialManager, protocolDriver)
 {
     base.ControllerModel = new Model.ControllerModel(ControllerType.NT8007);
     SCA.BusinessLib.BusinessLogic.ControllerConfig8007 controllerConfig = new BusinessLogic.ControllerConfig8007();
     base.UploadedStandardLinkageConfigTotalAmount = controllerConfig.GetMaxAmountForStandardLinkageConfig();
 }