diff --git a/common/protos/common.pb.go b/common/protos/common.pb.go
index 24a60e97..d3d7d845 100644
--- a/common/protos/common.pb.go
+++ b/common/protos/common.pb.go
@@ -43,6 +43,117 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
+// *
+// Beam modes as defined and sent by LHC DIP client plus:
+// * virtual type LOST_BEAMS - that is generated when beam 1 and beam 2 energy values are not equal anymore as per LHC DIP track: dip/acc/LHC/RunControl/SafeBeam
+// * virtual type UNKNOWN - that is generated when there is no beam in the machine or value not added by the BKP-LHC Client
+// Source of Beam Modes: https://lhc-commissioning.web.cern.ch/systems/data-exchange/doc/LHC-OP-ES-0005-10-00.pdf
+type BeamMode int32
+
+const (
+ BeamMode_UNKNOWN BeamMode = 0 // virtual type
+ BeamMode_SETUP BeamMode = 1
+ BeamMode_ABORT BeamMode = 2
+ BeamMode_INJECTION_PROBE_BEAM BeamMode = 3
+ BeamMode_INJECTION_SETUP_BEAM BeamMode = 4
+ BeamMode_INJECTION_PHYSICS_BEAM BeamMode = 5
+ BeamMode_PREPARE_RAMP BeamMode = 6
+ BeamMode_RAMP BeamMode = 7
+ BeamMode_FLAT_TOP BeamMode = 8
+ BeamMode_SQUEEZE BeamMode = 9
+ BeamMode_ADJUST BeamMode = 10
+ BeamMode_STABLE_BEAMS BeamMode = 11
+ BeamMode_LOST_BEAMS BeamMode = 12 // virtual type
+ BeamMode_UNSTABLE_BEAMS BeamMode = 13
+ BeamMode_BEAM_DUMP_WARNING BeamMode = 14
+ BeamMode_BEAM_DUMP BeamMode = 15
+ BeamMode_RAMP_DOWN BeamMode = 16
+ BeamMode_CYCLING BeamMode = 17
+ BeamMode_RECOVERY BeamMode = 18
+ BeamMode_INJECT_AND_DUMP BeamMode = 19
+ BeamMode_CIRCULATE_AND_DUMP BeamMode = 20
+ BeamMode_NO_BEAM BeamMode = 21
+)
+
+// Enum value maps for BeamMode.
+var (
+ BeamMode_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "SETUP",
+ 2: "ABORT",
+ 3: "INJECTION_PROBE_BEAM",
+ 4: "INJECTION_SETUP_BEAM",
+ 5: "INJECTION_PHYSICS_BEAM",
+ 6: "PREPARE_RAMP",
+ 7: "RAMP",
+ 8: "FLAT_TOP",
+ 9: "SQUEEZE",
+ 10: "ADJUST",
+ 11: "STABLE_BEAMS",
+ 12: "LOST_BEAMS",
+ 13: "UNSTABLE_BEAMS",
+ 14: "BEAM_DUMP_WARNING",
+ 15: "BEAM_DUMP",
+ 16: "RAMP_DOWN",
+ 17: "CYCLING",
+ 18: "RECOVERY",
+ 19: "INJECT_AND_DUMP",
+ 20: "CIRCULATE_AND_DUMP",
+ 21: "NO_BEAM",
+ }
+ BeamMode_value = map[string]int32{
+ "UNKNOWN": 0,
+ "SETUP": 1,
+ "ABORT": 2,
+ "INJECTION_PROBE_BEAM": 3,
+ "INJECTION_SETUP_BEAM": 4,
+ "INJECTION_PHYSICS_BEAM": 5,
+ "PREPARE_RAMP": 6,
+ "RAMP": 7,
+ "FLAT_TOP": 8,
+ "SQUEEZE": 9,
+ "ADJUST": 10,
+ "STABLE_BEAMS": 11,
+ "LOST_BEAMS": 12,
+ "UNSTABLE_BEAMS": 13,
+ "BEAM_DUMP_WARNING": 14,
+ "BEAM_DUMP": 15,
+ "RAMP_DOWN": 16,
+ "CYCLING": 17,
+ "RECOVERY": 18,
+ "INJECT_AND_DUMP": 19,
+ "CIRCULATE_AND_DUMP": 20,
+ "NO_BEAM": 21,
+ }
+)
+
+func (x BeamMode) Enum() *BeamMode {
+ p := new(BeamMode)
+ *p = x
+ return p
+}
+
+func (x BeamMode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (BeamMode) Descriptor() protoreflect.EnumDescriptor {
+ return file_protos_common_proto_enumTypes[0].Descriptor()
+}
+
+func (BeamMode) Type() protoreflect.EnumType {
+ return &file_protos_common_proto_enumTypes[0]
+}
+
+func (x BeamMode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use BeamMode.Descriptor instead.
+func (BeamMode) EnumDescriptor() ([]byte, []int) {
+ return file_protos_common_proto_rawDescGZIP(), []int{0}
+}
+
type User struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -180,6 +291,111 @@ func (x *WorkflowTemplateInfo) GetPublic() bool {
return false
}
+// *
+// Beam information at a specific point in time (e.g. start or end of stable beams)
+type BeamInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ StableBeamsStart int64 `protobuf:"varint,1,opt,name=stableBeamsStart,proto3" json:"stableBeamsStart,omitempty"` // milliseconds since epoch when stable beams started
+ StableBeamsEnd int64 `protobuf:"varint,2,opt,name=stableBeamsEnd,proto3" json:"stableBeamsEnd,omitempty"` // milliseconds since epoch when stable beams ended
+ FillNumber int32 `protobuf:"varint,3,opt,name=fillNumber,proto3" json:"fillNumber,omitempty"` // LHC fill number
+ FillingSchemeName string `protobuf:"bytes,4,opt,name=fillingSchemeName,proto3" json:"fillingSchemeName,omitempty"` // LHC filling scheme name e.g. 25ns_2460b_2448_2089_2227_144bpi_20inj
+ Beam1Energy float32 `protobuf:"fixed32,5,opt,name=beam1Energy,proto3" json:"beam1Energy,omitempty"` // in GeV
+ Beam2Energy float32 `protobuf:"fixed32,6,opt,name=beam2Energy,proto3" json:"beam2Energy,omitempty"` // in GeV
+ BeamType string `protobuf:"bytes,7,opt,name=beamType,proto3" json:"beamType,omitempty"` // e.g. PROTON-PROTON, O8-O8, Pb-Pb, p-Pb, Pb-p
+ BeamMode BeamMode `protobuf:"varint,8,opt,name=beamMode,proto3,enum=common.BeamMode" json:"beamMode,omitempty"`
+}
+
+func (x *BeamInfo) Reset() {
+ *x = BeamInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_protos_common_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BeamInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BeamInfo) ProtoMessage() {}
+
+func (x *BeamInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_protos_common_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BeamInfo.ProtoReflect.Descriptor instead.
+func (*BeamInfo) Descriptor() ([]byte, []int) {
+ return file_protos_common_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *BeamInfo) GetStableBeamsStart() int64 {
+ if x != nil {
+ return x.StableBeamsStart
+ }
+ return 0
+}
+
+func (x *BeamInfo) GetStableBeamsEnd() int64 {
+ if x != nil {
+ return x.StableBeamsEnd
+ }
+ return 0
+}
+
+func (x *BeamInfo) GetFillNumber() int32 {
+ if x != nil {
+ return x.FillNumber
+ }
+ return 0
+}
+
+func (x *BeamInfo) GetFillingSchemeName() string {
+ if x != nil {
+ return x.FillingSchemeName
+ }
+ return ""
+}
+
+func (x *BeamInfo) GetBeam1Energy() float32 {
+ if x != nil {
+ return x.Beam1Energy
+ }
+ return 0
+}
+
+func (x *BeamInfo) GetBeam2Energy() float32 {
+ if x != nil {
+ return x.Beam2Energy
+ }
+ return 0
+}
+
+func (x *BeamInfo) GetBeamType() string {
+ if x != nil {
+ return x.BeamType
+ }
+ return ""
+}
+
+func (x *BeamInfo) GetBeamMode() BeamMode {
+ if x != nil {
+ return x.BeamMode
+ }
+ return BeamMode_UNKNOWN
+}
+
var File_protos_common_proto protoreflect.FileDescriptor
var file_protos_common_proto_rawDesc = []byte{
@@ -199,7 +415,51 @@ var file_protos_common_proto_rawDesc = []byte{
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x70,
0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62,
- 0x6c, 0x69, 0x63, 0x42, 0x53, 0x0a, 0x1f, 0x63, 0x68, 0x2e, 0x63, 0x65, 0x72, 0x6e, 0x2e, 0x61,
+ 0x6c, 0x69, 0x63, 0x22, 0xba, 0x02, 0x0a, 0x08, 0x42, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f,
+ 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x65, 0x61, 0x6d, 0x73, 0x53,
+ 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, 0x74, 0x61, 0x62,
+ 0x6c, 0x65, 0x42, 0x65, 0x61, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x26, 0x0a, 0x0e,
+ 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x64, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x65, 0x61, 0x6d,
+ 0x73, 0x45, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x6c, 0x4e, 0x75, 0x6d, 0x62,
+ 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x6c, 0x4e, 0x75,
+ 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53,
+ 0x63, 0x68, 0x65, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x11, 0x66, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x4e, 0x61,
+ 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x65, 0x61, 0x6d, 0x31, 0x45, 0x6e, 0x65, 0x72, 0x67,
+ 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x6d, 0x31, 0x45, 0x6e,
+ 0x65, 0x72, 0x67, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x65, 0x61, 0x6d, 0x32, 0x45, 0x6e, 0x65,
+ 0x72, 0x67, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x62, 0x65, 0x61, 0x6d, 0x32,
+ 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x65, 0x61, 0x6d, 0x54, 0x79,
+ 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x65, 0x61, 0x6d, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x62, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x65,
+ 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x62, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65,
+ 0x2a, 0x80, 0x03, 0x0a, 0x08, 0x42, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a,
+ 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x45,
+ 0x54, 0x55, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x10, 0x02,
+ 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52,
+ 0x4f, 0x42, 0x45, 0x5f, 0x42, 0x45, 0x41, 0x4d, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e,
+ 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x42, 0x45,
+ 0x41, 0x4d, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x4e, 0x4a, 0x45, 0x43, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x50, 0x48, 0x59, 0x53, 0x49, 0x43, 0x53, 0x5f, 0x42, 0x45, 0x41, 0x4d, 0x10, 0x05,
+ 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x5f, 0x52, 0x41, 0x4d, 0x50,
+ 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x41, 0x4d, 0x50, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08,
+ 0x46, 0x4c, 0x41, 0x54, 0x5f, 0x54, 0x4f, 0x50, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x51,
+ 0x55, 0x45, 0x45, 0x5a, 0x45, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x44, 0x4a, 0x55, 0x53,
+ 0x54, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x42, 0x45,
+ 0x41, 0x4d, 0x53, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x53, 0x54, 0x5f, 0x42, 0x45,
+ 0x41, 0x4d, 0x53, 0x10, 0x0c, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x54, 0x41, 0x42, 0x4c,
+ 0x45, 0x5f, 0x42, 0x45, 0x41, 0x4d, 0x53, 0x10, 0x0d, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x45, 0x41,
+ 0x4d, 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x5f, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x0e,
+ 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x45, 0x41, 0x4d, 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x10, 0x0f, 0x12,
+ 0x0d, 0x0a, 0x09, 0x52, 0x41, 0x4d, 0x50, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x10, 0x12, 0x0b,
+ 0x0a, 0x07, 0x43, 0x59, 0x43, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x11, 0x12, 0x0c, 0x0a, 0x08, 0x52,
+ 0x45, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x10, 0x12, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x4a,
+ 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x10, 0x13, 0x12, 0x16,
+ 0x0a, 0x12, 0x43, 0x49, 0x52, 0x43, 0x55, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f,
+ 0x44, 0x55, 0x4d, 0x50, 0x10, 0x14, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x42, 0x45, 0x41,
+ 0x4d, 0x10, 0x15, 0x42, 0x53, 0x0a, 0x1f, 0x63, 0x68, 0x2e, 0x63, 0x65, 0x72, 0x6e, 0x2e, 0x61,
0x6c, 0x69, 0x63, 0x65, 0x2e, 0x6f, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x41, 0x6c, 0x69, 0x63, 0x65, 0x4f, 0x32, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2f,
@@ -219,17 +479,21 @@ func file_protos_common_proto_rawDescGZIP() []byte {
return file_protos_common_proto_rawDescData
}
-var file_protos_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_protos_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_protos_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_protos_common_proto_goTypes = []interface{}{
- (*User)(nil), // 0: common.User
- (*WorkflowTemplateInfo)(nil), // 1: common.WorkflowTemplateInfo
+ (BeamMode)(0), // 0: common.BeamMode
+ (*User)(nil), // 1: common.User
+ (*WorkflowTemplateInfo)(nil), // 2: common.WorkflowTemplateInfo
+ (*BeamInfo)(nil), // 3: common.BeamInfo
}
var file_protos_common_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
+ 0, // 0: common.BeamInfo.beamMode:type_name -> common.BeamMode
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
}
func init() { file_protos_common_proto_init() }
@@ -262,6 +526,18 @@ func file_protos_common_proto_init() {
return nil
}
}
+ file_protos_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BeamInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
file_protos_common_proto_msgTypes[0].OneofWrappers = []interface{}{}
type x struct{}
@@ -269,13 +545,14 @@ func file_protos_common_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_protos_common_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 2,
+ NumEnums: 1,
+ NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_protos_common_proto_goTypes,
DependencyIndexes: file_protos_common_proto_depIdxs,
+ EnumInfos: file_protos_common_proto_enumTypes,
MessageInfos: file_protos_common_proto_msgTypes,
}.Build()
File_protos_common_proto = out.File
diff --git a/common/protos/common.proto b/common/protos/common.proto
index 435790e4..f1e77874 100644
--- a/common/protos/common.proto
+++ b/common/protos/common.proto
@@ -45,4 +45,49 @@ message WorkflowTemplateInfo {
string description = 2;
string path = 3;
bool public = 4; // whether the environment is public or not
-}
\ No newline at end of file
+}
+
+/**
+ * Beam information at a specific point in time (e.g. start or end of stable beams)
+ */
+message BeamInfo {
+ int64 stableBeamsStart = 1; // milliseconds since epoch when stable beams started
+ int64 stableBeamsEnd = 2; // milliseconds since epoch when stable beams ended
+ int32 fillNumber = 3; // LHC fill number
+ string fillingSchemeName = 4; // LHC filling scheme name e.g. 25ns_2460b_2448_2089_2227_144bpi_20inj
+ float beam1Energy = 5; // in GeV
+ float beam2Energy = 6; // in GeV
+ string beamType = 7; // e.g. PROTON-PROTON, O8-O8, Pb-Pb, p-Pb, Pb-p
+ BeamMode beamMode = 8;
+}
+
+/**
+ * Beam modes as defined and sent by LHC DIP client plus:
+ * * virtual type LOST_BEAMS - that is generated when beam 1 and beam 2 energy values are not equal anymore as per LHC DIP track: dip/acc/LHC/RunControl/SafeBeam
+ * * virtual type UNKNOWN - that is generated when there is no beam in the machine or value not added by the BKP-LHC Client
+ * Source of Beam Modes: https://lhc-commissioning.web.cern.ch/systems/data-exchange/doc/LHC-OP-ES-0005-10-00.pdf
+ */
+enum BeamMode {
+ UNKNOWN = 0; // virtual type
+ SETUP = 1;
+ ABORT = 2;
+ INJECTION_PROBE_BEAM = 3;
+ INJECTION_SETUP_BEAM = 4;
+ INJECTION_PHYSICS_BEAM = 5;
+ PREPARE_RAMP = 6;
+ RAMP = 7;
+ FLAT_TOP = 8;
+ SQUEEZE = 9;
+ ADJUST = 10;
+ STABLE_BEAMS = 11;
+ LOST_BEAMS = 12; // virtual type
+ UNSTABLE_BEAMS = 13;
+ BEAM_DUMP_WARNING = 14;
+ BEAM_DUMP = 15;
+ RAMP_DOWN = 16;
+ CYCLING = 17;
+ RECOVERY = 18;
+ INJECT_AND_DUMP = 19;
+ CIRCULATE_AND_DUMP = 20;
+ NO_BEAM = 21;
+}
diff --git a/common/protos/events.pb.go b/common/protos/events.pb.go
index 532d0ac1..65d69004 100644
--- a/common/protos/events.pb.go
+++ b/common/protos/events.pb.go
@@ -930,6 +930,64 @@ func (x *Ev_RunEvent) GetLastRequestUser() *User {
return nil
}
+// *
+// Beam mode changes are propagated as Kafka events and to be sent by the BKP-LHC-Client on a dedicated topic
+// e.g. dip.lhc.beam_mode
+type Ev_BeamModeEvent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // milliseconds since epoch when the beam mode change happened
+ BeamInfo *BeamInfo `protobuf:"bytes,2,opt,name=beamInfo,proto3" json:"beamInfo,omitempty"`
+}
+
+func (x *Ev_BeamModeEvent) Reset() {
+ *x = Ev_BeamModeEvent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_protos_events_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Ev_BeamModeEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Ev_BeamModeEvent) ProtoMessage() {}
+
+func (x *Ev_BeamModeEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_protos_events_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Ev_BeamModeEvent.ProtoReflect.Descriptor instead.
+func (*Ev_BeamModeEvent) Descriptor() ([]byte, []int) {
+ return file_protos_events_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *Ev_BeamModeEvent) GetTimestamp() int64 {
+ if x != nil {
+ return x.Timestamp
+ }
+ return 0
+}
+
+func (x *Ev_BeamModeEvent) GetBeamInfo() *BeamInfo {
+ if x != nil {
+ return x.BeamInfo
+ }
+ return nil
+}
+
type Event struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -948,13 +1006,14 @@ type Event struct {
// *Event_FrameworkEvent
// *Event_MesosHeartbeatEvent
// *Event_CoreStartEvent
+ // *Event_BeamModeEvent
Payload isEvent_Payload `protobuf_oneof:"Payload"`
}
func (x *Event) Reset() {
*x = Event{}
if protoimpl.UnsafeEnabled {
- mi := &file_protos_events_proto_msgTypes[10]
+ mi := &file_protos_events_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -967,7 +1026,7 @@ func (x *Event) String() string {
func (*Event) ProtoMessage() {}
func (x *Event) ProtoReflect() protoreflect.Message {
- mi := &file_protos_events_proto_msgTypes[10]
+ mi := &file_protos_events_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -980,7 +1039,7 @@ func (x *Event) ProtoReflect() protoreflect.Message {
// Deprecated: Use Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
- return file_protos_events_proto_rawDescGZIP(), []int{10}
+ return file_protos_events_proto_rawDescGZIP(), []int{11}
}
func (x *Event) GetTimestamp() int64 {
@@ -1067,11 +1126,19 @@ func (x *Event) GetCoreStartEvent() *Ev_MetaEvent_CoreStart {
return nil
}
+func (x *Event) GetBeamModeEvent() *Ev_BeamModeEvent {
+ if x, ok := x.GetPayload().(*Event_BeamModeEvent); ok {
+ return x.BeamModeEvent
+ }
+ return nil
+}
+
type isEvent_Payload interface {
isEvent_Payload()
}
type Event_EnvironmentEvent struct {
+ // Events produced by AliECS
EnvironmentEvent *Ev_EnvironmentEvent `protobuf:"bytes,11,opt,name=environmentEvent,proto3,oneof"`
}
@@ -1096,6 +1163,7 @@ type Event_RunEvent struct {
}
type Event_FrameworkEvent struct {
+ // Meta events produced by AliECS or its components
FrameworkEvent *Ev_MetaEvent_FrameworkEvent `protobuf:"bytes,101,opt,name=frameworkEvent,proto3,oneof"`
}
@@ -1107,6 +1175,11 @@ type Event_CoreStartEvent struct {
CoreStartEvent *Ev_MetaEvent_CoreStart `protobuf:"bytes,103,opt,name=coreStartEvent,proto3,oneof"`
}
+type Event_BeamModeEvent struct {
+ // Events produced by other systems, but natively supported and defined by AliECS
+ BeamModeEvent *Ev_BeamModeEvent `protobuf:"bytes,200,opt,name=beamModeEvent,proto3,oneof"`
+}
+
func (*Event_EnvironmentEvent) isEvent_Payload() {}
func (*Event_TaskEvent) isEvent_Payload() {}
@@ -1125,6 +1198,8 @@ func (*Event_MesosHeartbeatEvent) isEvent_Payload() {}
func (*Event_CoreStartEvent) isEvent_Payload() {}
+func (*Event_BeamModeEvent) isEvent_Payload() {}
+
var File_protos_events_proto protoreflect.FileDescriptor
var file_protos_events_proto_rawDesc = []byte{
@@ -1264,7 +1339,13 @@ var file_protos_events_proto_rawDesc = []byte{
0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x18, 0x08,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x55,
- 0x73, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0xd1, 0x05, 0x0a, 0x05, 0x45, 0x76,
+ 0x73, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x5e, 0x0a, 0x10, 0x45, 0x76, 0x5f,
+ 0x42, 0x65, 0x61, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a,
+ 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2c, 0x0a, 0x08, 0x62,
+ 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52,
+ 0x08, 0x62, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x9b, 0x06, 0x0a, 0x05, 0x45, 0x76,
0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x61,
@@ -1308,20 +1389,25 @@ var file_protos_events_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x76,
0x5f, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x43, 0x6f, 0x72, 0x65, 0x53,
0x74, 0x61, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x72,
- 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
- 0x64, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x11, 0x10, 0x65, 0x2a, 0x5d, 0x0a,
- 0x08, 0x4f, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, 0x4c,
- 0x4c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01,
- 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x4e, 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a,
- 0x07, 0x44, 0x4f, 0x4e, 0x45, 0x5f, 0x4f, 0x4b, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x4f,
- 0x4e, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x4f,
- 0x4e, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x05, 0x42, 0x53, 0x0a, 0x1f,
- 0x63, 0x68, 0x2e, 0x63, 0x65, 0x72, 0x6e, 0x2e, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x6f, 0x32,
- 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5a,
- 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6c, 0x69, 0x63,
- 0x65, 0x4f, 0x32, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
- 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x3b, 0x70,
- 0x62, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x62, 0x65, 0x61, 0x6d, 0x4d, 0x6f,
+ 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x18, 0xc8, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
+ 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x76, 0x5f, 0x42, 0x65, 0x61, 0x6d, 0x4d,
+ 0x6f, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x65, 0x61, 0x6d,
+ 0x4d, 0x6f, 0x64, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x50, 0x61, 0x79,
+ 0x6c, 0x6f, 0x61, 0x64, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x11, 0x10, 0x65,
+ 0x4a, 0x05, 0x08, 0x68, 0x10, 0xc8, 0x01, 0x2a, 0x5d, 0x0a, 0x08, 0x4f, 0x70, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x0b, 0x0a,
+ 0x07, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x4e,
+ 0x47, 0x4f, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x4f, 0x4e, 0x45, 0x5f,
+ 0x4f, 0x4b, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x4f, 0x4e, 0x45, 0x5f, 0x45, 0x52, 0x52,
+ 0x4f, 0x52, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x4f, 0x4e, 0x45, 0x5f, 0x54, 0x49, 0x4d,
+ 0x45, 0x4f, 0x55, 0x54, 0x10, 0x05, 0x42, 0x53, 0x0a, 0x1f, 0x63, 0x68, 0x2e, 0x63, 0x65, 0x72,
+ 0x6e, 0x2e, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x6f, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
+ 0x6f, 0x6c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6c, 0x69, 0x63, 0x65, 0x4f, 0x32, 0x47, 0x72, 0x6f,
+ 0x75, 0x70, 0x2f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+ 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x3b, 0x70, 0x62, 0x50, 0x00, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1337,7 +1423,7 @@ func file_protos_events_proto_rawDescGZIP() []byte {
}
var file_protos_events_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_protos_events_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
+var file_protos_events_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_protos_events_proto_goTypes = []interface{}{
(OpStatus)(0), // 0: events.OpStatus
(*Ev_MetaEvent_MesosHeartbeat)(nil), // 1: events.Ev_MetaEvent_MesosHeartbeat
@@ -1350,37 +1436,41 @@ var file_protos_events_proto_goTypes = []interface{}{
(*Ev_RoleEvent)(nil), // 8: events.Ev_RoleEvent
(*Ev_IntegratedServiceEvent)(nil), // 9: events.Ev_IntegratedServiceEvent
(*Ev_RunEvent)(nil), // 10: events.Ev_RunEvent
- (*Event)(nil), // 11: events.Event
- nil, // 12: events.Ev_EnvironmentEvent.VarsEntry
- (*User)(nil), // 13: common.User
- (*WorkflowTemplateInfo)(nil), // 14: common.WorkflowTemplateInfo
+ (*Ev_BeamModeEvent)(nil), // 11: events.Ev_BeamModeEvent
+ (*Event)(nil), // 12: events.Event
+ nil, // 13: events.Ev_EnvironmentEvent.VarsEntry
+ (*User)(nil), // 14: common.User
+ (*WorkflowTemplateInfo)(nil), // 15: common.WorkflowTemplateInfo
+ (*BeamInfo)(nil), // 16: common.BeamInfo
}
var file_protos_events_proto_depIdxs = []int32{
0, // 0: events.Ev_EnvironmentEvent.transitionStatus:type_name -> events.OpStatus
- 12, // 1: events.Ev_EnvironmentEvent.vars:type_name -> events.Ev_EnvironmentEvent.VarsEntry
- 13, // 2: events.Ev_EnvironmentEvent.lastRequestUser:type_name -> common.User
- 14, // 3: events.Ev_EnvironmentEvent.workflowTemplateInfo:type_name -> common.WorkflowTemplateInfo
+ 13, // 1: events.Ev_EnvironmentEvent.vars:type_name -> events.Ev_EnvironmentEvent.VarsEntry
+ 14, // 2: events.Ev_EnvironmentEvent.lastRequestUser:type_name -> common.User
+ 15, // 3: events.Ev_EnvironmentEvent.workflowTemplateInfo:type_name -> common.WorkflowTemplateInfo
5, // 4: events.Ev_TaskEvent.traits:type_name -> events.Traits
0, // 5: events.Ev_CallEvent.callStatus:type_name -> events.OpStatus
5, // 6: events.Ev_CallEvent.traits:type_name -> events.Traits
0, // 7: events.Ev_IntegratedServiceEvent.operationStatus:type_name -> events.OpStatus
0, // 8: events.Ev_IntegratedServiceEvent.operationStepStatus:type_name -> events.OpStatus
0, // 9: events.Ev_RunEvent.transitionStatus:type_name -> events.OpStatus
- 13, // 10: events.Ev_RunEvent.lastRequestUser:type_name -> common.User
- 4, // 11: events.Event.environmentEvent:type_name -> events.Ev_EnvironmentEvent
- 6, // 12: events.Event.taskEvent:type_name -> events.Ev_TaskEvent
- 8, // 13: events.Event.roleEvent:type_name -> events.Ev_RoleEvent
- 7, // 14: events.Event.callEvent:type_name -> events.Ev_CallEvent
- 9, // 15: events.Event.integratedServiceEvent:type_name -> events.Ev_IntegratedServiceEvent
- 10, // 16: events.Event.runEvent:type_name -> events.Ev_RunEvent
- 3, // 17: events.Event.frameworkEvent:type_name -> events.Ev_MetaEvent_FrameworkEvent
- 1, // 18: events.Event.mesosHeartbeatEvent:type_name -> events.Ev_MetaEvent_MesosHeartbeat
- 2, // 19: events.Event.coreStartEvent:type_name -> events.Ev_MetaEvent_CoreStart
- 20, // [20:20] is the sub-list for method output_type
- 20, // [20:20] is the sub-list for method input_type
- 20, // [20:20] is the sub-list for extension type_name
- 20, // [20:20] is the sub-list for extension extendee
- 0, // [0:20] is the sub-list for field type_name
+ 14, // 10: events.Ev_RunEvent.lastRequestUser:type_name -> common.User
+ 16, // 11: events.Ev_BeamModeEvent.beamInfo:type_name -> common.BeamInfo
+ 4, // 12: events.Event.environmentEvent:type_name -> events.Ev_EnvironmentEvent
+ 6, // 13: events.Event.taskEvent:type_name -> events.Ev_TaskEvent
+ 8, // 14: events.Event.roleEvent:type_name -> events.Ev_RoleEvent
+ 7, // 15: events.Event.callEvent:type_name -> events.Ev_CallEvent
+ 9, // 16: events.Event.integratedServiceEvent:type_name -> events.Ev_IntegratedServiceEvent
+ 10, // 17: events.Event.runEvent:type_name -> events.Ev_RunEvent
+ 3, // 18: events.Event.frameworkEvent:type_name -> events.Ev_MetaEvent_FrameworkEvent
+ 1, // 19: events.Event.mesosHeartbeatEvent:type_name -> events.Ev_MetaEvent_MesosHeartbeat
+ 2, // 20: events.Event.coreStartEvent:type_name -> events.Ev_MetaEvent_CoreStart
+ 11, // 21: events.Event.beamModeEvent:type_name -> events.Ev_BeamModeEvent
+ 22, // [22:22] is the sub-list for method output_type
+ 22, // [22:22] is the sub-list for method input_type
+ 22, // [22:22] is the sub-list for extension type_name
+ 22, // [22:22] is the sub-list for extension extendee
+ 0, // [0:22] is the sub-list for field type_name
}
func init() { file_protos_events_proto_init() }
@@ -1511,6 +1601,18 @@ func file_protos_events_proto_init() {
}
}
file_protos_events_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Ev_BeamModeEvent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_protos_events_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Event); i {
case 0:
return &v.state
@@ -1523,7 +1625,7 @@ func file_protos_events_proto_init() {
}
}
}
- file_protos_events_proto_msgTypes[10].OneofWrappers = []interface{}{
+ file_protos_events_proto_msgTypes[11].OneofWrappers = []interface{}{
(*Event_EnvironmentEvent)(nil),
(*Event_TaskEvent)(nil),
(*Event_RoleEvent)(nil),
@@ -1533,6 +1635,7 @@ func file_protos_events_proto_init() {
(*Event_FrameworkEvent)(nil),
(*Event_MesosHeartbeatEvent)(nil),
(*Event_CoreStartEvent)(nil),
+ (*Event_BeamModeEvent)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -1540,7 +1643,7 @@ func file_protos_events_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_protos_events_proto_rawDesc,
NumEnums: 1,
- NumMessages: 12,
+ NumMessages: 13,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/common/protos/events.proto b/common/protos/events.proto
index 66b6fe0c..870524ff 100644
--- a/common/protos/events.proto
+++ b/common/protos/events.proto
@@ -127,13 +127,24 @@ message Ev_RunEvent {
common.User lastRequestUser = 8;
}
+/**
+ * Beam mode changes are propagated as Kafka events and to be sent by the BKP-LHC-Client on a dedicated topic
+ * e.g. dip.lhc.beam_mode
+ */
+message Ev_BeamModeEvent {
+ int64 timestamp = 1; // milliseconds since epoch when the beam mode change happened
+ common.BeamInfo beamInfo = 2;
+}
+
message Event {
int64 timestamp = 1;
int64 timestampNano = 2;
reserved 3 to 10;
reserved 17 to 100;
+ reserved 104 to 199;
oneof Payload {
+ // Events produced by AliECS
Ev_EnvironmentEvent environmentEvent = 11;
Ev_TaskEvent taskEvent = 12;
Ev_RoleEvent roleEvent = 13;
@@ -141,8 +152,12 @@ message Event {
Ev_IntegratedServiceEvent integratedServiceEvent = 15;
Ev_RunEvent runEvent = 16;
+ // Meta events produced by AliECS or its components
Ev_MetaEvent_FrameworkEvent frameworkEvent = 101;
Ev_MetaEvent_MesosHeartbeat mesosHeartbeatEvent = 102;
Ev_MetaEvent_CoreStart coreStartEvent = 103;
+
+ // Events produced by other systems, but natively supported and defined by AliECS
+ Ev_BeamModeEvent beamModeEvent = 200;
}
}
diff --git a/core/protos/o2control.pb.go b/core/protos/o2control.pb.go
index 76c26d70..4124ea0a 100644
--- a/core/protos/o2control.pb.go
+++ b/core/protos/o2control.pb.go
@@ -68,6 +68,7 @@ type Ev_CallEvent = protos.Ev_CallEvent
type Ev_RoleEvent = protos.Ev_RoleEvent
type Ev_IntegratedServiceEvent = protos.Ev_IntegratedServiceEvent
type Ev_RunEvent = protos.Ev_RunEvent
+type Ev_BeamModeEvent = protos.Ev_BeamModeEvent
type Event = protos.Event
type Event_EnvironmentEvent = protos.Event_EnvironmentEvent
type Event_TaskEvent = protos.Event_TaskEvent
@@ -78,6 +79,7 @@ type Event_RunEvent = protos.Event_RunEvent
type Event_FrameworkEvent = protos.Event_FrameworkEvent
type Event_MesosHeartbeatEvent = protos.Event_MesosHeartbeatEvent
type Event_CoreStartEvent = protos.Event_CoreStartEvent
+type Event_BeamModeEvent = protos.Event_BeamModeEvent
type ControlEnvironmentRequest_Optype int32
diff --git a/docs/apidocs_aliecs.md b/docs/apidocs_aliecs.md
index 7004c905..1f790fe3 100644
--- a/docs/apidocs_aliecs.md
+++ b/docs/apidocs_aliecs.md
@@ -89,6 +89,7 @@
- [Control](#o2control-Control)
- [protos/events.proto](#protos_events-proto)
+ - [Ev_BeamModeEvent](#events-Ev_BeamModeEvent)
- [Ev_CallEvent](#events-Ev_CallEvent)
- [Ev_EnvironmentEvent](#events-Ev_EnvironmentEvent)
- [Ev_EnvironmentEvent.VarsEntry](#events-Ev_EnvironmentEvent-VarsEntry)
@@ -105,9 +106,12 @@
- [OpStatus](#events-OpStatus)
- [protos/common.proto](#protos_common-proto)
+ - [BeamInfo](#common-BeamInfo)
- [User](#common-User)
- [WorkflowTemplateInfo](#common-WorkflowTemplateInfo)
+ - [BeamMode](#common-BeamMode)
+
- [Scalar Value Types](#scalar-value-types)
@@ -557,6 +561,7 @@ Environment
| ----- | ---- | ----- | ----------- |
| showAll | [bool](#bool) | | |
| showTaskInfos | [bool](#bool) | | |
+| showDetailedIntegratedServices | [bool](#bool) | | integratedServices are returned everytime, setting this flag gives detailed report |
@@ -1515,6 +1520,23 @@ The Control service is the main interface to AliECS
+
+
+### Ev_BeamModeEvent
+Beam mode changes are propagated as Kafka events and to be sent by the BKP-LHC-Client on a dedicated topic
+e.g. dip.lhc.beam_mode
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| timestamp | [int64](#int64) | | milliseconds since epoch when the beam mode change happened |
+| beamInfo | [common.BeamInfo](#common-BeamInfo) | | |
+
+
+
+
+
+
### Ev_CallEvent
@@ -1714,15 +1736,16 @@ The Control service is the main interface to AliECS
| ----- | ---- | ----- | ----------- |
| timestamp | [int64](#int64) | | |
| timestampNano | [int64](#int64) | | |
-| environmentEvent | [Ev_EnvironmentEvent](#events-Ev_EnvironmentEvent) | | |
+| environmentEvent | [Ev_EnvironmentEvent](#events-Ev_EnvironmentEvent) | | Events produced by AliECS |
| taskEvent | [Ev_TaskEvent](#events-Ev_TaskEvent) | | |
| roleEvent | [Ev_RoleEvent](#events-Ev_RoleEvent) | | |
| callEvent | [Ev_CallEvent](#events-Ev_CallEvent) | | |
| integratedServiceEvent | [Ev_IntegratedServiceEvent](#events-Ev_IntegratedServiceEvent) | | |
| runEvent | [Ev_RunEvent](#events-Ev_RunEvent) | | |
-| frameworkEvent | [Ev_MetaEvent_FrameworkEvent](#events-Ev_MetaEvent_FrameworkEvent) | | |
+| frameworkEvent | [Ev_MetaEvent_FrameworkEvent](#events-Ev_MetaEvent_FrameworkEvent) | | Meta events produced by AliECS or its components |
| mesosHeartbeatEvent | [Ev_MetaEvent_MesosHeartbeat](#events-Ev_MetaEvent_MesosHeartbeat) | | |
| coreStartEvent | [Ev_MetaEvent_CoreStart](#events-Ev_MetaEvent_CoreStart) | | |
+| beamModeEvent | [Ev_BeamModeEvent](#events-Ev_BeamModeEvent) | | Events produced by other systems, but natively supported and defined by AliECS |
@@ -1779,6 +1802,28 @@ The Control service is the main interface to AliECS
+
+
+### BeamInfo
+Beam information at a specific point in time (e.g. start or end of stable beams)
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| stableBeamsStart | [int64](#int64) | | milliseconds since epoch when stable beams started |
+| stableBeamsEnd | [int64](#int64) | | milliseconds since epoch when stable beams ended |
+| fillNumber | [int32](#int32) | | LHC fill number |
+| fillingSchemeName | [string](#string) | | LHC filling scheme name e.g. 25ns_2460b_2448_2089_2227_144bpi_20inj |
+| beam1Energy | [float](#float) | | in GeV |
+| beam2Energy | [float](#float) | | in GeV |
+| beamType | [string](#string) | | e.g. PROTON-PROTON, O8-O8, Pb-Pb, p-Pb, Pb-p |
+| beamMode | [BeamMode](#common-BeamMode) | | |
+
+
+
+
+
+
### User
@@ -1815,6 +1860,41 @@ The Control service is the main interface to AliECS
+
+
+
+### BeamMode
+Beam modes as defined and sent by LHC DIP client plus:
+* virtual type LOST_BEAMS - that is generated when beam 1 and beam 2 energy values are not equal anymore as per LHC DIP track: dip/acc/LHC/RunControl/SafeBeam
+* virtual type UNKNOWN - that is generated when there is no beam in the machine or value not added by the BKP-LHC Client
+Source of Beam Modes: https://lhc-commissioning.web.cern.ch/systems/data-exchange/doc/LHC-OP-ES-0005-10-00.pdf
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| UNKNOWN | 0 | virtual type |
+| SETUP | 1 | |
+| ABORT | 2 | |
+| INJECTION_PROBE_BEAM | 3 | |
+| INJECTION_SETUP_BEAM | 4 | |
+| INJECTION_PHYSICS_BEAM | 5 | |
+| PREPARE_RAMP | 6 | |
+| RAMP | 7 | |
+| FLAT_TOP | 8 | |
+| SQUEEZE | 9 | |
+| ADJUST | 10 | |
+| STABLE_BEAMS | 11 | |
+| LOST_BEAMS | 12 | virtual type |
+| UNSTABLE_BEAMS | 13 | |
+| BEAM_DUMP_WARNING | 14 | |
+| BEAM_DUMP | 15 | |
+| RAMP_DOWN | 16 | |
+| CYCLING | 17 | |
+| RECOVERY | 18 | |
+| INJECT_AND_DUMP | 19 | |
+| CIRCULATE_AND_DUMP | 20 | |
+| NO_BEAM | 21 | |
+
+