Exemplo n.º 1
0
        public SDK()
        {
            InitializeComponent();

            dtRecord.Columns.Add("deviceID");
            dtRecord.Columns.Add("onlineFlag");
            dtRecord.Columns.Add("recordTime");
            dtRecord.Columns.Add("recordType");
            dtRecord.Columns.Add("credenceType");
            dtRecord.Columns.Add("userID");
            dtRecord.Columns.Add("userType");
            dtRecord.Columns.Add("picture");
            dtRecord.Columns.Add("gateOpenMode");
            dtRecord.Columns.Add("credenceNo");
            dtRecord.Columns.Add("recCarNOColor");
            dtRecord.Columns.Add("carLogo");
            dtRecord.Columns.Add("carType");
            dtRecord.Columns.Add("deviceEntryType");
            dgvRecord.DataSource = dtRecord.DefaultView;

            dtEventRecord.Columns.Add("subDviceID");
            dtEventRecord.Columns.Add("eventType");
            dtEventRecord.Columns.Add("address");
            dtEventRecord.Columns.Add("time");
            dtEventRecord.Columns.Add("description");
            dtEventRecord.Columns.Add("picID");
            dgvEventRecord.DataSource = dtEventRecord.DefaultView;

            GloablInfo.sdk         = this;
            m_SmartDevice_CallBack = mySmartDevice_CallBack;
            SmartDeviceInterface.SmartDevice_SetCallBack(m_SmartDevice_CallBack);
            unsafe
            {
                m_SmartDeviceNeedResponse_CallBack = mySmartDeviceNeedResponse_CallBack;
            }
            SmartDeviceInterface.SmartDevice_SetNeedResponseCallBack(m_SmartDeviceNeedResponse_CallBack);
            m_SmartDeviceOffline_CallBack = mySmartDeviceOffline_CallBack;
            SmartDeviceInterface.SmartDevice_SetOfflineCallBack(m_SmartDeviceOffline_CallBack);
            //设计命令超时1000毫秒
            SmartDeviceInterface.SmartDevice_SetTimeOut(1000);
            //智能设备SDK初始化
            SmartDeviceInterface.SmartDevice_Init(20001, 0);
        }
Exemplo n.º 2
0
 public static extern void SmartDevice_SetCallBack(SmartDevice_CallBack CallBack);
Exemplo n.º 3
0
 /// <summary>
 /// 智能设备SDK设置回调函数
 /// </summary>
 public void SmartDevice_SetCallBack(SmartDevice_CallBack CallBack)
 {
     SmartDeviceInterface.SmartDevice_SetCallBack(CallBack);
 }