krpc 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 25e7b20ee6bcbfa7627de7f237087851579de82d
4
- data.tar.gz: 38f3f714068336a5746c49aa0bc5d57c091a0606
2
+ SHA256:
3
+ metadata.gz: 4cc79391e6464734da36d5394e3dd7d2a33530fbc170a74d24f8f22db91fb892
4
+ data.tar.gz: e8e5caa33a90f611effd0d17a466e633daf9504095488e8247f7e480fdbdf13c
5
5
  SHA512:
6
- metadata.gz: 9b9b61c74cec8182b71b35dedd36999a580bb320c2ec4badfa307fc0f3e36cfde4949e920b0c7f33ec4f38d99d790083af08b395018bffc47a5ba32f6d6b5850
7
- data.tar.gz: 303714067ff33867ffb740bca452b9fa0a63869ab1bb5d45d823635f4fbbfdcee33ac6713ce0548be334784b5e18850e64d313ce2836bf30ca576249feefa901
6
+ metadata.gz: 459faf66013b0bea822510f261228af16b2ff1ec9014d4b33df10f7a5f5be261096166eed404b9642b0812e16b3b935a491510ab599359744d379dce66694977
7
+ data.tar.gz: 2aa96e79974c0288573ea7f3f51e0dc427aa6f3964961ffe003baa0610ca9261474cd202a4ab7dabff76d5391a70bd7fe115f96a35131745a16f55081563fd35
@@ -22,14 +22,14 @@ Gem::Specification.new do |s|
22
22
  "--title" << "kRPC-rb API Docs" <<
23
23
  "--main" << "README.md"
24
24
 
25
- s.required_ruby_version = ">= 2.1.0"
25
+ s.required_ruby_version = ">= 2.3.0"
26
26
 
27
- s.add_runtime_dependency "google-protobuf", "~> 3.4"
27
+ s.add_runtime_dependency "google-protobuf", "~> 3.11"
28
28
  s.add_runtime_dependency "colorize", "~> 0.8"
29
- s.add_runtime_dependency "nokogiri", "~> 1.8"
30
- s.add_development_dependency "bundler", "~> 1.15"
31
- s.add_development_dependency "pry", "~> 0.11"
32
- s.add_development_dependency "rspec", "~> 3.6"
33
- s.add_development_dependency "rake", "~> 12.1"
29
+ s.add_runtime_dependency "nokogiri", "~> 1.10"
30
+ s.add_development_dependency "bundler", "~> 2.1"
31
+ s.add_development_dependency "pry", "~> 0.13"
32
+ s.add_development_dependency "rspec", "~> 3.9"
33
+ s.add_development_dependency "rake", "~> 13.0"
34
34
  s.add_development_dependency "hanna-nouveau", "~> 1.0"
35
35
  end
@@ -4,205 +4,229 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_message "krpc.schema.ConnectionRequest" do
8
- optional :type, :enum, 1, "krpc.schema.ConnectionRequest.Type"
9
- optional :client_name, :string, 2
10
- optional :client_identifier, :bytes, 3
11
- end
12
- add_enum "krpc.schema.ConnectionRequest.Type" do
13
- value :RPC, 0
14
- value :STREAM, 1
15
- end
16
- add_message "krpc.schema.ConnectionResponse" do
17
- optional :status, :enum, 1, "krpc.schema.ConnectionResponse.Status"
18
- optional :message, :string, 2
19
- optional :client_identifier, :bytes, 3
20
- end
21
- add_enum "krpc.schema.ConnectionResponse.Status" do
22
- value :OK, 0
23
- value :MALFORMED_MESSAGE, 1
24
- value :TIMEOUT, 2
25
- value :WRONG_TYPE, 3
26
- end
27
- add_message "krpc.schema.Request" do
28
- repeated :calls, :message, 1, "krpc.schema.ProcedureCall"
29
- end
30
- add_message "krpc.schema.ProcedureCall" do
31
- optional :service, :string, 1
32
- optional :procedure, :string, 2
33
- repeated :arguments, :message, 3, "krpc.schema.Argument"
34
- end
35
- add_message "krpc.schema.Argument" do
36
- optional :position, :uint32, 1
37
- optional :value, :bytes, 2
38
- end
39
- add_message "krpc.schema.Response" do
40
- optional :error, :message, 1, "krpc.schema.Error"
41
- repeated :results, :message, 2, "krpc.schema.ProcedureResult"
42
- end
43
- add_message "krpc.schema.ProcedureResult" do
44
- optional :error, :message, 1, "krpc.schema.Error"
45
- optional :value, :bytes, 2
46
- end
47
- add_message "krpc.schema.Error" do
48
- optional :service, :string, 1
49
- optional :name, :string, 2
50
- optional :description, :string, 3
51
- optional :stack_trace, :string, 4
52
- end
53
- add_message "krpc.schema.StreamUpdate" do
54
- repeated :results, :message, 1, "krpc.schema.StreamResult"
55
- end
56
- add_message "krpc.schema.StreamResult" do
57
- optional :id, :uint64, 1
58
- optional :result, :message, 2, "krpc.schema.ProcedureResult"
59
- end
60
- add_message "krpc.schema.Services" do
61
- repeated :services, :message, 1, "krpc.schema.Service"
62
- end
63
- add_message "krpc.schema.Service" do
64
- optional :name, :string, 1
65
- repeated :procedures, :message, 2, "krpc.schema.Procedure"
66
- repeated :classes, :message, 3, "krpc.schema.Class"
67
- repeated :enumerations, :message, 4, "krpc.schema.Enumeration"
68
- repeated :exceptions, :message, 5, "krpc.schema.Exception"
69
- optional :documentation, :string, 6
70
- end
71
- add_message "krpc.schema.Procedure" do
72
- optional :name, :string, 1
73
- repeated :parameters, :message, 2, "krpc.schema.Parameter"
74
- optional :return_type, :message, 3, "krpc.schema.Type"
75
- optional :return_is_nullable, :bool, 4
76
- optional :documentation, :string, 5
77
- end
78
- add_message "krpc.schema.Parameter" do
79
- optional :name, :string, 1
80
- optional :type, :message, 2, "krpc.schema.Type"
81
- optional :default_value, :bytes, 3
82
- end
83
- add_message "krpc.schema.Class" do
84
- optional :name, :string, 1
85
- optional :documentation, :string, 2
86
- end
87
- add_message "krpc.schema.Enumeration" do
88
- optional :name, :string, 1
89
- repeated :values, :message, 2, "krpc.schema.EnumerationValue"
90
- optional :documentation, :string, 3
91
- end
92
- add_message "krpc.schema.EnumerationValue" do
93
- optional :name, :string, 1
94
- optional :value, :int32, 2
95
- optional :documentation, :string, 3
96
- end
97
- add_message "krpc.schema.Exception" do
98
- optional :name, :string, 1
99
- optional :documentation, :string, 2
100
- end
101
- add_message "krpc.schema.Type" do
102
- optional :code, :enum, 1, "krpc.schema.Type.TypeCode"
103
- optional :service, :string, 2
104
- optional :name, :string, 3
105
- repeated :types, :message, 4, "krpc.schema.Type"
106
- end
107
- add_enum "krpc.schema.Type.TypeCode" do
108
- value :NONE, 0
109
- value :DOUBLE, 1
110
- value :FLOAT, 2
111
- value :SINT32, 3
112
- value :SINT64, 4
113
- value :UINT32, 5
114
- value :UINT64, 6
115
- value :BOOL, 7
116
- value :STRING, 8
117
- value :BYTES, 9
118
- value :CLASS, 100
119
- value :ENUMERATION, 101
120
- value :EVENT, 200
121
- value :PROCEDURE_CALL, 201
122
- value :STREAM, 202
123
- value :STATUS, 203
124
- value :SERVICES, 204
125
- value :TUPLE, 300
126
- value :LIST, 301
127
- value :SET, 302
128
- value :DICTIONARY, 303
129
- end
130
- add_message "krpc.schema.Tuple" do
131
- repeated :items, :bytes, 1
132
- end
133
- add_message "krpc.schema.List" do
134
- repeated :items, :bytes, 1
135
- end
136
- add_message "krpc.schema.Set" do
137
- repeated :items, :bytes, 1
138
- end
139
- add_message "krpc.schema.Dictionary" do
140
- repeated :entries, :message, 1, "krpc.schema.DictionaryEntry"
141
- end
142
- add_message "krpc.schema.DictionaryEntry" do
143
- optional :key, :bytes, 1
144
- optional :value, :bytes, 2
145
- end
146
- add_message "krpc.schema.Stream" do
147
- optional :id, :uint64, 1
148
- end
149
- add_message "krpc.schema.Event" do
150
- optional :stream, :message, 1, "krpc.schema.Stream"
151
- end
152
- add_message "krpc.schema.Status" do
153
- optional :version, :string, 1
154
- optional :bytes_read, :uint64, 2
155
- optional :bytes_written, :uint64, 3
156
- optional :bytes_read_rate, :float, 4
157
- optional :bytes_written_rate, :float, 5
158
- optional :rpcs_executed, :uint64, 6
159
- optional :rpc_rate, :float, 7
160
- optional :one_rpc_per_update, :bool, 8
161
- optional :max_time_per_update, :uint32, 9
162
- optional :adaptive_rate_control, :bool, 10
163
- optional :blocking_recv, :bool, 11
164
- optional :recv_timeout, :uint32, 12
165
- optional :time_per_rpc_update, :float, 13
166
- optional :poll_time_per_rpc_update, :float, 14
167
- optional :exec_time_per_rpc_update, :float, 15
168
- optional :stream_rpcs, :uint32, 16
169
- optional :stream_rpcs_executed, :uint64, 17
170
- optional :stream_rpc_rate, :float, 18
171
- optional :time_per_stream_update, :float, 19
7
+ add_file("krpc.proto", :syntax => :proto3) do
8
+ add_message "krpc.schema.ConnectionRequest" do
9
+ optional :type, :enum, 1, "krpc.schema.ConnectionRequest.Type"
10
+ optional :client_name, :string, 2
11
+ optional :client_identifier, :bytes, 3
12
+ end
13
+ add_enum "krpc.schema.ConnectionRequest.Type" do
14
+ value :RPC, 0
15
+ value :STREAM, 1
16
+ end
17
+ add_message "krpc.schema.ConnectionResponse" do
18
+ optional :status, :enum, 1, "krpc.schema.ConnectionResponse.Status"
19
+ optional :message, :string, 2
20
+ optional :client_identifier, :bytes, 3
21
+ end
22
+ add_enum "krpc.schema.ConnectionResponse.Status" do
23
+ value :OK, 0
24
+ value :MALFORMED_MESSAGE, 1
25
+ value :TIMEOUT, 2
26
+ value :WRONG_TYPE, 3
27
+ end
28
+ add_message "krpc.schema.Request" do
29
+ repeated :calls, :message, 1, "krpc.schema.ProcedureCall"
30
+ end
31
+ add_message "krpc.schema.ProcedureCall" do
32
+ optional :service, :string, 1
33
+ optional :procedure, :string, 2
34
+ optional :service_id, :uint32, 4
35
+ optional :procedure_id, :uint32, 5
36
+ repeated :arguments, :message, 3, "krpc.schema.Argument"
37
+ end
38
+ add_message "krpc.schema.Argument" do
39
+ optional :position, :uint32, 1
40
+ optional :value, :bytes, 2
41
+ end
42
+ add_message "krpc.schema.Response" do
43
+ optional :error, :message, 1, "krpc.schema.Error"
44
+ repeated :results, :message, 2, "krpc.schema.ProcedureResult"
45
+ end
46
+ add_message "krpc.schema.ProcedureResult" do
47
+ optional :error, :message, 1, "krpc.schema.Error"
48
+ optional :value, :bytes, 2
49
+ end
50
+ add_message "krpc.schema.Error" do
51
+ optional :service, :string, 1
52
+ optional :name, :string, 2
53
+ optional :description, :string, 3
54
+ optional :stack_trace, :string, 4
55
+ end
56
+ add_message "krpc.schema.StreamUpdate" do
57
+ repeated :results, :message, 1, "krpc.schema.StreamResult"
58
+ end
59
+ add_message "krpc.schema.StreamResult" do
60
+ optional :id, :uint64, 1
61
+ optional :result, :message, 2, "krpc.schema.ProcedureResult"
62
+ end
63
+ add_message "krpc.schema.Services" do
64
+ repeated :services, :message, 1, "krpc.schema.Service"
65
+ end
66
+ add_message "krpc.schema.Service" do
67
+ optional :name, :string, 1
68
+ repeated :procedures, :message, 2, "krpc.schema.Procedure"
69
+ repeated :classes, :message, 3, "krpc.schema.Class"
70
+ repeated :enumerations, :message, 4, "krpc.schema.Enumeration"
71
+ repeated :exceptions, :message, 5, "krpc.schema.Exception"
72
+ optional :documentation, :string, 6
73
+ end
74
+ add_message "krpc.schema.Procedure" do
75
+ optional :name, :string, 1
76
+ repeated :parameters, :message, 2, "krpc.schema.Parameter"
77
+ optional :return_type, :message, 3, "krpc.schema.Type"
78
+ optional :return_is_nullable, :bool, 4
79
+ repeated :game_scenes, :enum, 6, "krpc.schema.Procedure.GameScene"
80
+ optional :documentation, :string, 5
81
+ end
82
+ add_enum "krpc.schema.Procedure.GameScene" do
83
+ value :SPACE_CENTER, 0
84
+ value :FLIGHT, 1
85
+ value :TRACKING_STATION, 2
86
+ value :EDITOR_VAB, 3
87
+ value :EDITOR_SPH, 4
88
+ value :MISSION_BUILDER, 5
89
+ end
90
+ add_message "krpc.schema.Parameter" do
91
+ optional :name, :string, 1
92
+ optional :type, :message, 2, "krpc.schema.Type"
93
+ optional :default_value, :bytes, 3
94
+ end
95
+ add_message "krpc.schema.Class" do
96
+ optional :name, :string, 1
97
+ optional :documentation, :string, 2
98
+ end
99
+ add_message "krpc.schema.Enumeration" do
100
+ optional :name, :string, 1
101
+ repeated :values, :message, 2, "krpc.schema.EnumerationValue"
102
+ optional :documentation, :string, 3
103
+ end
104
+ add_message "krpc.schema.EnumerationValue" do
105
+ optional :name, :string, 1
106
+ optional :value, :int32, 2
107
+ optional :documentation, :string, 3
108
+ end
109
+ add_message "krpc.schema.Exception" do
110
+ optional :name, :string, 1
111
+ optional :documentation, :string, 2
112
+ end
113
+ add_message "krpc.schema.Type" do
114
+ optional :code, :enum, 1, "krpc.schema.Type.TypeCode"
115
+ optional :service, :string, 2
116
+ optional :name, :string, 3
117
+ repeated :types, :message, 4, "krpc.schema.Type"
118
+ end
119
+ add_enum "krpc.schema.Type.TypeCode" do
120
+ value :NONE, 0
121
+ value :DOUBLE, 1
122
+ value :FLOAT, 2
123
+ value :SINT32, 3
124
+ value :SINT64, 4
125
+ value :UINT32, 5
126
+ value :UINT64, 6
127
+ value :BOOL, 7
128
+ value :STRING, 8
129
+ value :BYTES, 9
130
+ value :CLASS, 100
131
+ value :ENUMERATION, 101
132
+ value :EVENT, 200
133
+ value :PROCEDURE_CALL, 201
134
+ value :STREAM, 202
135
+ value :STATUS, 203
136
+ value :SERVICES, 204
137
+ value :TUPLE, 300
138
+ value :LIST, 301
139
+ value :SET, 302
140
+ value :DICTIONARY, 303
141
+ end
142
+ add_message "krpc.schema.Tuple" do
143
+ repeated :items, :bytes, 1
144
+ end
145
+ add_message "krpc.schema.List" do
146
+ repeated :items, :bytes, 1
147
+ end
148
+ add_message "krpc.schema.Set" do
149
+ repeated :items, :bytes, 1
150
+ end
151
+ add_message "krpc.schema.Dictionary" do
152
+ repeated :entries, :message, 1, "krpc.schema.DictionaryEntry"
153
+ end
154
+ add_message "krpc.schema.DictionaryEntry" do
155
+ optional :key, :bytes, 1
156
+ optional :value, :bytes, 2
157
+ end
158
+ add_message "krpc.schema.Stream" do
159
+ optional :id, :uint64, 1
160
+ end
161
+ add_message "krpc.schema.Event" do
162
+ optional :stream, :message, 1, "krpc.schema.Stream"
163
+ end
164
+ add_message "krpc.schema.Status" do
165
+ optional :version, :string, 1
166
+ optional :bytes_read, :uint64, 2
167
+ optional :bytes_written, :uint64, 3
168
+ optional :bytes_read_rate, :float, 4
169
+ optional :bytes_written_rate, :float, 5
170
+ optional :rpcs_executed, :uint64, 6
171
+ optional :rpc_rate, :float, 7
172
+ optional :one_rpc_per_update, :bool, 8
173
+ optional :max_time_per_update, :uint32, 9
174
+ optional :adaptive_rate_control, :bool, 10
175
+ optional :blocking_recv, :bool, 11
176
+ optional :recv_timeout, :uint32, 12
177
+ optional :time_per_rpc_update, :float, 13
178
+ optional :poll_time_per_rpc_update, :float, 14
179
+ optional :exec_time_per_rpc_update, :float, 15
180
+ optional :stream_rpcs, :uint32, 16
181
+ optional :stream_rpcs_executed, :uint64, 17
182
+ optional :stream_rpc_rate, :float, 18
183
+ optional :time_per_stream_update, :float, 19
184
+ end
185
+ add_message "krpc.schema.MultiplexedRequest" do
186
+ optional :connection_request, :message, 1, "krpc.schema.ConnectionRequest"
187
+ optional :request, :message, 2, "krpc.schema.Request"
188
+ end
189
+ add_message "krpc.schema.MultiplexedResponse" do
190
+ optional :response, :message, 1, "krpc.schema.Response"
191
+ optional :stream_update, :message, 2, "krpc.schema.StreamUpdate"
192
+ end
172
193
  end
173
194
  end
174
195
 
175
196
  module KRPC
176
197
  module PB
177
- ConnectionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ConnectionRequest").msgclass
178
- ConnectionRequest::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ConnectionRequest.Type").enummodule
179
- ConnectionResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ConnectionResponse").msgclass
180
- ConnectionResponse::Status = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ConnectionResponse.Status").enummodule
181
- Request = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Request").msgclass
182
- ProcedureCall = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ProcedureCall").msgclass
183
- Argument = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Argument").msgclass
184
- Response = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Response").msgclass
185
- ProcedureResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ProcedureResult").msgclass
186
- Error = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Error").msgclass
187
- StreamUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.StreamUpdate").msgclass
188
- StreamResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.StreamResult").msgclass
189
- Services = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Services").msgclass
190
- Service = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Service").msgclass
191
- Procedure = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Procedure").msgclass
192
- Parameter = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Parameter").msgclass
193
- Class = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Class").msgclass
194
- Enumeration = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Enumeration").msgclass
195
- EnumerationValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.EnumerationValue").msgclass
196
- Exception = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Exception").msgclass
197
- Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Type").msgclass
198
- Type::TypeCode = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Type.TypeCode").enummodule
199
- Tuple = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Tuple").msgclass
200
- List = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.List").msgclass
201
- Set = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Set").msgclass
202
- Dictionary = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Dictionary").msgclass
203
- DictionaryEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.DictionaryEntry").msgclass
204
- Stream = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Stream").msgclass
205
- Event = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Event").msgclass
206
- Status = Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Status").msgclass
198
+ ConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ConnectionRequest").msgclass
199
+ ConnectionRequest::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ConnectionRequest.Type").enummodule
200
+ ConnectionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ConnectionResponse").msgclass
201
+ ConnectionResponse::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ConnectionResponse.Status").enummodule
202
+ Request = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Request").msgclass
203
+ ProcedureCall = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ProcedureCall").msgclass
204
+ Argument = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Argument").msgclass
205
+ Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Response").msgclass
206
+ ProcedureResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.ProcedureResult").msgclass
207
+ Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Error").msgclass
208
+ StreamUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.StreamUpdate").msgclass
209
+ StreamResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.StreamResult").msgclass
210
+ Services = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Services").msgclass
211
+ Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Service").msgclass
212
+ Procedure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Procedure").msgclass
213
+ Procedure::GameScene = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Procedure.GameScene").enummodule
214
+ Parameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Parameter").msgclass
215
+ Class = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Class").msgclass
216
+ Enumeration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Enumeration").msgclass
217
+ EnumerationValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.EnumerationValue").msgclass
218
+ Exception = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Exception").msgclass
219
+ Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Type").msgclass
220
+ Type::TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Type.TypeCode").enummodule
221
+ Tuple = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Tuple").msgclass
222
+ List = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.List").msgclass
223
+ Set = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Set").msgclass
224
+ Dictionary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Dictionary").msgclass
225
+ DictionaryEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.DictionaryEntry").msgclass
226
+ Stream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Stream").msgclass
227
+ Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Event").msgclass
228
+ Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.Status").msgclass
229
+ MultiplexedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.MultiplexedRequest").msgclass
230
+ MultiplexedResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("krpc.schema.MultiplexedResponse").msgclass
207
231
  end
208
232
  end
@@ -93,6 +93,13 @@ module KRPC
93
93
  params: [PB::Parameter.new(name: 'id', type: PB::Type.new(code: :UINT64))],
94
94
  xmldoc: "<doc>\n<summary>\nStart a previously added streaming request.\n</summary>\n</doc>",
95
95
  **opts
96
+ include_rpc_method 'KRPC', 'SetStreamRate',
97
+ params: [
98
+ PB::Parameter.new(name: 'id', type: PB::Type.new(code: :UINT64)),
99
+ PB::Parameter.new(name: 'rate', type: PB::Type.new(code: :FLOAT))
100
+ ],
101
+ xmldoc: "<doc>\n<summary>\nSet the update rate for a stream in Hz.\n</summary>\n</doc>",
102
+ **opts
96
103
  include_rpc_method 'KRPC', 'RemoveStream',
97
104
  params: [PB::Parameter.new(name: 'id', type: PB::Type.new(code: :UINT64))],
98
105
  xmldoc: "<doc>\n<summary>\nRemove a streaming request.\n</summary>\n</doc>",
@@ -80,7 +80,7 @@ module KRPC
80
80
  end
81
81
 
82
82
  class Stream
83
- attr_reader :id, :method, :args, :kwargs, :return_type, :manager
83
+ attr_reader :id, :method, :args, :kwargs, :return_type, :rate, :manager
84
84
  attr_writer :value
85
85
 
86
86
  def initialize(manager, id, return_type, value, method, *args, **kwargs)
@@ -89,6 +89,7 @@ module KRPC
89
89
  @return_type, @value = return_type, value
90
90
  @method, @args, @kwargs = method, args, kwargs
91
91
  @active = true
92
+ @rate = 0
92
93
  end
93
94
 
94
95
  # Get the current stream value. Has alias method `value`.
@@ -111,6 +112,11 @@ module KRPC
111
112
  # WARNING: This method does not remove the stream. To remove the stream call Stream#remove instead.
112
113
  def mark_as_inactive; @active = false end
113
114
 
115
+ def rate=(rate)
116
+ manager.client.core.set_stream_rate(id, rate)
117
+ @rate = rate
118
+ end
119
+
114
120
  def to_s
115
121
  inspect.gsub(/\n|\t/," ").squeeze(" ").uncolorize
116
122
  end
@@ -127,6 +133,7 @@ module KRPC
127
133
  "#<#{self.class}".green +
128
134
  " @id" + "=".green + id.to_s.bold.blue +
129
135
  " @active" + "=".green + @active.to_s.bold.light_cyan +
136
+ " @rate" + "=".green + rate.to_s.bold.blue +
130
137
  "\n\t@method" + "=".green + method.inspect.green +
131
138
  (args.empty? ? "" : "\n\t@args" + "=".green + coderay(args)) +
132
139
  (kwargs.empty? ? "" : "\n\t@kwargs" + "=".green + coderay(kwargs)) +
@@ -3,9 +3,10 @@ module KRPC
3
3
  # Dear krpc-rb developer: Before bumping version below, please ensure that protobuf schema is up to date.
4
4
  MAJOR = 0
5
5
  MINOR = 4
6
- PATCH = 0
6
+ PATCH = 1
7
7
  LABEL = nil
8
+ IS_STABLE = true
8
9
  end
9
10
 
10
- VERSION = ([Version::MAJOR, Version::MINOR, Version::PATCH, Version::LABEL].compact * '.').freeze
11
+ VERSION = ([Version::MAJOR, Version::MINOR, Version::PATCH, Version::LABEL, Version::IS_STABLE ? nil : "next"].compact * '.').freeze
11
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: krpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Więch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-24 00:00:00.000000000 Z
11
+ date: 2020-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.4'
19
+ version: '3.11'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.4'
26
+ version: '3.11'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: colorize
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,70 +44,70 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.8'
47
+ version: '1.10'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.8'
54
+ version: '1.10'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.15'
61
+ version: '2.1'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.15'
68
+ version: '2.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.11'
75
+ version: '0.13'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.11'
82
+ version: '0.13'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.6'
89
+ version: '3.9'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.6'
96
+ version: '3.9'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '12.1'
103
+ version: '13.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '12.1'
110
+ version: '13.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: hanna-nouveau
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -171,15 +171,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - ">="
173
173
  - !ruby/object:Gem::Version
174
- version: 2.1.0
174
+ version: 2.3.0
175
175
  required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.6.8
181
+ rubygems_version: 3.0.8
183
182
  signing_key:
184
183
  specification_version: 4
185
184
  summary: Client library for kRPC