21.08
|
A class that implements a Mock Gatord server. More...
#include <GatordMockService.hpp>
Public Member Functions | |
GatordMockService (std::unique_ptr< arm::pipe::BasePipeServer > clientConnection, bool echoPackets) | |
GatordMockService (const GatordMockService &)=delete | |
GatordMockService & | operator= (const GatordMockService &)=delete |
GatordMockService (GatordMockService &&)=delete | |
GatordMockService & | operator= (GatordMockService &&)=delete |
bool | WaitForStreamMetaData () |
Once the connection is open wait to receive the stream meta data packet from the client. More... | |
void | SendConnectionAck () |
Send a connection acknowledged packet back to the client. More... | |
void | SendRequestCounterDir () |
Send a request counter directory packet back to the client. More... | |
void | SendActivateTimelinePacket () |
Send a activate timeline packet back to the client. More... | |
void | SendDeactivateTimelinePacket () |
Send a deactivate timeline packet back to the client. More... | |
bool | LaunchReceivingThread () |
Start the thread that will receive all packets and print them nicely to stdout. More... | |
uint32_t | GetPacketsReceivedCount () |
Return the total number of periodic counter capture packets received since the receive thread started. More... | |
void | WaitForReceivingThread () |
This is a placeholder method to prevent main exiting. More... | |
bool | ReceiveThreadRunning () |
void | SendPeriodicCounterSelectionList (uint32_t period, std::vector< uint16_t > counters) |
Send the counter list to ArmNN. More... | |
void | WaitCommand (uint32_t timeout) |
Execute the WAIT command from the comamnd file. More... | |
profiling::DirectoryCaptureCommandHandler & | GetDirectoryCaptureCommandHandler () |
arm::pipe::TimelineDecoder & | GetTimelineDecoder () |
arm::pipe::TimelineDirectoryCaptureCommandHandler & | GetTimelineDirectoryCaptureCommandHandler () |
A class that implements a Mock Gatord server.
It will listen on a specified Unix domain socket (UDS) namespace for client connections. It will then allow opertaions to manage coutners while receiving counter data.
Definition at line 38 of file GatordMockService.hpp.
|
inline |
registry | reference to a command handler registry. |
echoPackets | if true the raw packets will be printed to stdout. |
Definition at line 43 of file GatordMockService.hpp.
References GatordMockService::LaunchReceivingThread(), GatordMockService::operator=(), GatordMockService::SendActivateTimelinePacket(), GatordMockService::SendConnectionAck(), GatordMockService::SendDeactivateTimelinePacket(), GatordMockService::SendRequestCounterDir(), and GatordMockService::WaitForStreamMetaData().
|
delete |
|
delete |
|
inline |
Definition at line 123 of file GatordMockService.hpp.
|
inline |
Return the total number of periodic counter capture packets received since the receive thread started.
Definition at line 102 of file GatordMockService.hpp.
References GatordMockService::WaitForReceivingThread().
|
inline |
Definition at line 128 of file GatordMockService.hpp.
|
inline |
Definition at line 133 of file GatordMockService.hpp.
bool LaunchReceivingThread | ( | ) |
Start the thread that will receive all packets and print them nicely to stdout.
Definition at line 64 of file GatordMockService.cpp.
Referenced by CreateMockService(), and GatordMockService::GatordMockService().
|
delete |
Referenced by GatordMockService::GatordMockService().
|
delete |
|
inline |
Definition at line 112 of file GatordMockService.hpp.
References GatordMockService::SendPeriodicCounterSelectionList(), and GatordMockService::WaitCommand().
Referenced by CommandFileParser::ParseFile(), and GatordMockService::WaitCommand().
void SendActivateTimelinePacket | ( | ) |
Send a activate timeline packet back to the client.
Definition at line 44 of file GatordMockService.cpp.
Referenced by GatordMockService::GatordMockService(), and CommandFileParser::ParseFile().
void SendConnectionAck | ( | ) |
Send a connection acknowledged packet back to the client.
Definition at line 24 of file GatordMockService.cpp.
Referenced by CreateMockService(), and GatordMockService::GatordMockService().
void SendDeactivateTimelinePacket | ( | ) |
Send a deactivate timeline packet back to the client.
Definition at line 54 of file GatordMockService.cpp.
Referenced by GatordMockService::GatordMockService(), and CommandFileParser::ParseFile().
void SendPeriodicCounterSelectionList | ( | uint32_t | period, |
std::vector< uint16_t > | counters | ||
) |
Send the counter list to ArmNN.
Definition at line 106 of file GatordMockService.cpp.
References armnn::profiling::WriteUint16(), and armnn::profiling::WriteUint32().
Referenced by CommandFileParser::ParseFile(), and GatordMockService::ReceiveThreadRunning().
void SendRequestCounterDir | ( | ) |
Send a request counter directory packet back to the client.
Definition at line 34 of file GatordMockService.cpp.
Referenced by GatordMockService::GatordMockService(), and CommandFileParser::ParseFile().
void WaitCommand | ( | uint32_t | timeout | ) |
Execute the WAIT command from the comamnd file.
Definition at line 138 of file GatordMockService.cpp.
References GatordMockService::ReceiveThreadRunning().
Referenced by CommandFileParser::ParseFile(), and GatordMockService::ReceiveThreadRunning().
void WaitForReceivingThread | ( | ) |
This is a placeholder method to prevent main exiting.
It can be removed once the command handling code is added.
Definition at line 81 of file GatordMockService.cpp.
Referenced by CreateMockService(), and GatordMockService::GetPacketsReceivedCount().
bool WaitForStreamMetaData | ( | ) |
Once the connection is open wait to receive the stream meta data packet from the client.
Reading this packet differs from others as we need to determine endianness.
Definition at line 101 of file GatordMockService.cpp.
Referenced by CreateMockService(), and GatordMockService::GatordMockService().