这篇教程C++ write_one函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中write_one函数的典型用法代码示例。如果您正苦于以下问题:C++ write_one函数的具体用法?C++ write_one怎么用?C++ write_one使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了write_one函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: write_onevoid Cconfigure::OnEnKillfocusEdit1(){ CString strText; m_edit.GetWindowText(strText); m_edit.ShowWindow(SW_HIDE); if (strText.CompareNoCase(m_oldname)==0) { return; } int Value=_wtoi(strText); if (5==m_CurCol) { write_one(g_tstat_id,14535+m_CurRow,Value); } else { write_one(g_tstat_id,251+m_CurRow,Value); } OnInitDialog(); }
开发者ID:jay-github,项目名称:T3000_Building_Automation_System,代码行数:25,
示例2: change_com_port_and_net_work_controller_baudratevoid change_com_port_and_net_work_controller_baudrate(int new_baudrate){ TRACE("%d/n",new_baudrate); static int now_baudrate=0; if(now_baudrate!=new_baudrate) now_baudrate=new_baudrate; else return; showing_text=T3000VIEW_SCAN_CHANGE_NET_WORK_BAUDRATE;//for showing int baudrate=19200; if(new_baudrate!=19200) baudrate=9600; bool found=false; for(int i=0;i<m_binary_search_product_background_thread.size();i++) { if(NET_WORK_CONT_PRODUCT_MODEL==m_binary_search_product_background_thread.at(i).product_class_id) { found=true; //Change_BaudRate(m_binary_search_product_background_thread.at(i).baudrate);/////////change to same baudrate,so next step ,read,write if(baudrate==9600) write_one(m_binary_search_product_background_thread.at(i).id,128,0); else write_one(m_binary_search_product_background_thread.at(i).id,128,1); write_one(m_binary_search_product_background_thread.at(i).id,131,1);/////////save nemo } } Change_BaudRate(baudrate); if(found==true) Sleep(4000);//////////it 's better for next step else now_baudrate=0;///////////for no net work controller showing_text="";//for showing }
开发者ID:JTheCoder1,项目名称:T3000_Building_Automation_System,代码行数:34,
示例3: set_colorint set_color(int led, int intensity, int r, int g, int b) { uint16_t color = ((r)+((g)<<4)+((b)<<8)); int i; write_begin(); for (i=6; i; i--, (led <<= 1)) { if (led&(1<<5)) { write_one(); } else { write_zero(); } } for (i=8; i; i--, (intensity<<=1)) { if (intensity&(1<<7)) { write_one(); } else { write_zero(); } } for (i=12; i; i--, (color<<=1)) { if (color&(1<<11)) { write_one(); } else { write_zero(); } } write_end(); return 0;}
开发者ID:mboyd,项目名称:Bemis-100,代码行数:28,
示例4: write_one// Write one cv::Mat to filebool write_one(FILE * file, const cv::Mat & data){ bool okay = true; okay &= write_one(file, int32_t(data.rows)); okay &= write_one(file, int32_t(data.cols)); okay &= write_one(file, uint32_t(data.type())); // If matrix memory is continuous, we can reshape the matrix int rows = data.rows, cols = data.cols; if (data.isContinuous()) { cols = rows*cols; rows = 1; } // Currently only supports float/double matrices! assert(data.depth() == CV_32F || data.depth() == CV_64F); if (data.depth() == CV_32F) for (int r = 0; r < rows; ++r) okay &= write_n(file, data.ptr<float>(r), cols); else if (data.depth() == CV_64F) for (int r = 0; r < rows; ++r) okay &= write_n(file, data.ptr<double>(r), cols); else return false; return okay;}
开发者ID:arvinyang,项目名称:VirtualGlasses,代码行数:28,
示例5: MessageBoxvoid CCO2_View::Check_HourTime(){ CTime temp_time; int chour,cmin,csec; m_co2_time_picker.GetTime(temp_time); chour = temp_time.GetHour(); cmin = temp_time.GetMinute(); csec = temp_time.GetSecond(); if(chour != product_register_value[CO2_485_MODBUS_RTC_HOUR]) { if(write_one(g_tstat_id,CO2_485_MODBUS_RTC_HOUR,chour,3)<0) { MessageBox(_T("Operate failure,Please try again")); return; } } if(cmin != product_register_value[CO2_485_MODBUS_RTC_MIN]) { if(write_one(g_tstat_id,CO2_485_MODBUS_RTC_MIN,cmin,3)<0) { MessageBox(_T("Operate failure,Please try again")); return; } }}
开发者ID:jay-github,项目名称:T3000_Building_Automation_System,代码行数:27,
示例6: _Batch_Flash_SNDWORD WINAPI _Batch_Flash_SN(LPVOID pParam){ CBatchSNDlg* pView=(CBatchSNDlg*)(pParam); for (int i = 0;i<pView->m_modbus_IDs.size();i++) { int IntSN=pView->GetNewSerialNumber(); write_one(pView->m_modbus_IDs.at(i).ModbusID,2026,123,5); int ret=write_one(pView->m_modbus_IDs.at(i).ModbusID,2027,IntSN,5); if (ret>0) { pView->WriteSerialNumber(IntSN); pView->m_modbus_IDs.at(i).SN = IntSN; pView->m_modbus_IDs.at(i).Result = TRUE; } else { pView->m_modbus_IDs.at(i).SN = -1; pView->m_modbus_IDs.at(i).Result = FALSE; } SendMessage(g_hwnd_now,WM_REFRESH_BAC_INPUT_LIST,2,i); } //PostMessage(g_hwnd_now,WM_REFRESH_BAC_INPUT_LIST,0,0); return 1;}
开发者ID:Fance,项目名称:T3000_Building_Automation_System,代码行数:25,
示例7: GetDlgItemTextvoid T3000_Default_MainView::OnEnKillfocusEditBacnetDeviceId(){ // TODO: 在此添加控件通知处理程序代码 CString strText; GetDlgItemText(IDC_EDIT_BACNET_DEVICE_ID, strText); int nValue = _wtoi(strText); unsigned int temp_device_id = 0; temp_device_id = product_register_value[992] * 65536 + product_register_value[991]; if (temp_device_id == nValue) //Add this to judge weather this value need to change. return; unsigned short temp_device_low; unsigned short temp_device_high; temp_device_low = nValue % 65536; temp_device_high = nValue / 65536; int nret_1 = write_one(g_tstat_id, 991, temp_device_low, 6); int nret_2 = write_one(g_tstat_id, 992, temp_device_high, 6); if ((nret_1 >= 0) && (nret_2 >= 0)) { product_register_value[991] = temp_device_low; product_register_value[992] = temp_device_high; SetPaneString(BAC_SHOW_MISSION_RESULTS, _T("Change bacnet device id success")); } else { MessageBox(_T("Change bacnet device id failed!")); }}
开发者ID:temcocontrols,项目名称:T3000_Building_Automation_System,代码行数:33,
示例8: write_onestat_value Stat::add(const std::string & key, const std::string & player, stat_value value) { //errorstream<<"stat adding: "<<key<< " player="<<player<<" = "<< value<<std::endl; stat_value ret = write_one("total|" + key, value); write_one("day|"+ key + "|" + day , value); write_one("week|"+ key + "|" + week, value); write_one("month|"+ key + "|" + month, value); if (!player.empty()) ret = write_one("player|" + key + "|" + player, value); return ret;}
开发者ID:Mab879,项目名称:freeminer,代码行数:10,
示例9: ifvoid Cconfigure::OnCbnSelchangeRangecombo(){ int Item=m_controlcombo.GetCurSel(); int RegValue,Value; if (1==m_CurCol) { RegValue=read_one(g_tstat_id,200+m_CurRow); if (RegValue<0) { RegValue=0; } if (0==Item) { Value=1; } else if (1==Item) { Value=2; } else if (2==Item) { Value=4; } RegValue&=0xF0; RegValue+=Value; write_one(g_tstat_id,200+m_CurRow,RegValue); } else if (3==m_CurCol) { RegValue=read_one(g_tstat_id,200+m_CurRow); if (RegValue<0) { RegValue=0; } if (0==Item) { Value=16; } else if (1==Item) { Value=32; } RegValue&=0x0F;//留底位,去高位 RegValue+=Value;//置高位 write_one(g_tstat_id,200+m_CurRow,RegValue); } else if (4==m_CurCol) { write_one(g_tstat_id,4171+m_CurRow,Item); } OnInitDialog();}
开发者ID:jay-github,项目名称:T3000_Building_Automation_System,代码行数:54,
示例10: _wtoivoid CReg_ControlDlg::OnBnClickedBtnDeviceIdWrite(){ // TODO: Add your control notification handler code here CString temp_id; CString temp_on_time; CString temp_cycle; int i_id; int i_time; int i_cycle; m_reg_id.GetWindowTextW(temp_id); m_reg_on_time.GetWindowTextW(temp_on_time); m_reg_cycle.GetWindowTextW(temp_cycle); i_id = _wtoi(temp_id); i_time = _wtoi(temp_on_time); i_cycle = _wtoi(temp_cycle); if(write_one(255,6,i_id)<0) { MessageBox(_T(" C++ write_output函数代码示例 C++ write_node函数代码示例
|