remotecontrol.pb.go 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: remotecontrol.proto
  3. package remotecontrol
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. math "math"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  22. type NetworkState_State int32
  23. const (
  24. NetworkState_None NetworkState_State = 0
  25. NetworkState_Idle NetworkState_State = 1
  26. NetworkState_Learning NetworkState_State = 2
  27. NetworkState_Validation NetworkState_State = 3
  28. NetworkState_Predict NetworkState_State = 4
  29. )
  30. var NetworkState_State_name = map[int32]string{
  31. 0: "None",
  32. 1: "Idle",
  33. 2: "Learning",
  34. 3: "Validation",
  35. 4: "Predict",
  36. }
  37. var NetworkState_State_value = map[string]int32{
  38. "None": 0,
  39. "Idle": 1,
  40. "Learning": 2,
  41. "Validation": 3,
  42. "Predict": 4,
  43. }
  44. func (x NetworkState_State) String() string {
  45. return proto.EnumName(NetworkState_State_name, int32(x))
  46. }
  47. func (NetworkState_State) EnumDescriptor() ([]byte, []int) {
  48. return fileDescriptor_9e7470c0107e56c6, []int{0, 0}
  49. }
  50. type LayerMatrix_ContentType int32
  51. const (
  52. LayerMatrix_Activations LayerMatrix_ContentType = 0
  53. LayerMatrix_Weights LayerMatrix_ContentType = 1
  54. LayerMatrix_Biases LayerMatrix_ContentType = 2
  55. )
  56. var LayerMatrix_ContentType_name = map[int32]string{
  57. 0: "Activations",
  58. 1: "Weights",
  59. 2: "Biases",
  60. }
  61. var LayerMatrix_ContentType_value = map[string]int32{
  62. "Activations": 0,
  63. "Weights": 1,
  64. "Biases": 2,
  65. }
  66. func (x LayerMatrix_ContentType) String() string {
  67. return proto.EnumName(LayerMatrix_ContentType_name, int32(x))
  68. }
  69. func (LayerMatrix_ContentType) EnumDescriptor() ([]byte, []int) {
  70. return fileDescriptor_9e7470c0107e56c6, []int{2, 0}
  71. }
  72. type NetworkState struct {
  73. State NetworkState_State `protobuf:"varint,1,opt,name=state,proto3,enum=remotecontrol.NetworkState_State" json:"state,omitempty"`
  74. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  75. XXX_unrecognized []byte `json:"-"`
  76. XXX_sizecache int32 `json:"-"`
  77. }
  78. func (m *NetworkState) Reset() { *m = NetworkState{} }
  79. func (m *NetworkState) String() string { return proto.CompactTextString(m) }
  80. func (*NetworkState) ProtoMessage() {}
  81. func (*NetworkState) Descriptor() ([]byte, []int) {
  82. return fileDescriptor_9e7470c0107e56c6, []int{0}
  83. }
  84. func (m *NetworkState) XXX_Unmarshal(b []byte) error {
  85. return xxx_messageInfo_NetworkState.Unmarshal(m, b)
  86. }
  87. func (m *NetworkState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  88. return xxx_messageInfo_NetworkState.Marshal(b, m, deterministic)
  89. }
  90. func (m *NetworkState) XXX_Merge(src proto.Message) {
  91. xxx_messageInfo_NetworkState.Merge(m, src)
  92. }
  93. func (m *NetworkState) XXX_Size() int {
  94. return xxx_messageInfo_NetworkState.Size(m)
  95. }
  96. func (m *NetworkState) XXX_DiscardUnknown() {
  97. xxx_messageInfo_NetworkState.DiscardUnknown(m)
  98. }
  99. var xxx_messageInfo_NetworkState proto.InternalMessageInfo
  100. func (m *NetworkState) GetState() NetworkState_State {
  101. if m != nil {
  102. return m.State
  103. }
  104. return NetworkState_None
  105. }
  106. type Matrix struct {
  107. Matrix []byte `protobuf:"bytes,1,opt,name=matrix,proto3" json:"matrix,omitempty"`
  108. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  109. XXX_unrecognized []byte `json:"-"`
  110. XXX_sizecache int32 `json:"-"`
  111. }
  112. func (m *Matrix) Reset() { *m = Matrix{} }
  113. func (m *Matrix) String() string { return proto.CompactTextString(m) }
  114. func (*Matrix) ProtoMessage() {}
  115. func (*Matrix) Descriptor() ([]byte, []int) {
  116. return fileDescriptor_9e7470c0107e56c6, []int{1}
  117. }
  118. func (m *Matrix) XXX_Unmarshal(b []byte) error {
  119. return xxx_messageInfo_Matrix.Unmarshal(m, b)
  120. }
  121. func (m *Matrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  122. return xxx_messageInfo_Matrix.Marshal(b, m, deterministic)
  123. }
  124. func (m *Matrix) XXX_Merge(src proto.Message) {
  125. xxx_messageInfo_Matrix.Merge(m, src)
  126. }
  127. func (m *Matrix) XXX_Size() int {
  128. return xxx_messageInfo_Matrix.Size(m)
  129. }
  130. func (m *Matrix) XXX_DiscardUnknown() {
  131. xxx_messageInfo_Matrix.DiscardUnknown(m)
  132. }
  133. var xxx_messageInfo_Matrix proto.InternalMessageInfo
  134. func (m *Matrix) GetMatrix() []byte {
  135. if m != nil {
  136. return m.Matrix
  137. }
  138. return nil
  139. }
  140. type LayerMatrix struct {
  141. ContentType LayerMatrix_ContentType `protobuf:"varint,1,opt,name=contentType,proto3,enum=remotecontrol.LayerMatrix_ContentType" json:"contentType,omitempty"`
  142. Layer int32 `protobuf:"zigzag32,2,opt,name=layer,proto3" json:"layer,omitempty"`
  143. Matrix *Matrix `protobuf:"bytes,3,opt,name=matrix,proto3" json:"matrix,omitempty"`
  144. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  145. XXX_unrecognized []byte `json:"-"`
  146. XXX_sizecache int32 `json:"-"`
  147. }
  148. func (m *LayerMatrix) Reset() { *m = LayerMatrix{} }
  149. func (m *LayerMatrix) String() string { return proto.CompactTextString(m) }
  150. func (*LayerMatrix) ProtoMessage() {}
  151. func (*LayerMatrix) Descriptor() ([]byte, []int) {
  152. return fileDescriptor_9e7470c0107e56c6, []int{2}
  153. }
  154. func (m *LayerMatrix) XXX_Unmarshal(b []byte) error {
  155. return xxx_messageInfo_LayerMatrix.Unmarshal(m, b)
  156. }
  157. func (m *LayerMatrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  158. return xxx_messageInfo_LayerMatrix.Marshal(b, m, deterministic)
  159. }
  160. func (m *LayerMatrix) XXX_Merge(src proto.Message) {
  161. xxx_messageInfo_LayerMatrix.Merge(m, src)
  162. }
  163. func (m *LayerMatrix) XXX_Size() int {
  164. return xxx_messageInfo_LayerMatrix.Size(m)
  165. }
  166. func (m *LayerMatrix) XXX_DiscardUnknown() {
  167. xxx_messageInfo_LayerMatrix.DiscardUnknown(m)
  168. }
  169. var xxx_messageInfo_LayerMatrix proto.InternalMessageInfo
  170. func (m *LayerMatrix) GetContentType() LayerMatrix_ContentType {
  171. if m != nil {
  172. return m.ContentType
  173. }
  174. return LayerMatrix_Activations
  175. }
  176. func (m *LayerMatrix) GetLayer() int32 {
  177. if m != nil {
  178. return m.Layer
  179. }
  180. return 0
  181. }
  182. func (m *LayerMatrix) GetMatrix() *Matrix {
  183. if m != nil {
  184. return m.Matrix
  185. }
  186. return nil
  187. }
  188. type Configuration struct {
  189. Sizes []int32 `protobuf:"zigzag32,1,rep,packed,name=sizes,proto3" json:"sizes,omitempty"`
  190. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  191. XXX_unrecognized []byte `json:"-"`
  192. XXX_sizecache int32 `json:"-"`
  193. }
  194. func (m *Configuration) Reset() { *m = Configuration{} }
  195. func (m *Configuration) String() string { return proto.CompactTextString(m) }
  196. func (*Configuration) ProtoMessage() {}
  197. func (*Configuration) Descriptor() ([]byte, []int) {
  198. return fileDescriptor_9e7470c0107e56c6, []int{3}
  199. }
  200. func (m *Configuration) XXX_Unmarshal(b []byte) error {
  201. return xxx_messageInfo_Configuration.Unmarshal(m, b)
  202. }
  203. func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  204. return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
  205. }
  206. func (m *Configuration) XXX_Merge(src proto.Message) {
  207. xxx_messageInfo_Configuration.Merge(m, src)
  208. }
  209. func (m *Configuration) XXX_Size() int {
  210. return xxx_messageInfo_Configuration.Size(m)
  211. }
  212. func (m *Configuration) XXX_DiscardUnknown() {
  213. xxx_messageInfo_Configuration.DiscardUnknown(m)
  214. }
  215. var xxx_messageInfo_Configuration proto.InternalMessageInfo
  216. func (m *Configuration) GetSizes() []int32 {
  217. if m != nil {
  218. return m.Sizes
  219. }
  220. return nil
  221. }
  222. type None struct {
  223. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  224. XXX_unrecognized []byte `json:"-"`
  225. XXX_sizecache int32 `json:"-"`
  226. }
  227. func (m *None) Reset() { *m = None{} }
  228. func (m *None) String() string { return proto.CompactTextString(m) }
  229. func (*None) ProtoMessage() {}
  230. func (*None) Descriptor() ([]byte, []int) {
  231. return fileDescriptor_9e7470c0107e56c6, []int{4}
  232. }
  233. func (m *None) XXX_Unmarshal(b []byte) error {
  234. return xxx_messageInfo_None.Unmarshal(m, b)
  235. }
  236. func (m *None) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  237. return xxx_messageInfo_None.Marshal(b, m, deterministic)
  238. }
  239. func (m *None) XXX_Merge(src proto.Message) {
  240. xxx_messageInfo_None.Merge(m, src)
  241. }
  242. func (m *None) XXX_Size() int {
  243. return xxx_messageInfo_None.Size(m)
  244. }
  245. func (m *None) XXX_DiscardUnknown() {
  246. xxx_messageInfo_None.DiscardUnknown(m)
  247. }
  248. var xxx_messageInfo_None proto.InternalMessageInfo
  249. func init() {
  250. proto.RegisterEnum("remotecontrol.NetworkState_State", NetworkState_State_name, NetworkState_State_value)
  251. proto.RegisterEnum("remotecontrol.LayerMatrix_ContentType", LayerMatrix_ContentType_name, LayerMatrix_ContentType_value)
  252. proto.RegisterType((*NetworkState)(nil), "remotecontrol.NetworkState")
  253. proto.RegisterType((*Matrix)(nil), "remotecontrol.Matrix")
  254. proto.RegisterType((*LayerMatrix)(nil), "remotecontrol.LayerMatrix")
  255. proto.RegisterType((*Configuration)(nil), "remotecontrol.Configuration")
  256. proto.RegisterType((*None)(nil), "remotecontrol.None")
  257. }
  258. func init() { proto.RegisterFile("remotecontrol.proto", fileDescriptor_9e7470c0107e56c6) }
  259. var fileDescriptor_9e7470c0107e56c6 = []byte{
  260. // 422 bytes of a gzipped FileDescriptorProto
  261. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x4f, 0xef, 0xd2, 0x40,
  262. 0x10, 0xed, 0xd2, 0x1f, 0xfd, 0xfd, 0x32, 0x05, 0x5c, 0x17, 0x35, 0x04, 0x3d, 0xd4, 0x4d, 0x34,
  263. 0x5c, 0x6c, 0x0c, 0x1e, 0xd0, 0x83, 0x26, 0x42, 0xe2, 0x9f, 0x04, 0x89, 0x29, 0x46, 0xcf, 0x2b,
  264. 0x5d, 0xeb, 0xc6, 0x76, 0x97, 0x6c, 0x17, 0x15, 0xbf, 0x84, 0x1f, 0xcd, 0x93, 0xdf, 0xc7, 0x74,
  265. 0x0b, 0xd8, 0x36, 0xd5, 0x03, 0x97, 0x66, 0x66, 0xf2, 0xde, 0x9b, 0x37, 0xb3, 0x53, 0x18, 0x6a,
  266. 0x9e, 0x29, 0xc3, 0x37, 0x4a, 0x1a, 0xad, 0xd2, 0x70, 0xab, 0x95, 0x51, 0xa4, 0x5f, 0x2b, 0xd2,
  267. 0x9f, 0x08, 0x7a, 0x2b, 0x6e, 0xbe, 0x29, 0xfd, 0x65, 0x6d, 0x98, 0xe1, 0x64, 0x06, 0xdd, 0xbc,
  268. 0x08, 0x46, 0x28, 0x40, 0x93, 0xc1, 0xf4, 0x6e, 0x58, 0x17, 0xa9, 0x62, 0x43, 0xfb, 0x8d, 0x4a,
  269. 0x3c, 0x7d, 0x01, 0xdd, 0x52, 0xe1, 0x0a, 0x2e, 0x56, 0x4a, 0x72, 0xec, 0x14, 0xd1, 0xeb, 0x38,
  270. 0xe5, 0x18, 0x91, 0x1e, 0x5c, 0x2d, 0x39, 0xd3, 0x52, 0xc8, 0x04, 0x77, 0xc8, 0x00, 0xe0, 0x3d,
  271. 0x4b, 0x45, 0xcc, 0x8c, 0x50, 0x12, 0xbb, 0xc4, 0x87, 0xcb, 0xb7, 0x9a, 0xc7, 0x62, 0x63, 0xf0,
  272. 0x05, 0x0d, 0xc0, 0x7b, 0xc3, 0x8c, 0x16, 0xdf, 0xc9, 0x2d, 0xf0, 0x32, 0x1b, 0x59, 0x2f, 0xbd,
  273. 0xe8, 0x90, 0xd1, 0xdf, 0x08, 0xfc, 0x25, 0xdb, 0x73, 0x7d, 0xc0, 0xbd, 0x02, 0xbf, 0xb0, 0xc7,
  274. 0xa5, 0x79, 0xb7, 0xdf, 0x1e, 0x8d, 0xdf, 0x6f, 0x18, 0xaf, 0x10, 0xc2, 0xc5, 0x5f, 0x74, 0x54,
  275. 0xa5, 0x92, 0x1b, 0xd0, 0x4d, 0x0b, 0xdc, 0xa8, 0x13, 0xa0, 0xc9, 0xf5, 0xa8, 0x4c, 0xc8, 0x83,
  276. 0x93, 0x0f, 0x37, 0x40, 0x13, 0x7f, 0x7a, 0xb3, 0x21, 0x5d, 0xaa, 0x9e, 0xec, 0xcd, 0xc0, 0xaf,
  277. 0x34, 0x20, 0xd7, 0xc0, 0x7f, 0xbe, 0x31, 0xe2, 0xab, 0x1d, 0x36, 0xc7, 0x4e, 0x31, 0xed, 0x07,
  278. 0x2e, 0x92, 0xcf, 0x26, 0xc7, 0x88, 0x00, 0x78, 0x73, 0xc1, 0x72, 0x9e, 0xe3, 0x0e, 0xbd, 0x07,
  279. 0xfd, 0x85, 0x92, 0x9f, 0x44, 0xb2, 0xd3, 0x16, 0x5c, 0xd8, 0xc9, 0xc5, 0x0f, 0x9e, 0x8f, 0x50,
  280. 0xe0, 0x16, 0x76, 0x6c, 0x42, 0xbd, 0x72, 0xbf, 0xd3, 0x5f, 0x2e, 0xf4, 0x23, 0x6b, 0x64, 0x51,
  281. 0x1a, 0x21, 0x2f, 0x01, 0x27, 0xdc, 0xd4, 0x35, 0x86, 0xcd, 0x07, 0x54, 0x92, 0x8f, 0xef, 0x34,
  282. 0x8a, 0x35, 0x0a, 0x75, 0xc8, 0xbc, 0xe6, 0xb9, 0x5d, 0x63, 0xfc, 0xef, 0x05, 0x53, 0xe7, 0x21,
  283. 0x22, 0x4f, 0x8f, 0x93, 0x9d, 0x47, 0x7f, 0x76, 0xda, 0xd2, 0xb9, 0xed, 0x0f, 0xe7, 0xd8, 0xca,
  284. 0xbe, 0xfd, 0x9f, 0xb3, 0xb6, 0xf4, 0x27, 0x70, 0xb9, 0x2d, 0x4f, 0x92, 0xb4, 0x3f, 0xf7, 0xb8,
  285. 0xbd, 0x4c, 0x1d, 0xf2, 0x18, 0x20, 0xde, 0x65, 0xd9, 0x7e, 0x6d, 0x98, 0x36, 0xed, 0xed, 0xdb,
  286. 0x8a, 0xd4, 0xf9, 0xe8, 0xd9, 0x5f, 0xf4, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x9d,
  287. 0x2f, 0xb4, 0xb9, 0x03, 0x00, 0x00,
  288. }
  289. // Reference imports to suppress errors if they are not otherwise used.
  290. var _ context.Context
  291. var _ grpc.ClientConn
  292. // This is a compile-time assertion to ensure that this generated file
  293. // is compatible with the grpc package it is being compiled against.
  294. const _ = grpc.SupportPackageIsVersion4
  295. // RemoteControlClient is the client API for RemoteControl service.
  296. //
  297. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  298. type RemoteControlClient interface {
  299. GetConfiguration(ctx context.Context, in *None, opts ...grpc.CallOption) (*Configuration, error)
  300. Activations(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_ActivationsClient, error)
  301. Biases(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_BiasesClient, error)
  302. Weights(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_WeightsClient, error)
  303. State(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_StateClient, error)
  304. Predict(ctx context.Context, in *Matrix, opts ...grpc.CallOption) (*Matrix, error)
  305. DummyStart(ctx context.Context, in *None, opts ...grpc.CallOption) (*None, error)
  306. }
  307. type remoteControlClient struct {
  308. cc *grpc.ClientConn
  309. }
  310. func NewRemoteControlClient(cc *grpc.ClientConn) RemoteControlClient {
  311. return &remoteControlClient{cc}
  312. }
  313. func (c *remoteControlClient) GetConfiguration(ctx context.Context, in *None, opts ...grpc.CallOption) (*Configuration, error) {
  314. out := new(Configuration)
  315. err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/getConfiguration", in, out, opts...)
  316. if err != nil {
  317. return nil, err
  318. }
  319. return out, nil
  320. }
  321. func (c *remoteControlClient) Activations(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_ActivationsClient, error) {
  322. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[0], "/remotecontrol.RemoteControl/Activations", opts...)
  323. if err != nil {
  324. return nil, err
  325. }
  326. x := &remoteControlActivationsClient{stream}
  327. if err := x.ClientStream.SendMsg(in); err != nil {
  328. return nil, err
  329. }
  330. if err := x.ClientStream.CloseSend(); err != nil {
  331. return nil, err
  332. }
  333. return x, nil
  334. }
  335. type RemoteControl_ActivationsClient interface {
  336. Recv() (*LayerMatrix, error)
  337. grpc.ClientStream
  338. }
  339. type remoteControlActivationsClient struct {
  340. grpc.ClientStream
  341. }
  342. func (x *remoteControlActivationsClient) Recv() (*LayerMatrix, error) {
  343. m := new(LayerMatrix)
  344. if err := x.ClientStream.RecvMsg(m); err != nil {
  345. return nil, err
  346. }
  347. return m, nil
  348. }
  349. func (c *remoteControlClient) Biases(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_BiasesClient, error) {
  350. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[1], "/remotecontrol.RemoteControl/Biases", opts...)
  351. if err != nil {
  352. return nil, err
  353. }
  354. x := &remoteControlBiasesClient{stream}
  355. if err := x.ClientStream.SendMsg(in); err != nil {
  356. return nil, err
  357. }
  358. if err := x.ClientStream.CloseSend(); err != nil {
  359. return nil, err
  360. }
  361. return x, nil
  362. }
  363. type RemoteControl_BiasesClient interface {
  364. Recv() (*LayerMatrix, error)
  365. grpc.ClientStream
  366. }
  367. type remoteControlBiasesClient struct {
  368. grpc.ClientStream
  369. }
  370. func (x *remoteControlBiasesClient) Recv() (*LayerMatrix, error) {
  371. m := new(LayerMatrix)
  372. if err := x.ClientStream.RecvMsg(m); err != nil {
  373. return nil, err
  374. }
  375. return m, nil
  376. }
  377. func (c *remoteControlClient) Weights(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_WeightsClient, error) {
  378. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[2], "/remotecontrol.RemoteControl/Weights", opts...)
  379. if err != nil {
  380. return nil, err
  381. }
  382. x := &remoteControlWeightsClient{stream}
  383. if err := x.ClientStream.SendMsg(in); err != nil {
  384. return nil, err
  385. }
  386. if err := x.ClientStream.CloseSend(); err != nil {
  387. return nil, err
  388. }
  389. return x, nil
  390. }
  391. type RemoteControl_WeightsClient interface {
  392. Recv() (*LayerMatrix, error)
  393. grpc.ClientStream
  394. }
  395. type remoteControlWeightsClient struct {
  396. grpc.ClientStream
  397. }
  398. func (x *remoteControlWeightsClient) Recv() (*LayerMatrix, error) {
  399. m := new(LayerMatrix)
  400. if err := x.ClientStream.RecvMsg(m); err != nil {
  401. return nil, err
  402. }
  403. return m, nil
  404. }
  405. func (c *remoteControlClient) State(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_StateClient, error) {
  406. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[3], "/remotecontrol.RemoteControl/State", opts...)
  407. if err != nil {
  408. return nil, err
  409. }
  410. x := &remoteControlStateClient{stream}
  411. if err := x.ClientStream.SendMsg(in); err != nil {
  412. return nil, err
  413. }
  414. if err := x.ClientStream.CloseSend(); err != nil {
  415. return nil, err
  416. }
  417. return x, nil
  418. }
  419. type RemoteControl_StateClient interface {
  420. Recv() (*NetworkState, error)
  421. grpc.ClientStream
  422. }
  423. type remoteControlStateClient struct {
  424. grpc.ClientStream
  425. }
  426. func (x *remoteControlStateClient) Recv() (*NetworkState, error) {
  427. m := new(NetworkState)
  428. if err := x.ClientStream.RecvMsg(m); err != nil {
  429. return nil, err
  430. }
  431. return m, nil
  432. }
  433. func (c *remoteControlClient) Predict(ctx context.Context, in *Matrix, opts ...grpc.CallOption) (*Matrix, error) {
  434. out := new(Matrix)
  435. err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/predict", in, out, opts...)
  436. if err != nil {
  437. return nil, err
  438. }
  439. return out, nil
  440. }
  441. func (c *remoteControlClient) DummyStart(ctx context.Context, in *None, opts ...grpc.CallOption) (*None, error) {
  442. out := new(None)
  443. err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/dummyStart", in, out, opts...)
  444. if err != nil {
  445. return nil, err
  446. }
  447. return out, nil
  448. }
  449. // RemoteControlServer is the server API for RemoteControl service.
  450. type RemoteControlServer interface {
  451. GetConfiguration(context.Context, *None) (*Configuration, error)
  452. Activations(*None, RemoteControl_ActivationsServer) error
  453. Biases(*None, RemoteControl_BiasesServer) error
  454. Weights(*None, RemoteControl_WeightsServer) error
  455. State(*None, RemoteControl_StateServer) error
  456. Predict(context.Context, *Matrix) (*Matrix, error)
  457. DummyStart(context.Context, *None) (*None, error)
  458. }
  459. // UnimplementedRemoteControlServer can be embedded to have forward compatible implementations.
  460. type UnimplementedRemoteControlServer struct {
  461. }
  462. func (*UnimplementedRemoteControlServer) GetConfiguration(ctx context.Context, req *None) (*Configuration, error) {
  463. return nil, status.Errorf(codes.Unimplemented, "method GetConfiguration not implemented")
  464. }
  465. func (*UnimplementedRemoteControlServer) Activations(req *None, srv RemoteControl_ActivationsServer) error {
  466. return status.Errorf(codes.Unimplemented, "method Activations not implemented")
  467. }
  468. func (*UnimplementedRemoteControlServer) Biases(req *None, srv RemoteControl_BiasesServer) error {
  469. return status.Errorf(codes.Unimplemented, "method Biases not implemented")
  470. }
  471. func (*UnimplementedRemoteControlServer) Weights(req *None, srv RemoteControl_WeightsServer) error {
  472. return status.Errorf(codes.Unimplemented, "method Weights not implemented")
  473. }
  474. func (*UnimplementedRemoteControlServer) State(req *None, srv RemoteControl_StateServer) error {
  475. return status.Errorf(codes.Unimplemented, "method State not implemented")
  476. }
  477. func (*UnimplementedRemoteControlServer) Predict(ctx context.Context, req *Matrix) (*Matrix, error) {
  478. return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented")
  479. }
  480. func (*UnimplementedRemoteControlServer) DummyStart(ctx context.Context, req *None) (*None, error) {
  481. return nil, status.Errorf(codes.Unimplemented, "method DummyStart not implemented")
  482. }
  483. func RegisterRemoteControlServer(s *grpc.Server, srv RemoteControlServer) {
  484. s.RegisterService(&_RemoteControl_serviceDesc, srv)
  485. }
  486. func _RemoteControl_GetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  487. in := new(None)
  488. if err := dec(in); err != nil {
  489. return nil, err
  490. }
  491. if interceptor == nil {
  492. return srv.(RemoteControlServer).GetConfiguration(ctx, in)
  493. }
  494. info := &grpc.UnaryServerInfo{
  495. Server: srv,
  496. FullMethod: "/remotecontrol.RemoteControl/GetConfiguration",
  497. }
  498. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  499. return srv.(RemoteControlServer).GetConfiguration(ctx, req.(*None))
  500. }
  501. return interceptor(ctx, in, info, handler)
  502. }
  503. func _RemoteControl_Activations_Handler(srv interface{}, stream grpc.ServerStream) error {
  504. m := new(None)
  505. if err := stream.RecvMsg(m); err != nil {
  506. return err
  507. }
  508. return srv.(RemoteControlServer).Activations(m, &remoteControlActivationsServer{stream})
  509. }
  510. type RemoteControl_ActivationsServer interface {
  511. Send(*LayerMatrix) error
  512. grpc.ServerStream
  513. }
  514. type remoteControlActivationsServer struct {
  515. grpc.ServerStream
  516. }
  517. func (x *remoteControlActivationsServer) Send(m *LayerMatrix) error {
  518. return x.ServerStream.SendMsg(m)
  519. }
  520. func _RemoteControl_Biases_Handler(srv interface{}, stream grpc.ServerStream) error {
  521. m := new(None)
  522. if err := stream.RecvMsg(m); err != nil {
  523. return err
  524. }
  525. return srv.(RemoteControlServer).Biases(m, &remoteControlBiasesServer{stream})
  526. }
  527. type RemoteControl_BiasesServer interface {
  528. Send(*LayerMatrix) error
  529. grpc.ServerStream
  530. }
  531. type remoteControlBiasesServer struct {
  532. grpc.ServerStream
  533. }
  534. func (x *remoteControlBiasesServer) Send(m *LayerMatrix) error {
  535. return x.ServerStream.SendMsg(m)
  536. }
  537. func _RemoteControl_Weights_Handler(srv interface{}, stream grpc.ServerStream) error {
  538. m := new(None)
  539. if err := stream.RecvMsg(m); err != nil {
  540. return err
  541. }
  542. return srv.(RemoteControlServer).Weights(m, &remoteControlWeightsServer{stream})
  543. }
  544. type RemoteControl_WeightsServer interface {
  545. Send(*LayerMatrix) error
  546. grpc.ServerStream
  547. }
  548. type remoteControlWeightsServer struct {
  549. grpc.ServerStream
  550. }
  551. func (x *remoteControlWeightsServer) Send(m *LayerMatrix) error {
  552. return x.ServerStream.SendMsg(m)
  553. }
  554. func _RemoteControl_State_Handler(srv interface{}, stream grpc.ServerStream) error {
  555. m := new(None)
  556. if err := stream.RecvMsg(m); err != nil {
  557. return err
  558. }
  559. return srv.(RemoteControlServer).State(m, &remoteControlStateServer{stream})
  560. }
  561. type RemoteControl_StateServer interface {
  562. Send(*NetworkState) error
  563. grpc.ServerStream
  564. }
  565. type remoteControlStateServer struct {
  566. grpc.ServerStream
  567. }
  568. func (x *remoteControlStateServer) Send(m *NetworkState) error {
  569. return x.ServerStream.SendMsg(m)
  570. }
  571. func _RemoteControl_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  572. in := new(Matrix)
  573. if err := dec(in); err != nil {
  574. return nil, err
  575. }
  576. if interceptor == nil {
  577. return srv.(RemoteControlServer).Predict(ctx, in)
  578. }
  579. info := &grpc.UnaryServerInfo{
  580. Server: srv,
  581. FullMethod: "/remotecontrol.RemoteControl/Predict",
  582. }
  583. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  584. return srv.(RemoteControlServer).Predict(ctx, req.(*Matrix))
  585. }
  586. return interceptor(ctx, in, info, handler)
  587. }
  588. func _RemoteControl_DummyStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  589. in := new(None)
  590. if err := dec(in); err != nil {
  591. return nil, err
  592. }
  593. if interceptor == nil {
  594. return srv.(RemoteControlServer).DummyStart(ctx, in)
  595. }
  596. info := &grpc.UnaryServerInfo{
  597. Server: srv,
  598. FullMethod: "/remotecontrol.RemoteControl/DummyStart",
  599. }
  600. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  601. return srv.(RemoteControlServer).DummyStart(ctx, req.(*None))
  602. }
  603. return interceptor(ctx, in, info, handler)
  604. }
  605. var _RemoteControl_serviceDesc = grpc.ServiceDesc{
  606. ServiceName: "remotecontrol.RemoteControl",
  607. HandlerType: (*RemoteControlServer)(nil),
  608. Methods: []grpc.MethodDesc{
  609. {
  610. MethodName: "getConfiguration",
  611. Handler: _RemoteControl_GetConfiguration_Handler,
  612. },
  613. {
  614. MethodName: "predict",
  615. Handler: _RemoteControl_Predict_Handler,
  616. },
  617. {
  618. MethodName: "dummyStart",
  619. Handler: _RemoteControl_DummyStart_Handler,
  620. },
  621. },
  622. Streams: []grpc.StreamDesc{
  623. {
  624. StreamName: "Activations",
  625. Handler: _RemoteControl_Activations_Handler,
  626. ServerStreams: true,
  627. },
  628. {
  629. StreamName: "Biases",
  630. Handler: _RemoteControl_Biases_Handler,
  631. ServerStreams: true,
  632. },
  633. {
  634. StreamName: "Weights",
  635. Handler: _RemoteControl_Weights_Handler,
  636. ServerStreams: true,
  637. },
  638. {
  639. StreamName: "State",
  640. Handler: _RemoteControl_State_Handler,
  641. ServerStreams: true,
  642. },
  643. },
  644. Metadata: "remotecontrol.proto",
  645. }