mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-02-05 15:18:45 +00:00
asc file reader and small log enhancements (#3)
This commit is contained in:
@@ -43,7 +43,7 @@ namespace asc
|
||||
switch (eState)
|
||||
{
|
||||
case EState::header:
|
||||
if (ssLine.compare(0, 18, "Begin Triggerblock") == 0)
|
||||
if (ssLine.compare(0, 18, "Begin TriggerBlock") == 0)
|
||||
eState = EState::body;
|
||||
break;
|
||||
case EState::body:
|
||||
@@ -72,6 +72,11 @@ namespace asc
|
||||
return std::make_pair(*m_itCurrent, true);
|
||||
}
|
||||
|
||||
uint32_t CAscReader::GetMessageCount() const
|
||||
{
|
||||
return m_lstMessages.size();
|
||||
}
|
||||
|
||||
uint32_t CAscReader::GetLoopCount() const
|
||||
{
|
||||
return m_uiLoopCount;
|
||||
|
||||
@@ -56,6 +56,12 @@ namespace asc
|
||||
*/
|
||||
std::pair<SCanMessage, bool> Get() const;
|
||||
|
||||
/**
|
||||
* @brief Get the number of messages in the asc file
|
||||
* @return Number of messages which count be read from the asc file.
|
||||
*/
|
||||
uint32_t GetMessageCount() const;
|
||||
|
||||
/**
|
||||
* @brief Get the number of loops the data set was sent
|
||||
* @return Number of loops the data set was sent including the current loop
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace asc
|
||||
fstream << "base hex timestamps absolute" << std::endl;
|
||||
|
||||
// Stream trigger block
|
||||
fstream << "Begin Triggerblock " << std::put_time(std::localtime(&tmSystemTime), "%c") << std::endl;
|
||||
fstream << "Begin TriggerBlock " << std::put_time(std::localtime(&tmSystemTime), "%c") << std::endl;
|
||||
fstream << " 0.000000 Start of measurement" << std::endl;
|
||||
for (const SCanMessage& rsSample : m_lstMessages)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user