internal WeighNode(SPort _port, byte node_addr) : base(_port, node_addr) { _lastweight = -1; rand = new Random(); cnt_match = 0; cnt_aderr = 0; }
private void btn_open_Click(object sender, EventArgs e) { if (bOpen) { sp.Close(); bOpen = false; UpdateAllNodeStatus(); return; } sp = new SPort(cb_com.SelectedItem.ToString(), 115200, System.IO.Ports.Parity.Even, 8, System.IO.Ports.StopBits.One); bOpen = sp.Open(); if (!bOpen) { return; } UpdateAllNodeStatus(); }
public Form1() { InitializeComponent(); sp = null; nodemap = new Dictionary<byte, SubNode>(); nodestatus = new Dictionary<byte, Pernode>(); nodelist = new List<byte>(); lb_addrto.SelectedIndex = 0; cb_com.SelectedIndex = 0; // lb_typeto.SelectedIndex = 0; if (GetRegistData("locale") == "zh-CN") language = "zh-CN"; else language = "en-US"; SubNode.Dummy(); panel4.Visible = false; // panel2.Visible = false; panel3.Visible = false; }
internal SubNode(SPort _port, byte node_id) { port = _port; this.node_id = node_id; errlist = ""; //to initial reg_table items from xml table curr_conf = new Dictionary <string, Nullable <UInt32> >(); valfresh = new Dictionary <string, bool>(); ICollection <string> names = reg_type_tbl.Keys; foreach (string name in names) { curr_conf[name] = null; valfresh[name] = false; } port.InFrameHandlers[node_id] = HandleInFrame; status = NodeStatus.ST_IDLE; }
public Form1() { InitializeComponent(); sp = null; nodemap = new Dictionary <byte, SubNode>(); nodestatus = new Dictionary <byte, Pernode>(); nodelist = new List <byte>(); lb_addrto.SelectedIndex = 0; cb_com.SelectedIndex = 0; // lb_typeto.SelectedIndex = 0; if (GetRegistData("locale") == "zh-CN") { language = "zh-CN"; } else { language = "en-US"; } SubNode.Dummy(); panel4.Visible = false; // panel2.Visible = false; panel3.Visible = false; }
private void btn_open_Click(object sender, EventArgs e) { if(bOpen) { sp.Close(); bOpen = false; UpdateAllNodeStatus(); return; } sp = new SPort(cb_com.SelectedItem.ToString(), 115200, System.IO.Ports.Parity.Even, 8, System.IO.Ports.StopBits.One); bOpen = sp.Open(); if (!bOpen) return; UpdateAllNodeStatus(); }
internal VibrateNode(SPort _port,byte node_addr): base(_port,node_addr) { intf_byte = new Intf(0); }
internal SubNode(SPort _port, byte node_id) { port = _port; this.node_id = node_id; errlist = ""; //to initial reg_table items from xml table curr_conf = new Dictionary<string, Nullable<UInt32>>(); valfresh = new Dictionary<string, bool>(); ICollection<string> names = reg_type_tbl.Keys; foreach (string name in names) { curr_conf[name] = null; valfresh[name] = false; } port.InFrameHandlers[node_id] = HandleInFrame; status = NodeStatus.ST_IDLE; }
internal WeighNode(SPort _port, byte node_addr) : base(_port,node_addr) { _lastweight = -1; rand = new Random(); cnt_match = 0; cnt_aderr = 0; }
internal VibrateNode(SPort _port, byte node_addr) : base(_port, node_addr) { intf_byte = new Intf(0); }