| 1 | package PluginCommand;
|
|---|
| 2 |
|
|---|
| 3 | message Header {
|
|---|
| 4 | enum Type {
|
|---|
| 5 | REQUEST = 1;
|
|---|
| 6 | RESPONSE = 2;
|
|---|
| 7 | };
|
|---|
| 8 | enum Version {
|
|---|
| 9 | VERSION_1 = 1;
|
|---|
| 10 | };
|
|---|
| 11 | required Type type = 1;
|
|---|
| 12 | required Version version = 2;
|
|---|
| 13 | optional Version max_supported_version = 3;
|
|---|
| 14 |
|
|---|
| 15 | optional string sender = 17;
|
|---|
| 16 | optional string recipient = 18;
|
|---|
| 17 | optional int32 id = 19;
|
|---|
| 18 | };
|
|---|
| 19 |
|
|---|
| 20 | message Request {
|
|---|
| 21 | enum Version {
|
|---|
| 22 | VERSION_1 = 1;
|
|---|
| 23 | };
|
|---|
| 24 |
|
|---|
| 25 | required Version version = 1;
|
|---|
| 26 | optional int32 id = 2;
|
|---|
| 27 | required string command = 3;
|
|---|
| 28 | repeated string arguments = 4;
|
|---|
| 29 | };
|
|---|
| 30 |
|
|---|
| 31 | message PerformanceData {
|
|---|
| 32 | enum Type {
|
|---|
| 33 | INT = 1;
|
|---|
| 34 | STRING = 1;
|
|---|
| 35 | FLOAT = 1;
|
|---|
| 36 | };
|
|---|
| 37 | message IntValue {
|
|---|
| 38 | required int64 value = 1;
|
|---|
| 39 | required int64 maximum = 2;
|
|---|
| 40 | required int64 minimum = 3;
|
|---|
| 41 | required string unit = 4;
|
|---|
| 42 | }
|
|---|
| 43 | message StringValue {
|
|---|
| 44 | required string value = 1;
|
|---|
| 45 | }
|
|---|
| 46 | message FloatValue {
|
|---|
| 47 | required float value = 1;
|
|---|
| 48 | required float maximum = 2;
|
|---|
| 49 | required float minimum = 3;
|
|---|
| 50 | required string unit = 4;
|
|---|
| 51 | }
|
|---|
| 52 | required string alias = 1;
|
|---|
| 53 | required Type type = 2;
|
|---|
| 54 | optional IntValue int_value = 3;
|
|---|
| 55 | optional StringValue string_value = 4;
|
|---|
| 56 | optional FloatValue float_value = 5;
|
|---|
| 57 |
|
|---|
| 58 | // TODO add thresholds here!
|
|---|
| 59 |
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 | message Response {
|
|---|
| 63 | enum Code {
|
|---|
| 64 | OK = 0;
|
|---|
| 65 | WARNING = 1;
|
|---|
| 66 | CRITCAL = 2;
|
|---|
| 67 | UNKNOWN = 3;
|
|---|
| 68 | };
|
|---|
| 69 | enum Version {
|
|---|
| 70 | VERSION_1 = 1;
|
|---|
| 71 | };
|
|---|
| 72 |
|
|---|
| 73 | required Version version = 1;
|
|---|
| 74 | optional int32 id = 2;
|
|---|
| 75 | required string command = 5;
|
|---|
| 76 | repeated string arguments = 16;
|
|---|
| 77 |
|
|---|
| 78 | required Code result = 9;
|
|---|
| 79 | required string message = 10;
|
|---|
| 80 | repeated PerformanceData perf = 11;
|
|---|
| 81 |
|
|---|
| 82 | }
|
|---|
| 83 |
|
|---|
| 84 | message RequestMessage {
|
|---|
| 85 | required Header header = 1;
|
|---|
| 86 | repeated Request payload = 2;
|
|---|
| 87 | }
|
|---|
| 88 | message ResponseMessage {
|
|---|
| 89 | required Header header = 1;
|
|---|
| 90 | repeated Response payload = 2;
|
|---|
| 91 | }
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|