-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathods_notification.proto
70 lines (63 loc) · 2.78 KB
/
ods_notification.proto
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
syntax = "proto3";
//////////////////////////////////////////////////////////
// ASAM ODS V6.0.1
//
// (c) by ASAM e.V., 2024
//
// Protobuf notification protocol buffers
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//
//////////////////////////////////////////////////////////
package ods.notification;
/*
Enumeration to define which type of modifications will be notified.
*/
enum NotificationTypeEnum {
NT_ALL = 0; // All kind of events.
NT_NEW = 1; // When new instances are created.
NT_MODIFY = 2; // When instances are changed.
NT_DELETE = 3; // When instances are deleted.
NT_MODEL = 4; // When the application model is changed.
NT_SECURITY = 5; // When the rights of an data-object are changed.
}
/*
Request for the registration.
*/
message RegistrationRequest {
/*
Enumeration to define which mode will be used for the notification.
*/
enum NotificationModeEnum {
NM_POOL = 0; // Client polls the server for the next events.
NM_PUSH = 1; // Server pushes the events to the client.
}
/*
Definition of the type of the notification for the different elements.
*/
message TypeElement {
NotificationTypeEnum type = 1; // Type of the notification.
repeated int64 aids = 2; // List of the elements, no entries in the list means all elements. Not used in case type = MODEL.
}
NotificationModeEnum mode = 1; // The mode.
repeated TypeElement entries = 2; // The entries with the type for the elements.
}
/*
An notification event. Will be transferred at SSE.
*/
message Notification {
string uuid = 1; // Unique Id generated by server for client event recognition.
NotificationTypeEnum type = 2; // Type of the modification.
int64 aid = 3; // Modified data-object application element id.
repeated int64 iids = 4; // Modified data-object instance element ids.
string timestamp = 5; // Information on date and time the event occurred; DT_DATE.
int64 user_id = 6; // Id of the user (if any) that invoked the change.
}
/*
Response for notification polling.
*/
message NotificationPool {
repeated Notification events = 1;
}