blob: 79acf7d8e60936982e8ec094537750d1495af4e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
// @file sns_registry.proto
//
// Sensors Registry message definitions for internal and external clients
//
// Copyright (c) 2017,2020 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
syntax = "proto2";
import "nanopb.proto";
// Registry Sensor Attribute Requirements:
// SNS_STD_SENSOR_ATTRID_TYPE: "registry"
// SNS_STD_SENSOR_ATTRID_STREAM_TYPE: SNS_STD_SENSOR_STREAM_TYPE_SINGLE_OUTPUT
// Registry Sensor message IDs:
enum sns_registry_msgid {
option (nanopb_enumopt).long_names = false;
SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_REQ = 512;
SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_REQ = 513;
// The following event was mistakenly given an invalid message ID
SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_EVENT = 514;
SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_EVENT = 768;
}
message sns_registry_data
{
message item
{
option (nanopb_msgopt).no_unions = true;
// Item name (i.e. Only item-specific name, sans group name)
required string name = 1;
optional fixed32 version = 2;
oneof data
{
sns_registry_data subgroup = 10;
string str = 11;
float flt = 12;
sfixed64 sint = 13;
}
}
repeated item items = 3;
}
// All read requests will be replied with a read event
message sns_registry_read_req
{
// Full name of the item or group to be read
required string name = 1;
}
message sns_registry_read_event
{
// Full name of the group which was read
required string name = 1;
// If the requested registry group was not found, data is empty
required sns_registry_data data = 2;
}
// All write requests will be replied with a write event
message sns_registry_write_req
{
// Full name of the group to be written
required string name = 1;
required sns_registry_data data = 2;
}
// Registry write status
enum sns_registry_write_status
{
option (nanopb_enumopt).long_names = false;
// The registry write was successful, and the data was stored on the FS
SNS_REGISTRY_WRITE_STATUS_SUCCESS = 0;
// An unspecified error has occurred; data may be lost
SNS_REGISTRY_WRITE_STATUS_ERROR_OTHER = 1;
}
message sns_registry_write_event
{
required sns_registry_write_status status = 1;
}
|