| 244 | } |
| 245 | |
| 246 | void SampleQueue::SaveEthMessage(const IChannelGroup& group, uint64_t time, |
| 247 | const EthMessage& msg) { |
| 248 | SampleRecord sample = group.GetSampleRecord(); |
| 249 | sample.timestamp = time; |
| 250 | RecalculateTime(group.RecordId(), sample); |
| 251 | |
| 252 | // Convert the LIN message to a sample record. Note that LIN always uses the |
| 253 | // MLSD storage type. |
| 254 | |
| 255 | if (group.Name().find( "_Frame") != std::string::npos) { |
| 256 | msg.MessageType(EthMessageType::ETH_Frame); |
| 257 | msg.ToRaw(EthMessageType::ETH_Frame, sample); |
| 258 | } else if (group.Name().find( "_ChecksumError") != std::string::npos) { |
| 259 | msg.MessageType(EthMessageType::ETH_ChecksumError); |
| 260 | msg.ToRaw(EthMessageType::ETH_ChecksumError, sample); |
| 261 | } else if (group.Name().find( "_LengthError") != std::string::npos) { |
| 262 | msg.MessageType(EthMessageType::ETH_LengthError); |
| 263 | msg.ToRaw(EthMessageType::ETH_LengthError, sample); |
| 264 | } else if (group.Name().find("_ReceiveError") != std::string::npos) { |
| 265 | msg.MessageType(EthMessageType::ETH_ReceiveError); |
| 266 | msg.ToRaw(EthMessageType::ETH_ReceiveError, sample); |
| 267 | } |
| 268 | AddSample(std::move(sample)); |
| 269 | } |
| 270 | |
| 271 | void SampleQueue::SaveMostMessage(const IChannelGroup& group, uint64_t time, |
| 272 | const IMostEvent& msg) { |
nothing calls this directly
no test coverage detected