aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2020-04-22 13:35:35 +0100
committerFinn Williams <Finn.Williams@arm.com>2020-04-22 14:14:42 +0100
commitf7b9d29c69e707195df8e37f429f9bff521fd490 (patch)
treebbd4b5ba6ca4a9aa246500e867fc9a1f10672c1b
parenta0de05689870ecede28ca91ea0c8474daa7f8d6a (diff)
downloadarmnn-f7b9d29c69e707195df8e37f429f9bff521fd490.tar.gz
IVGCVSW-4708 Add command to send activate/deactivate timeline packets to garodmock CommandFileParser
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I80a0658b39ba10bf808430d463e783083f7809f8
-rw-r--r--tests/profiling/gatordmock/CommandFileParser.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/tests/profiling/gatordmock/CommandFileParser.cpp b/tests/profiling/gatordmock/CommandFileParser.cpp
index 6f67e4d113..503af8fc08 100644
--- a/tests/profiling/gatordmock/CommandFileParser.cpp
+++ b/tests/profiling/gatordmock/CommandFileParser.cpp
@@ -33,9 +33,28 @@ void CommandFileParser::ParseFile(std::string CommandFile, GatordMockService& mo
if (tokens.size() > 0)
{
std::string command = tokens[0];
- if (command == "LIST")
+ if (command == "DISABLE")
{
- // Expected format for the SET command
+ // Send a deactivate timeline packet
+ // Expected format for the ENABLE command
+ //
+ // DISABLE
+ //
+ mockService.SendDeactivateTimelinePacket();
+ }
+ else if (command == "ENABLE")
+ {
+ // Send aa activate timeline packet
+ // Expected format for the ENABLE command
+ //
+ // ENABLE
+ //
+ mockService.SendActivateTimelinePacket();
+ }
+ else if (command == "LIST")
+ {
+ // Request the Counter Directory
+ // Expected format for the LIST command
//
// LIST
//
@@ -44,6 +63,7 @@ void CommandFileParser::ParseFile(std::string CommandFile, GatordMockService& mo
}
if (command == "SET")
{
+ // Send a periodic counter selection packet
// Expected format for the SET command
//
// SET 500000 1 2 5 10
@@ -72,13 +92,14 @@ void CommandFileParser::ParseFile(std::string CommandFile, GatordMockService& mo
}
else if (command == "WAIT")
{
- // Expected format for the SET command
+ // Wait for an interval of time in microseconds
+ // Expected format for the WAIT command
//
// WAIT 11000000
//
// This breaks down to:
// WAIT command
- // 11000000 timeout period in micro seconds
+ // 11000000 timeout period in microseconds
if (tokens.size() > 1) // minimum of 2 tokens.
{
uint32_t timeout = static_cast<uint32_t>(std::stoul(tokens[1]));