github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/apis/v1/network.proto (about) 1 // Copyright 2020 Ewout Prangsma 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 // Author Ewout Prangsma 16 // 17 18 syntax = "proto3"; 19 20 package binkynet.v1; 21 22 option go_package = "github.com/binkynet/BinkyNet/apis/v1"; 23 option csharp_namespace = "BinkyNet.Apis.V1"; 24 25 import "types.proto"; 26 27 // NetworkControlService is served by the network master and used by 28 // users of the Binky Network to control the network. 29 // Network masters make themselves available in mDNS under service type "_nwctrl._binkynet._tcp". 30 service NetworkControlService { 31 // Set the requested local worker state 32 rpc SetLocalWorkerRequest(LocalWorker) returns (Empty); 33 // Set the actual local worker state 34 rpc SetLocalWorkerActual(LocalWorker) returns (Empty); 35 // Watch local worker changes 36 rpc WatchLocalWorkers(WatchOptions) returns (stream LocalWorker); 37 38 // Set an actual device discovery state 39 rpc SetDeviceDiscoveryActual(DeviceDiscovery) returns (Empty); 40 41 // Set the actual power state 42 rpc SetPowerActual(PowerState) returns (Empty); 43 44 // Set an actual loc state 45 rpc SetLocActual(Loc) returns (Empty); 46 47 // Set an actual sensor state 48 rpc SetSensorActual(Sensor) returns (Empty); 49 50 // Set an actual output state 51 rpc SetOutputActual(Output) returns (Empty); 52 53 // Set an actual switch state 54 rpc SetSwitchActual(Switch) returns (Empty); 55 56 // Set an actual clock state 57 rpc SetClockActual(binkynet.v1.Clock) returns (Empty); 58 // Watch clock changes 59 rpc WatchClock(WatchOptions) returns (stream binkynet.v1.Clock); 60 } 61 62 message WatchOptions { 63 // If set, send changes in request state 64 bool watch_request_changes = 1; 65 // If set, send changes in actual state 66 bool watch_actual_changes = 2; 67 // If set, send changes related to this and global module only 68 string module_id = 3; 69 }