2022-05-05 20:13:30 +01:00
|
|
|
#include "BloomVersion.hpp"
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
#include "src/DebugServer/Gdb/ResponsePackets/ErrorResponsePacket.hpp"
|
|
|
|
|
#include "src/DebugServer/Gdb/ResponsePackets/ResponsePacket.hpp"
|
|
|
|
|
|
|
|
|
|
#include "src/Application.hpp"
|
2023-01-21 13:37:56 +00:00
|
|
|
|
2022-12-26 21:47:09 +00:00
|
|
|
#include "src/Services/PathService.hpp"
|
2023-01-21 14:27:45 +00:00
|
|
|
#include "src/Services/StringService.hpp"
|
2022-05-05 20:13:30 +01:00
|
|
|
#include "src/Logger/Logger.hpp"
|
2023-01-21 13:37:56 +00:00
|
|
|
|
2023-08-13 15:47:51 +01:00
|
|
|
namespace DebugServer::Gdb::CommandPackets
|
2022-05-05 20:13:30 +01:00
|
|
|
{
|
2022-12-26 21:27:19 +00:00
|
|
|
using Services::TargetControllerService;
|
2022-05-05 20:13:30 +01:00
|
|
|
|
|
|
|
|
using ResponsePackets::ErrorResponsePacket;
|
|
|
|
|
using ResponsePackets::ResponsePacket;
|
|
|
|
|
|
|
|
|
|
BloomVersion::BloomVersion(Monitor&& monitorPacket)
|
|
|
|
|
: Monitor(std::move(monitorPacket))
|
|
|
|
|
{}
|
|
|
|
|
|
2022-12-26 21:27:19 +00:00
|
|
|
void BloomVersion::handle(DebugSession& debugSession, TargetControllerService&) {
|
2023-05-07 20:17:33 +01:00
|
|
|
Logger::info("Handling BloomVersion packet");
|
2022-05-05 20:13:30 +01:00
|
|
|
|
2023-01-21 14:27:45 +00:00
|
|
|
debugSession.connection.writePacket(ResponsePacket(Services::StringService::toHex(
|
2022-05-05 20:13:30 +01:00
|
|
|
std::string(
|
|
|
|
|
"Bloom v" + Application::VERSION.toString() + "\n"
|
2022-12-26 21:47:09 +00:00
|
|
|
+ Services::PathService::homeDomainName() + "\n"
|
2022-05-05 20:13:30 +01:00
|
|
|
+ "Nav Mohammed\n"
|
|
|
|
|
)
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
}
|