RASCSI/src/raspberrypi/command_util.h
Uwe Seimet a30438279e
Moved rascsi/rasctl specific classes to sub-folders, cleaned up code, fixed SonarCloud issues (#889)
* Moved rasctl/rascsi core code to folders

* Improved granularity in order to add more unit tests

* Pointer handling update

* Updated ID and controller handling

* Updated memory management

* Added unit tests

* Fixed SonarCloud issues
2022-10-06 16:15:19 +02:00

30 lines
865 B
C++

//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// for Raspberry Pi
//
// Copyright (C) 2021-2022 Uwe Seimet
//
// Helper methods for serializing/deserializing protobuf messages
//
//---------------------------------------------------------------------------
#pragma once
#include "google/protobuf/message.h"
#include "rascsi_interface.pb.h"
#include <string>
using namespace std;
using namespace rascsi_interface;
namespace command_util
{
void ParseParameters(PbDeviceDefinition&, const string&);
string GetParam(const PbCommand&, const string&);
string GetParam(const PbDeviceDefinition&, const string&);
void AddParam(PbCommand&, const string&, string_view);
void AddParam(PbDevice&, const string&, string_view);
void AddParam(PbDeviceDefinition&, const string&, string_view);
}