2021-10-06 21:25:43 +00:00
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
2022-08-26 01:01:39 +00:00
|
|
|
// SCSI Target Emulator RaSCSI Reloaded
|
2021-10-06 21:25:43 +00:00
|
|
|
// for Raspberry Pi
|
|
|
|
//
|
2022-09-07 14:38:42 +00:00
|
|
|
// Copyright (C) 2021-2022 Uwe Seimet
|
2021-10-06 21:25:43 +00:00
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-11-10 06:44:06 +00:00
|
|
|
#include "generated/rascsi_interface.pb.h"
|
2022-10-08 17:26:04 +00:00
|
|
|
#include <string>
|
|
|
|
#include <sstream>
|
2021-10-06 21:25:43 +00:00
|
|
|
|
2022-10-08 17:26:04 +00:00
|
|
|
using namespace std;
|
2022-10-04 15:23:42 +00:00
|
|
|
using namespace rascsi_interface;
|
2021-10-06 21:25:43 +00:00
|
|
|
|
|
|
|
class RasctlDisplay
|
|
|
|
{
|
2022-10-08 17:26:04 +00:00
|
|
|
public:
|
2021-10-06 21:25:43 +00:00
|
|
|
|
2022-09-07 14:38:42 +00:00
|
|
|
RasctlDisplay() = default;
|
|
|
|
~RasctlDisplay() = default;
|
2021-10-06 21:25:43 +00:00
|
|
|
|
2022-10-08 17:26:04 +00:00
|
|
|
string DisplayDevicesInfo(const PbDevicesInfo&) const;
|
|
|
|
string DisplayDeviceInfo(const PbDevice&) const;
|
|
|
|
string DisplayVersionInfo(const PbVersionInfo&) const;
|
|
|
|
string DisplayLogLevelInfo(const PbLogLevelInfo&) const;
|
|
|
|
string DisplayDeviceTypesInfo(const PbDeviceTypesInfo&) const;
|
|
|
|
string DisplayReservedIdsInfo(const PbReservedIdsInfo&) const;
|
|
|
|
string DisplayImageFile(const PbImageFile&) const;
|
|
|
|
string DisplayImageFilesInfo(const PbImageFilesInfo&) const;
|
|
|
|
string DisplayNetworkInterfaces(const PbNetworkInterfacesInfo&) const;
|
|
|
|
string DisplayMappingInfo(const PbMappingInfo&) const;
|
|
|
|
string DisplayOperationInfo(const PbOperationInfo&) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void DisplayParams(ostringstream&, const PbDevice&) const;
|
|
|
|
void DisplayAttributes(ostringstream&, const PbDeviceProperties&) const;
|
|
|
|
void DisplayDefaultParameters(ostringstream&, const PbDeviceProperties&) const;
|
|
|
|
void DisplayBlockSizes(ostringstream&, const PbDeviceProperties&) const;
|
|
|
|
void DisplayParameters(ostringstream&, const PbOperationMetaData&) const;
|
|
|
|
void DisplayPermittedValues(ostringstream&, const PbOperationParameter&) const;
|
2021-10-06 21:25:43 +00:00
|
|
|
};
|