// ###############################################################
// Copyright(c) Carl Zeiss AG, Germany. All Rights Reserved.
//
// Permission is granted to use and distribute this code,
// as long as this copyright notice remains part of the code.
// ###############################################################

syntax = "proto3";
package zen_api.em.hardware.v1;

// The DetectorServiceGetAvailableDetectorsRequest class.
message DetectorServiceGetAvailableDetectorsRequest {
}
// Response object representing a list of available detectors.
message DetectorServiceGetAvailableDetectorsResponse {
   // The available detectors on the system.
   repeated string detector_names = 1;
}
// The DetectorServiceGetBrightnessRequest class.
message DetectorServiceGetBrightnessRequest {
   // The unique name of the detector to control as string. Must be part of ZenApi.EM.Hardware.V1.IDetectorApi.GetAvailableDetectors.
   string detector_name = 1;
}
// Response object representing a detector brightness value.
message DetectorServiceGetBrightnessResponse {
   // The brightness in percentage [0, 100].
   double brightness = 1;
}
// The DetectorServiceGetContrastRequest class.
message DetectorServiceGetContrastRequest {
   // The unique name of the detector to control as string. Must be part of ZenApi.EM.Hardware.V1.IDetectorApi.GetAvailableDetectors.
   string detector_name = 1;
}
// Response object representing a detector contrast value.
message DetectorServiceGetContrastResponse {
   // The contrast in percentage [0, 100].
   double contrast = 1;
}
// The DetectorServiceRegisterOnBrightnessChangedRequest class.
message DetectorServiceRegisterOnBrightnessChangedRequest {
   // The unique name of the detector to control as string. Must be part of ZenApi.EM.Hardware.V1.IDetectorApi.GetAvailableDetectors.
   string detector_name = 1;
}
// Response object representing a detector brightness value.
message DetectorServiceRegisterOnBrightnessChangedResponse {
   // The brightness in percentage [0, 100].
   double brightness = 1;
}
// The DetectorServiceRegisterOnContrastChangedRequest class.
message DetectorServiceRegisterOnContrastChangedRequest {
   // The unique name of the detector to control as string. Must be part of ZenApi.EM.Hardware.V1.IDetectorApi.GetAvailableDetectors.
   string detector_name = 1;
}
// Response object representing a detector contrast value.
message DetectorServiceRegisterOnContrastChangedResponse {
   // The contrast in percentage [0, 100].
   double contrast = 1;
}
// The DetectorServiceSetBrightnessRequest class.
message DetectorServiceSetBrightnessRequest {
   // The unique name of the detector to control as string. Must be part of ZenApi.EM.Hardware.V1.IDetectorApi.GetAvailableDetectors.
   string detector_name = 1;
   // The brightness value to apply in percentage [0, 1].
   double brightness = 2;
}
// Response object representing a detector brightness value.
message DetectorServiceSetBrightnessResponse {
   // The brightness in percentage [0, 100].
   double brightness = 1;
}
// The DetectorServiceSetContrastRequest class.
message DetectorServiceSetContrastRequest {
   // The unique name of the detector to control as string. Must be part of ZenApi.EM.Hardware.V1.IDetectorApi.GetAvailableDetectors.
   string detector_name = 1;
   // The contrast value to apply in percentage [0, 1].
   double contrast = 2;
}
// Response object representing a detector contrast value.
message DetectorServiceSetContrastResponse {
   // The contrast in percentage [0, 100].
   double contrast = 1;
}
// The IDetectorService interface.
service DetectorService {
   // Retrieves a list of all available detectors of the system.
   // Their name serves as an identifier for this API service.
   rpc GetAvailableDetectors (DetectorServiceGetAvailableDetectorsRequest) returns (DetectorServiceGetAvailableDetectorsResponse)
   {
      option idempotency_level = NO_SIDE_EFFECTS;
   }
   // Retrieves the brightness value applied to a specific detector in percentage.
   rpc GetBrightness (DetectorServiceGetBrightnessRequest) returns (DetectorServiceGetBrightnessResponse)
   {
      option idempotency_level = NO_SIDE_EFFECTS;
   }
   // Retrieves the contrast value applied to a specific detector in percentage.
   rpc GetContrast (DetectorServiceGetContrastRequest) returns (DetectorServiceGetContrastResponse)
   {
      option idempotency_level = NO_SIDE_EFFECTS;
   }
   // Registers a subscriber on brightness changes of a specific detector.
   rpc RegisterOnBrightnessChanged (DetectorServiceRegisterOnBrightnessChangedRequest) returns (stream DetectorServiceRegisterOnBrightnessChangedResponse)
   {
      option idempotency_level = NO_SIDE_EFFECTS;
   }
   // Registers a subscriber on contrast changes of a specific detector.
   rpc RegisterOnContrastChanged (DetectorServiceRegisterOnContrastChangedRequest) returns (stream DetectorServiceRegisterOnContrastChangedResponse)
   {
      option idempotency_level = NO_SIDE_EFFECTS;
   }
   // Applies a brightness value to a specified detector.
   // The brightness value is applied immediately and has to be in [0, 1].
   rpc SetBrightness (DetectorServiceSetBrightnessRequest) returns (DetectorServiceSetBrightnessResponse);
   // Applies a contrast value to a specified detector.
   // The contrast value is applied immediately and has to be in [0, 1].
   rpc SetContrast (DetectorServiceSetContrastRequest) returns (DetectorServiceSetContrastResponse);
}
