public void createHistory(canMessage cm) { identHistory ih = (identHistory)allIdents[cm.getIdent()]; if (ih == null) ih = new identHistory(cm.getIdent()); ih.addData(cm); allIdents[cm.getIdent()] = ih; }
public dataHistoryViewer(main m, canMessage cm) { InitializeComponent(); this.cm = cm; this.m = m; lab_status.Text = "Last 0 data for "+cm.getIdent().ToString("X").PadLeft(8,'0')+"h"; this.Text = cm.getIdent().ToString("X").PadLeft(8, '0') + "h history"; }
private void stamp(canMessage cm) { messageState ms = (messageState)incommingMessages[cm.getIdent()]; if (ms == null) { ms = new messageState(); } ms.stamp(); incommingMessages[cm.getIdent()] = ms; }
public DateTime getTime(canMessage cm) { messageState ms = (messageState)incommingMessages[cm.getIdent()]; if (ms == null) return new DateTime(); return ms.timestamp; }
public int getCount(canMessage cm) { messageState ms = (messageState)incommingMessages[cm.getIdent()]; if (ms == null) return 0; return ms.count; }
public long getPeriod(canMessage cm) { messageState ms = (messageState)incommingMessages[cm.getIdent()]; if (ms == null) return 0; return ms.period; }
public void addMessage(canMessage cm) { allMessages[cm.getIdent()] = cm; stamp(cm); }
private void loadCm(canMessage cmEdit) { chk_extended.Checked = cmEdit.getExtended(); chk_remote_request.Checked = cmEdit.getRemoteRequest(); txt_period.Text = m.mtOut.getPeriod(cmEdit).ToString(); uint ident = cmEdit.getIdent(); data_length.Value = cmEdit.getDataLength(); byte[] data = cmEdit.getData(); for (int i = 0; i < 4; i++) { uint er = (ident >> (8 * i)); byte b = ((byte)(er&0x000000FF)); idBoxes[i].Text = b.ToString("X").PadLeft(2, '0'); } for (int i = 0; i < 8; i++) dataBoxes[i].Text = data[i].ToString("X").PadLeft(2, '0'); }