Midnight Sun Firmware
Loading...
Searching...
No Matches
metadata.h
1
#pragma once
2
3
/************************************************************************************************
4
* @file metadata.h
5
*
6
* @brief Header file defining the Metadata class
7
*
8
* @date 2025-01-04
9
* @author Aryan Kashem
10
************************************************************************************************/
11
12
/* Standard library Headers */
13
#include <cstdint>
14
#include <string>
15
16
/* Inter-component Headers */
17
18
/* Intra-component Headers */
19
26
namespace
Datagram {
27
34
class
Metadata
{
35
public
:
39
struct
Payload
{
40
std::string
projectName
;
41
std::string
projectStatus
;
42
std::string
hardwareModel
;
43
};
44
49
explicit
Metadata
(
Payload
&data);
50
54
Metadata
() =
default
;
55
60
std::string
serialize
()
const
;
61
66
void
deserialize
(std::string &metadataPayload);
67
72
void
setProjectName
(
const
std::string &projectName);
73
78
void
setProjectStatus
(
const
std::string &projectStatus);
79
84
void
setHardwareModel
(
const
std::string &hardwareModel);
85
90
std::string
getProjectName
()
const
;
91
96
std::string
getProjectStatus
()
const
;
97
102
std::string
getHardwareModel
()
const
;
103
104
private
:
105
Payload
m_metadata
;
106
};
107
108
}
// namespace Datagram
109
Datagram::Metadata
Definition:
metadata.h:34
Datagram::Metadata::getProjectStatus
std::string getProjectStatus() const
Gets the target project status.
Definition:
metadata.cc:61
Datagram::Metadata::m_metadata
Payload m_metadata
Definition:
metadata.h:105
Datagram::Metadata::setProjectName
void setProjectName(const std::string &projectName)
Sets the target project name.
Definition:
metadata.cc:45
Datagram::Metadata::Metadata
Metadata()=default
Default constructor for Metadata object.
Datagram::Metadata::serialize
std::string serialize() const
Serializes Metadata data with the Metadata command code for transmission.
Definition:
metadata.cc:23
Datagram::Metadata::getProjectName
std::string getProjectName() const
Gets the target project name.
Definition:
metadata.cc:57
Datagram::Metadata::setHardwareModel
void setHardwareModel(const std::string &hardwareModel)
Sets the target hardware model.
Definition:
metadata.cc:53
Datagram::Metadata::deserialize
void deserialize(std::string &metadataPayload)
Deserializes Metadata data from payload string.
Definition:
metadata.cc:33
Datagram::Metadata::getHardwareModel
std::string getHardwareModel() const
Gets the target hardware model.
Definition:
metadata.cc:65
Datagram::Metadata::setProjectStatus
void setProjectStatus(const std::string &projectStatus)
Sets the target project status.
Definition:
metadata.cc:49
Datagram::Metadata::Payload
Metadata Datagram payload storage.
Definition:
metadata.h:39
Datagram::Metadata::Payload::hardwareModel
std::string hardwareModel
Definition:
metadata.h:42
Datagram::Metadata::Payload::projectStatus
std::string projectStatus
Definition:
metadata.h:41
Datagram::Metadata::Payload::projectName
std::string projectName
Definition:
metadata.h:40
simulation
common
inc
metadata.h
Generated by
1.9.5