11#ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_PROCESS_DESCRIPTOR_PROTO_H_
12#define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_PROCESS_DESCRIPTOR_PROTO_H_
17#include "perfetto/protozero/field_writer.h"
18#include "perfetto/protozero/message.h"
19#include "perfetto/protozero/packed_repeated_fields.h"
20#include "perfetto/protozero/proto_decoder.h"
21#include "perfetto/protozero/proto_utils.h"
32 : TypedProtoDecoder(data, len) {}
34 : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()),
37 : TypedProtoDecoder(raw.data, raw.size) {}
38 bool has_pid()
const {
return at<1>().valid(); }
39 int32_t
pid()
const {
return at<1>().as_int32(); }
41 ::protozero::ConstChars
process_name()
const {
return at<6>().as_string(); }
52 return ".perfetto.protos.ProcessDescriptor";
57 ::protozero::proto_utils::RepetitionType::kNotRepeated,
58 ::protozero::proto_utils::ProtoSchemaType::kInt32,
71 static constexpr uint32_t field_id = FieldMetadata_Pid::kFieldId;
74 ::protozero::internal::FieldWriter<
75 ::protozero::proto_utils::ProtoSchemaType::kInt32>::Append(*
this,
82 ::protozero::proto_utils::RepetitionType::kNotRepeated,
83 ::protozero::proto_utils::ProtoSchemaType::kString,
96 AppendBytes(FieldMetadata_ProcessName::kFieldId, data, size);
99 AppendBytes(FieldMetadata_ProcessName::kFieldId, chars.data, chars.size);
102 static constexpr uint32_t field_id = FieldMetadata_ProcessName::kFieldId;
105 ::protozero::internal::FieldWriter<
106 ::protozero::proto_utils::ProtoSchemaType::kString>::Append(*
this,
bool has_process_name() const
ProcessDescriptor_Decoder(const std::string &raw)
ProcessDescriptor_Decoder(const uint8_t *data, size_t len)
ProcessDescriptor_Decoder(const ::protozero::ConstBytes &raw)
::protozero::ConstChars process_name() const
::protozero::proto_utils::FieldMetadata< 6, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kString, std::string, ProcessDescriptor > FieldMetadata_ProcessName
void set_process_name(const char *data, size_t size)
static constexpr FieldMetadata_Pid kPid()
static constexpr const char * GetName()
@ kProcessNameFieldNumber
void set_pid(int32_t value)
static constexpr FieldMetadata_ProcessName kProcessName()
void set_process_name(::protozero::ConstChars chars)
void set_process_name(std::string value)
::protozero::proto_utils::FieldMetadata< 1, ::protozero::proto_utils::RepetitionType::kNotRepeated, ::protozero::proto_utils::ProtoSchemaType::kInt32, int32_t, ProcessDescriptor > FieldMetadata_Pid