Renamed ResponseFrameType alias to ExpectedResponseFrameType
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames
|
||||
class Avr8GenericCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
||||
{
|
||||
public:
|
||||
using ResponseFrameType = ResponseFrames::Avr8Generic::Avr8GenericResponseFrame;
|
||||
using ExpectedResponseFrameType = ResponseFrames::Avr8Generic::Avr8GenericResponseFrame;
|
||||
|
||||
Avr8GenericCommandFrame(): AvrCommandFrame<PayloadContainerType>(ProtocolHandlerId::AVR8_GENERIC) {}
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames
|
||||
class GetDeviceId: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||
{
|
||||
public:
|
||||
using ResponseFrameType = ResponseFrames::Avr8Generic::GetDeviceId;
|
||||
using ExpectedResponseFrameType = ResponseFrames::Avr8Generic::GetDeviceId;
|
||||
|
||||
GetDeviceId() {
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames
|
||||
class GetProgramCounter: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||
{
|
||||
public:
|
||||
using ResponseFrameType = ResponseFrames::Avr8Generic::GetProgramCounter;
|
||||
using ExpectedResponseFrameType = ResponseFrames::Avr8Generic::GetProgramCounter;
|
||||
|
||||
GetProgramCounter() {
|
||||
/*
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames
|
||||
class ReadMemory: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
||||
{
|
||||
public:
|
||||
using ResponseFrameType = ResponseFrames::Avr8Generic::ReadMemory;
|
||||
using ExpectedResponseFrameType = ResponseFrames::Avr8Generic::ReadMemory;
|
||||
|
||||
ReadMemory(
|
||||
const Avr8MemoryType& type,
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
);
|
||||
|
||||
public:
|
||||
using ResponseFrameType = AvrResponseFrame;
|
||||
using ExpectedResponseFrameType = AvrResponseFrame;
|
||||
|
||||
explicit AvrCommandFrame(ProtocolHandlerId protocolHandlerId): protocolHandlerId(protocolHandlerId) {
|
||||
if (LAST_SEQUENCE_ID < std::numeric_limits<decltype(LAST_SEQUENCE_ID)>::max()) {
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames
|
||||
class DiscoveryCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
||||
{
|
||||
public:
|
||||
using ResponseFrameType = ResponseFrames::DiscoveryResponseFrame;
|
||||
using ExpectedResponseFrameType = ResponseFrames::DiscoveryResponseFrame;
|
||||
|
||||
DiscoveryCommandFrame(): AvrCommandFrame<PayloadContainerType>(ProtocolHandlerId::DISCOVERY) {}
|
||||
};
|
||||
|
||||
@@ -50,13 +50,13 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg
|
||||
);
|
||||
|
||||
template<class CommandFrameType>
|
||||
typename CommandFrameType::ResponseFrameType sendAvrCommandFrameAndWaitForResponseFrame(
|
||||
typename CommandFrameType::ExpectedResponseFrameType sendAvrCommandFrameAndWaitForResponseFrame(
|
||||
const CommandFrameType& avrCommandFrame
|
||||
) {
|
||||
static_assert(
|
||||
std::is_base_of<
|
||||
Protocols::CmsisDap::Edbg::Avr::AvrResponseFrame,
|
||||
typename CommandFrameType::ResponseFrameType
|
||||
typename CommandFrameType::ExpectedResponseFrameType
|
||||
>::value,
|
||||
"AVR Command must specify a valid response frame type, derived from AvrResponseFrame."
|
||||
);
|
||||
@@ -71,7 +71,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg
|
||||
}
|
||||
|
||||
auto responses = this->requestAvrResponses();
|
||||
auto responseFrame = typename CommandFrameType::ResponseFrameType();
|
||||
auto responseFrame = typename CommandFrameType::ExpectedResponseFrameType();
|
||||
responseFrame.initFromAvrResponses(responses);
|
||||
return responseFrame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user