Commits (2)
syntax = "proto3"; //proto v3.
package telemetry; //package name
message Telemetry { //telemetry message structure definition.
string node_id_str = 1; //The hostname of the device is the unique identifier of the device in the network, which can be configured and modified by the user. It is encoded as 1 in GPB encoding.
string subscription_id_str = 2; //Subscription name, the subscription name when the subscription is statically configured
string sensor_path = 3; //Subscription path
uint64 collection_id = 4; //Identify sampling rounds
uint64 collection_start_time = 5; //Identify the start time of the sampling round
uint64 msg_timestamp = 6; //Timestamp when this message was generated
TelemetryGPBTable data_gpb = 7; //data carried.
uint64 collection_end_time = 8; //Identify the end time of the sampling round
uint32 current_period = 9; //Sampling accuracy, in milliseconds
string except_desc = 10; //Exception description information, which is used to report exception information when sampling exceptions.
string product_name = 11; //Product name.
Encoding encoding = 12; //Data encoding.
enum Encoding {
Encoding_GPB = 0;
};
}
message TelemetryGPBTable { //TelemetryGPBTable message structure definition
repeated TelemetryRowGPB row = 1; //Array definition, the identification data is the repetition of the TelemetryRowGPB structure.
}
message TelemetryRowGPB {
uint64 timestamp = 1; //Timestamp at which the current instance was sampled.
bytes content = 11; //The sampled instance data carried is encoded as 11 in GPB encoding. It is necessary to combine the sensor_path field to determine which proto file will be encoded here.
}
syntax = "proto3";
package dialin;
service gRPCConfigOper {
rpc Subscribe(SubsArgs) returns(stream SubsReply) {};
rpc Cancel(CancelArgs) returns(CancelReply) {};
}
message Path {
string path = 1;
}
message SubsArgs {
uint64 request_id = 1;
uint32 encoding = 2;
repeated Destination destination = 3;
//Path to a section of operational state of interest (the sensor).
repeated Path path = 5;
//The accuracy of the collected data reported by the device
//to the collector
uint64 sample_interval = 6;
//Maximum time interval in seconds that may pass
//between updates from a device to a telemetry collector.
//If this interval expires, but there is no updated data to
//send (such as if suppress_updates has been configured), the
//device must send a telemetry message to the collector.
uint64 heartbeat_interval = 7;
//Boolean flag to control suppression of redundant
//telemetry updates to the collector platform. If this flag is
//set to TRUE, then the collector will only send an update at
//the configured interval if a subscribed data value has
//changed. Otherwise, the device will not send an update to
//the collector until expiration of the heartbeat interval.
bool suppress_redundant = 8;
//range "0..63"
//The dscp type represents a Differentiated Services Code Point
//that may be used for marking packets in a traffic stream.
//In the value set and its semantics, this type is equivalent
//to the Dscp textual convention of the SMIv2.
uint32 originated_qos_marking = 9;
}
message Destination {
// IP address of the telemetry stream destination
string destination_address = 1;
// Protocol (udp or tcp) port number for the telemetry
// stream destination
uint32 destination_port = 2;
}
message SubsReply {
uint32 subscription_id = 1;
uint64 request_id = 2;
string response_code = 3;
//containing the data described by the Telemetry message
//defined in hw_telemetry.proto
bytes message = 4;
}
message CancelArgs {
uint64 request_id = 1;
uint32 subscription_id = 2;
}
message CancelReply {
uint64 request_id = 1;
string response_code = 2;
string message = 3;
}
syntax = "proto3";
package dialout;
service gRPCDataservice {
rpc dataPublish(stream serviceArgs) returns(stream serviceArgs) {};
}
message serviceArgs {
int64 ReqId = 1;
bytes data = 2;
string errors = 3;
}