// Proto file representing simulation setup settings 

syntax = "proto3";

package ansys.api.edb.v1;

import "ansys/api/edb/v1/edb_messages.proto";

// SimulationSetup service definition
service SimulationSettingsService {
  rpc GetEnabled (EDBObjMessage) returns (google.protobuf.BoolValue) {}
  
  rpc SetEnabled (BoolPropertyMessage) returns (google.protobuf.Empty) {}
}

// Settings options
service SettingsOptionsService {
  rpc GetDoLamdaRefineFlag(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetDoLamdaRefineFlag(BoolPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetLamdaTarget(EDBObjMessage) returns (google.protobuf.DoubleValue) {}
  rpc SetLamdaTarget(DoublePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetMeshSizefactor(EDBObjMessage) returns (google.protobuf.DoubleValue) {}
  rpc SetMeshSizefactor(DoublePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetUseDefaultLamda(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetUseDefaultLamda(BoolPropertyMessage) returns (google.protobuf.Empty) {}
}

// Advanced settings
enum T25DViaStyle
{
  WIREBOND = 0;
  RIBBON = 1;
  MESH = 2;
  FIELD = 3;
  NUM_VIA_STYLE = 4;
}

enum DefeatureModelType
{
  GENERAL_MODEL = 0;
  IC_MODEL = 1;
}

service AdvancedSettingsService {
  rpc GetUnionPolygons(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetUnionPolygons(BoolPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetRemoveFloatingGeometry(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetRemoveFloatingGeometry(BoolPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetHealingOption(EDBObjMessage) returns (google.protobuf.Int64Value) {}
  rpc SetHealingOption(IntPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetSmallVoidArea(EDBObjMessage) returns (google.protobuf.DoubleValue) {}
  rpc SetSmallVoidArea(DoublePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetUseDefeature(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetUseDefeature(BoolPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetUseDefeatureAbsoluteLength(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetUseDefeatureAbsoluteLength(BoolPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetDefeatureAbsoluteLength(EDBObjMessage) returns (google.protobuf.StringValue) {}
  rpc SetDefeatureAbsoluteLength(StringPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetDefeatureRatio(EDBObjMessage) returns (google.protobuf.DoubleValue) {}
  rpc SetDefeatureRatio(DoublePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetViaModelType(EDBObjMessage) returns (ViaModelTypeMessage) {}
  rpc SetViaModelType(ViaModelTypePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetNumViaSides(EDBObjMessage) returns (google.protobuf.UInt64Value) {}
  rpc SetNumViaSides(UInt64PropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetViaDensity(EDBObjMessage) returns (google.protobuf.DoubleValue) {}
  rpc SetViaDensity(DoublePropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetViaMaterial(EDBObjMessage) returns (google.protobuf.StringValue) {}
  rpc SetViaMaterial(StringPropertyMessage) returns (google.protobuf.Empty) {}
  
  rpc GetMeshForViaPlating(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetMeshForViaPlating(BoolPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetModelType(EDBObjMessage) returns (DefeatureModelTypeMessage) {}
  rpc SetModelType(DefeatureModelTypePropertyMessage) returns (google.protobuf.Empty) {}
}

message ViaModelTypeMessage {
  T25DViaStyle via_model_type = 1;
}

message ViaModelTypePropertyMessage {
  EDBObjMessage target = 1;
  T25DViaStyle via_model_type = 2;
}

message DefeatureModelTypeMessage {
  DefeatureModelType defeature_model_type = 1;
}

message DefeatureModelTypePropertyMessage {
  EDBObjMessage target = 1;
  DefeatureModelType defeature_model_type = 2;
}

// Advanced meshing settings
service AdvancedMeshingSettingsService {
  rpc GetArcStepSize(EDBObjMessage) returns (google.protobuf.StringValue) {}
  rpc SetArcStepSize(StringPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetCircleStartAzimuth(EDBObjMessage) returns (google.protobuf.StringValue) {}
  rpc SetCircleStartAzimuth(StringPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetMaxNumArcPoints(EDBObjMessage) returns (google.protobuf.UInt64Value) {}
  rpc SetMaxNumArcPoints(UInt64PropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetUseArcChordErrorApprox(EDBObjMessage) returns (google.protobuf.BoolValue) {}
  rpc SetUseArcChordErrorApprox(BoolPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetArcChordErrorApprox(EDBObjMessage) returns (google.protobuf.StringValue) {}
  rpc SetArcChordErrorApprox(StringPropertyMessage) returns (google.protobuf.Empty) {}
}

// Solver settings
service SolverSettingsService {
  rpc GetThinSignalLayerThreshold(EDBObjMessage) returns (google.protobuf.StringValue) {}
  rpc SetThinSignalLayerThreshold(StringPropertyMessage) returns (google.protobuf.Empty) {}

  rpc GetThinDielectricLayerThreshold(EDBObjMessage) returns (google.protobuf.StringValue) {}
  rpc SetThinDielectricLayerThreshold(StringPropertyMessage) returns (google.protobuf.Empty) {}
}