Skip to content

Commit 36e841a

Browse files
committed
feat: add device registration event
protoc --elixir_out=. --elixir_opt=package_prefix=astarte.core.triggers.simple_events lib/astarte_core/triggers/simple_events/*.proto Signed-off-by: Francesco Noacco <francesco.noacco@secomind.com>
1 parent 76f2358 commit 36e841a

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
defmodule Astarte.Core.Triggers.SimpleEvents.DeviceRegisteredEvent do
2+
@moduledoc false
3+
4+
use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3
5+
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// This file is part of Astarte.
3+
//
4+
// Copyright 2025 SECO Mind Srl
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
19+
syntax = "proto3";
20+
21+
message DeviceRegisteredEvent {
22+
}

lib/astarte_core/triggers/simple_events/simple_event.pb.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ defmodule Astarte.Core.Triggers.SimpleEvents.SimpleEvent do
7979
json_name: "deviceErrorEvent",
8080
oneof: 0
8181

82+
field :device_registered_event, 20,
83+
type: Astarte.Core.Triggers.SimpleEvents.DeviceRegisteredEvent,
84+
json_name: "deviceRegisteredEvent",
85+
oneof: 0
86+
8287
field :device_deletion_started_event, 21,
8388
type: Astarte.Core.Triggers.SimpleEvents.DeviceDeletionStartedEvent,
8489
json_name: "deviceDeletionStartedEvent",

lib/astarte_core/triggers/simple_events/simple_event.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ syntax = "proto3";
2020

2121
import "lib/astarte_core/triggers/simple_events/device_connected_event.proto";
2222
import "lib/astarte_core/triggers/simple_events/device_disconnected_event.proto";
23+
import "lib/astarte_core/triggers/simple_events/device_registered_event.proto";
2324
import "lib/astarte_core/triggers/simple_events/device_deletion_started_event.proto";
2425
import "lib/astarte_core/triggers/simple_events/device_deletion_finished_event.proto";
2526
import "lib/astarte_core/triggers/simple_events/device_error_event.proto";
@@ -58,6 +59,7 @@ message SimpleEvent {
5859
InterfaceRemovedEvent interface_removed_event = 16;
5960
InterfaceMinorUpdatedEvent interface_minor_updated_event = 17;
6061
DeviceErrorEvent device_error_event = 19;
62+
DeviceRegisteredEvent device_registered_event = 20;
6163
DeviceDeletionStartedEvent device_deletion_started_event = 21;
6264
DeviceDeletionFinishedEvent device_deletion_finished_event = 22;
6365
}

0 commit comments

Comments
 (0)