public void addData(canMessage cm) { lst.AddLast(new dataStamp(cm.getData(),cm.getDataLength())); while(lst.Count>MAX_LOG) lst.RemoveFirst(); }
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'); }