aartum / CA2-SIG-StandardsWG

Repo for collaboration on standards for climate action and accounting.
Apache License 2.0
2 stars 4 forks source link

Encode 'Methodology' message as 'Control' message #54

Open AlexIvanHoward opened 1 year ago

AlexIvanHoward commented 1 year ago
syntax = "proto3";

package base;

import "n_calculation.proto";

enum MethodologyType {
    MEASUREMENT = 0;
    CALCULATION = 1;
    SOURCE = 2;
}

message Methodology {
    string identifier = 1;
    MethodologyType type = 2;
    repeated string ids_parameters = 6; // The parameters to which this methodology applies.
    string procedure = 3; // Only applicable if MethodologyType = "MEASUREMENT".
    string source = 4; // Only applicable if MethodologyType = "SOURCE".
    Calculation calculation = 5; // Only applicable if MethodologyType = "CALCULATION".
}

/* Consider extracting "procedure" and "source" into classes of their own. */