public void Update(Can.CanFrame frame) { if (frame.Id == ID_MMC_INFO) { MmcFileCount = frame[0]; MmcFileIndex = frame[1]; return; } if (frame.Id >= ID_MMC_FILE_0 && frame.Id <= ID_MMC_FILE_9) { var name = Encoding.ASCII.GetString(frame.Data()); _mmcFiles[frame.Id - ID_MMC_FILE_0] = name; } }
public void Update(Can.CanFrame frame) { switch (frame.Id) { case ID_SUPPLY_TEMP: RectifierTemp = frame[0]; InverterTemp = frame[1]; break; case ID_SUPPLY_STATUS: _status = frame.Data(); break; case ID_SUPPLY_ANALOGS: Iout = frame[0]; Vout = frame[1]; Iin = frame[2]; Vin = frame[3]; break; } }