1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-29 13:49:28 +08:00
Mainflux.mainflux/message.proto
Dušan Borovčanin 3f3b42b511 MF-519 - Refine Message (#567)
* Enable Message JSON mashaling/unmarshaling

Update Protobuf generated files.

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>

* Update readers and SDK to use Mainflux Message

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>

* Fix alignment

Signed-off-by: Dusan Borovcanin <dusan.borovcanin@mainflux.com>
2019-02-06 13:57:12 +01:00

43 lines
873 B
Protocol Buffer

//
// Copyright (c) 2018
// Mainflux
//
// SPDX-License-Identifier: Apache-2.0
//
syntax = "proto3";
package mainflux;
// RawMessage represents a message emitted by the Mainflux adapters layer.
message RawMessage {
string channel = 1;
string publisher = 2;
string protocol = 3;
string contentType = 4;
bytes payload = 5;
}
// Message represents a resolved (normalized) raw message.
message Message {
string channel = 1;
string publisher = 2;
string protocol = 3;
string name = 4;
string unit = 5;
oneof value {
double floatValue = 6;
string stringValue = 7;
bool boolValue = 8;
string dataValue = 9;
}
SumValue valueSum = 10;
double time = 11;
double updateTime = 12;
string link = 13;
}
// SumValue is a simple wrapper around the double value.
message SumValue {
double value = 1;
}