/* ========================= LICENSE =================================
 *
 * Copyright (C) 2024 Markus Lehr
 *
 + closed License property of Markus Lehr
 *
 * ========================= LICENSE =================================
*/

syntax = "proto3";

option py_generic_services = true;

package proto_messages;

///////////////////////////////////////////////////////
// RT Service
///////////////////////////////////////////////////////
message SCreateIn
{
    string name = 1;
    string id = 2;  
    int64 samplerate = 3;
    int64 sampleperiod = 4;
    int64 downtime = 5;
    string status = 6;      
}

message SDeleteIn
{
    string id = 1;  
}

message SMonStateIn
{
    string id = 1;  
}

message SMonStatesIn
{
    string query = 1;  
}


message SSetMonStateIn
{
    string id = 1;
    string status  = 2;
}


message SResult
{
  bool result = 1;  

}

message SStateResult
{
  repeated string result = 1;  

}



service RTService
{
    rpc CreateMonitoring(SCreateIn) returns (SResult);
    rpc DeleteMonitoring   (SDeleteIn) returns (SResult);
    rpc GetMonitoringState (SMonStateIn) returns (SResult);
    rpc GetMonitoringStates (SMonStatesIn) returns (SStateResult);
    rpc SetMonitoringState (SSetMonStateIn) returns (SResult);  

}