Renamed CMSIS commandId field to id

This commit is contained in:
Nav
2022-10-01 21:02:10 +01:00
parent 065a389dfe
commit 9fb017c2de
3 changed files with 4 additions and 4 deletions

View File

@@ -98,7 +98,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
this->sendCommand(cmsisDapCommand);
auto response = this->getResponse<typename CommandType::ExpectedResponseType>();
if (response.id != cmsisDapCommand.commandId) {
if (response.id != cmsisDapCommand.id) {
throw Exceptions::DeviceCommunicationFailure("Unexpected response to CMSIS-DAP command.");
}

View File

@@ -3,11 +3,11 @@
namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
{
Command::Command(unsigned char commandId)
: commandId(commandId)
: id(commandId)
{}
Command::operator std::vector<unsigned char>() const {
auto rawCommand = std::vector<unsigned char>(1, this->commandId);
auto rawCommand = std::vector<unsigned char>(1, this->id);
rawCommand.insert(rawCommand.end(), this->data.begin(), this->data.end());
return rawCommand;

View File

@@ -50,7 +50,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
*/
using ExpectedResponseType = Response;
unsigned char commandId;
unsigned char id;
std::vector<unsigned char> data;
explicit Command(unsigned char commandId);