ctpecs

package
v0.42.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RunStartRequest_Mode_name = map[int32]string{
		0: "NULL",
		1: "TRIG",
		2: "CONT",
	}
	RunStartRequest_Mode_value = map[string]int32{
		"NULL": 0,
		"TRIG": 1,
		"CONT": 2,
	}
)

Enum value maps for RunStartRequest_Mode.

View Source
var CTPd_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ctpd.CTPd",
	HandlerType: (*CTPdServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RunLoad",
			Handler:    _CTPd_RunLoad_Handler,
		},
		{
			MethodName: "RunUnload",
			Handler:    _CTPd_RunUnload_Handler,
		},
		{
			MethodName: "RunStart",
			Handler:    _CTPd_RunStart_Handler,
		},
		{
			MethodName: "RunStatus",
			Handler:    _CTPd_RunStatus_Handler,
		},
		{
			MethodName: "RunList",
			Handler:    _CTPd_RunList_Handler,
		},
		{
			MethodName: "RunStop",
			Handler:    _CTPd_RunStop_Handler,
		},
		{
			MethodName: "RunConfig",
			Handler:    _CTPd_RunConfig_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "protos/ctpecs.proto",
}

CTPd_ServiceDesc is the grpc.ServiceDesc for CTPd service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_protos_ctpecs_proto protoreflect.FileDescriptor

Functions

func RegisterCTPdServer

func RegisterCTPdServer(s grpc.ServiceRegistrar, srv CTPdServer)

Types

type CTPdClient

type CTPdClient interface {
	// global run:
	RunLoad(ctx context.Context, in *RunLoadRequest, opts ...grpc.CallOption) (*RunReply, error)
	RunUnload(ctx context.Context, in *RunStopRequest, opts ...grpc.CallOption) (*RunReply, error)
	// stdalone and global runs:
	RunStart(ctx context.Context, in *RunStartRequest, opts ...grpc.CallOption) (*RunReply, error)
	RunStatus(ctx context.Context, in *RunStatusRequest, opts ...grpc.CallOption) (*RunReply, error)
	RunList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*RunReply, error)
	RunStop(ctx context.Context, in *RunStopRequest, opts ...grpc.CallOption) (*RunReply, error)
	RunConfig(ctx context.Context, in *RunStopRequest, opts ...grpc.CallOption) (*RunReply, error)
}

CTPdClient is the client API for CTPd service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCTPdClient

func NewCTPdClient(cc grpc.ClientConnInterface) CTPdClient

type CTPdServer

type CTPdServer interface {
	// global run:
	RunLoad(context.Context, *RunLoadRequest) (*RunReply, error)
	RunUnload(context.Context, *RunStopRequest) (*RunReply, error)
	// stdalone and global runs:
	RunStart(context.Context, *RunStartRequest) (*RunReply, error)
	RunStatus(context.Context, *RunStatusRequest) (*RunReply, error)
	RunList(context.Context, *Empty) (*RunReply, error)
	RunStop(context.Context, *RunStopRequest) (*RunReply, error)
	RunConfig(context.Context, *RunStopRequest) (*RunReply, error)
}

CTPdServer is the server API for CTPd service. All implementations should embed UnimplementedCTPdServer for forward compatibility

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type RunLoadRequest

type RunLoadRequest struct {
	Runn   uint32 `protobuf:"varint,1,opt,name=runn,proto3" json:"runn,omitempty"` // run number
	Config string `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// -config, i.e. the content of partname.pd
	// -partname -the content is in ctp config dir partname.pd
	// -key in case the config is available in Consul[key]
	Detectors string `protobuf:"bytes,3,opt,name=detectors,proto3" json:"detectors,omitempty"` // available detectors, "" -all required must be ready
	// contains filtered or unexported fields
}

import "ctpecs_m.proto"; global runs only:

func (*RunLoadRequest) Descriptor deprecated

func (*RunLoadRequest) Descriptor() ([]byte, []int)

Deprecated: Use RunLoadRequest.ProtoReflect.Descriptor instead.

func (*RunLoadRequest) GetConfig

func (x *RunLoadRequest) GetConfig() string

func (*RunLoadRequest) GetDetectors

func (x *RunLoadRequest) GetDetectors() string

func (*RunLoadRequest) GetRunn

func (x *RunLoadRequest) GetRunn() uint32

func (*RunLoadRequest) ProtoMessage

func (*RunLoadRequest) ProtoMessage()

func (*RunLoadRequest) ProtoReflect

func (x *RunLoadRequest) ProtoReflect() protoreflect.Message

func (*RunLoadRequest) Reset

func (x *RunLoadRequest) Reset()

func (*RunLoadRequest) String

func (x *RunLoadRequest) String() string

type RunReply

type RunReply struct {
	Rc int32 `protobuf:"varint,1,opt,name=rc,proto3" json:"rc,omitempty"` // 0: ok
	// RunStatus rc: 0:active/running 1:paused 2:loaded 3:does not exist
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // response (usually "" when rc is 0)
	// contains filtered or unexported fields
}

func (*RunReply) Descriptor deprecated

func (*RunReply) Descriptor() ([]byte, []int)

Deprecated: Use RunReply.ProtoReflect.Descriptor instead.

func (*RunReply) GetMsg

func (x *RunReply) GetMsg() string

func (*RunReply) GetRc

func (x *RunReply) GetRc() int32

func (*RunReply) ProtoMessage

func (*RunReply) ProtoMessage()

func (*RunReply) ProtoReflect

func (x *RunReply) ProtoReflect() protoreflect.Message

func (*RunReply) Reset

func (x *RunReply) Reset()

func (*RunReply) String

func (x *RunReply) String() string

type RunStartRequest

type RunStartRequest struct {
	Runn   uint32               `protobuf:"varint,1,opt,name=runn,proto3" json:"runn,omitempty"` // run number
	Config string               `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	Mode   RunStartRequest_Mode `protobuf:"varint,3,opt,name=mode,proto3,enum=ctpd.RunStartRequest_Mode" json:"mode,omitempty"`
	PhBc   string               `protobuf:"bytes,4,opt,name=ph_bc,json=phBc,proto3" json:"ph_bc,omitempty"`    // BC-downscaled rate of physics triggers
	PhRnd  string               `protobuf:"bytes,5,opt,name=ph_rnd,json=phRnd,proto3" json:"ph_rnd,omitempty"` // rate of physics triggers generated randomly
	// ph_ ...: "": use default (from config)
	//          N : number of BCs between 2 triggers
	//          2.3khz  rate of triggers: 2.3 khz
	Detector string `protobuf:"bytes,6,opt,name=detector,proto3" json:"detector,omitempty"` // detector has to be given for stdalone runs, "" for global run
	// contains filtered or unexported fields
}

global + stdalone runs (common for ctpd/ltud):

func (*RunStartRequest) Descriptor deprecated

func (*RunStartRequest) Descriptor() ([]byte, []int)

Deprecated: Use RunStartRequest.ProtoReflect.Descriptor instead.

func (*RunStartRequest) GetConfig

func (x *RunStartRequest) GetConfig() string

func (*RunStartRequest) GetDetector

func (x *RunStartRequest) GetDetector() string

func (*RunStartRequest) GetMode

func (*RunStartRequest) GetPhBc

func (x *RunStartRequest) GetPhBc() string

func (*RunStartRequest) GetPhRnd

func (x *RunStartRequest) GetPhRnd() string

func (*RunStartRequest) GetRunn

func (x *RunStartRequest) GetRunn() uint32

func (*RunStartRequest) ProtoMessage

func (*RunStartRequest) ProtoMessage()

func (*RunStartRequest) ProtoReflect

func (x *RunStartRequest) ProtoReflect() protoreflect.Message

func (*RunStartRequest) Reset

func (x *RunStartRequest) Reset()

func (*RunStartRequest) String

func (x *RunStartRequest) String() string

type RunStartRequest_Mode

type RunStartRequest_Mode int32

-config, e.g. "trig\nPH_bc 100 inf" or -key in case the config is available in Consul[key] -"" use default configuration

Optional parameters follows, overriding parameters in config string for the begining let's agree on three parameters :

const (
	RunStartRequest_NULL RunStartRequest_Mode = 0 // use default (from config)
	RunStartRequest_TRIG RunStartRequest_Mode = 1
	RunStartRequest_CONT RunStartRequest_Mode = 2
)

func (RunStartRequest_Mode) Descriptor

func (RunStartRequest_Mode) Enum

func (RunStartRequest_Mode) EnumDescriptor deprecated

func (RunStartRequest_Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use RunStartRequest_Mode.Descriptor instead.

func (RunStartRequest_Mode) Number

func (RunStartRequest_Mode) String

func (x RunStartRequest_Mode) String() string

func (RunStartRequest_Mode) Type

type RunStatusRequest

type RunStatusRequest struct {
	Runn uint32 `protobuf:"varint,1,opt,name=runn,proto3" json:"runn,omitempty"`
	// contains filtered or unexported fields
}

func (*RunStatusRequest) Descriptor deprecated

func (*RunStatusRequest) Descriptor() ([]byte, []int)

Deprecated: Use RunStatusRequest.ProtoReflect.Descriptor instead.

func (*RunStatusRequest) GetRunn

func (x *RunStatusRequest) GetRunn() uint32

func (*RunStatusRequest) ProtoMessage

func (*RunStatusRequest) ProtoMessage()

func (*RunStatusRequest) ProtoReflect

func (x *RunStatusRequest) ProtoReflect() protoreflect.Message

func (*RunStatusRequest) Reset

func (x *RunStatusRequest) Reset()

func (*RunStatusRequest) String

func (x *RunStatusRequest) String() string

type RunStopRequest

type RunStopRequest struct {
	Runn     uint32 `protobuf:"varint,1,opt,name=runn,proto3" json:"runn,omitempty"`
	Detector string `protobuf:"bytes,2,opt,name=detector,proto3" json:"detector,omitempty"` // only for stdalone runs (forced stop)
	// contains filtered or unexported fields
}

func (*RunStopRequest) Descriptor deprecated

func (*RunStopRequest) Descriptor() ([]byte, []int)

Deprecated: Use RunStopRequest.ProtoReflect.Descriptor instead.

func (*RunStopRequest) GetDetector

func (x *RunStopRequest) GetDetector() string

func (*RunStopRequest) GetRunn

func (x *RunStopRequest) GetRunn() uint32

func (*RunStopRequest) ProtoMessage

func (*RunStopRequest) ProtoMessage()

func (*RunStopRequest) ProtoReflect

func (x *RunStopRequest) ProtoReflect() protoreflect.Message

func (*RunStopRequest) Reset

func (x *RunStopRequest) Reset()

func (*RunStopRequest) String

func (x *RunStopRequest) String() string

type UnimplementedCTPdServer

type UnimplementedCTPdServer struct {
}

UnimplementedCTPdServer should be embedded to have forward compatible implementations.

func (UnimplementedCTPdServer) RunConfig

func (UnimplementedCTPdServer) RunList

func (UnimplementedCTPdServer) RunLoad

func (UnimplementedCTPdServer) RunStart

func (UnimplementedCTPdServer) RunStatus

func (UnimplementedCTPdServer) RunStop

func (UnimplementedCTPdServer) RunUnload

type UnsafeCTPdServer

type UnsafeCTPdServer interface {
	// contains filtered or unexported methods
}

UnsafeCTPdServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CTPdServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL