nl-linux 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +5 -0
  3. data/CHANGELOG.md +6 -0
  4. data/Rakefile +14 -2
  5. data/generated/nl/linux/binder.rb +172 -44
  6. data/generated/nl/linux/conntrack.rb +1293 -370
  7. data/generated/nl/linux/dev_energymodel.rb +278 -93
  8. data/generated/nl/linux/devlink.rb +5654 -1954
  9. data/generated/nl/linux/dpll.rb +1838 -669
  10. data/generated/nl/linux/drm_ras.rb +234 -72
  11. data/generated/nl/linux/ethtool.rb +6683 -2885
  12. data/generated/nl/linux/fou.rb +308 -129
  13. data/generated/nl/linux/handshake.rb +277 -99
  14. data/generated/nl/linux/lockd.rb +88 -33
  15. data/generated/nl/linux/mptcp_pm.rb +639 -186
  16. data/generated/nl/linux/net_shaper.rb +782 -224
  17. data/generated/nl/linux/netdev.rb +2105 -631
  18. data/generated/nl/linux/nfsd.rb +1030 -358
  19. data/generated/nl/linux/nftables.rb +5041 -1612
  20. data/generated/nl/linux/nl80211.rb +4531 -871
  21. data/generated/nl/linux/nlctrl.rb +411 -119
  22. data/generated/nl/linux/ovpn.rb +1211 -293
  23. data/generated/nl/linux/ovs_datapath.rb +271 -106
  24. data/generated/nl/linux/ovs_flow.rb +1819 -354
  25. data/generated/nl/linux/ovs_packet.rb +257 -82
  26. data/generated/nl/linux/ovs_vport.rb +334 -132
  27. data/generated/nl/linux/psp.rb +916 -281
  28. data/generated/nl/linux/rt_addr.rb +369 -166
  29. data/generated/nl/linux/rt_link.rb +6708 -1450
  30. data/generated/nl/linux/rt_neigh.rb +919 -364
  31. data/generated/nl/linux/rt_route.rb +1034 -448
  32. data/generated/nl/linux/rt_rule.rb +775 -395
  33. data/generated/nl/linux/sunrpc_cache.rb +297 -102
  34. data/generated/nl/linux/tc.rb +9989 -1780
  35. data/generated/nl/linux/tcp_metrics.rb +327 -105
  36. data/generated/nl/linux/team.rb +279 -93
  37. data/generated/nl/linux/wireguard.rb +432 -95
  38. data/generated/nl/linux.rb +1 -0
  39. data/lib/nl/linux/nlctrl_resolver.rb +31 -0
  40. data/lib/nl/linux/version.rb +1 -1
  41. data/sig/generated/nl/linux/binder.rbs +366 -0
  42. data/sig/generated/nl/linux/conntrack.rbs +2787 -0
  43. data/sig/generated/nl/linux/dev_energymodel.rbs +636 -0
  44. data/sig/generated/nl/linux/devlink.rbs +12496 -0
  45. data/sig/generated/nl/linux/dpll.rbs +3461 -0
  46. data/sig/generated/nl/linux/drm_ras.rbs +553 -0
  47. data/sig/generated/nl/linux/ethtool.rbs +15291 -0
  48. data/sig/generated/nl/linux/fou.rbs +702 -0
  49. data/sig/generated/nl/linux/handshake.rbs +622 -0
  50. data/sig/generated/nl/linux/lockd.rbs +234 -0
  51. data/sig/generated/nl/linux/mptcp_pm.rbs +1511 -0
  52. data/sig/generated/nl/linux/net_shaper.rbs +1645 -0
  53. data/sig/generated/nl/linux/netdev.rbs +4187 -0
  54. data/sig/generated/nl/linux/nfsd.rbs +2520 -0
  55. data/sig/generated/nl/linux/nftables.rbs +10304 -0
  56. data/sig/generated/nl/linux/nl80211.rbs +9786 -0
  57. data/sig/generated/nl/linux/nlctrl.rbs +944 -0
  58. data/sig/generated/nl/linux/nlctrl_resolver.rbs +20 -0
  59. data/sig/generated/nl/linux/ovpn.rbs +2564 -0
  60. data/sig/generated/nl/linux/ovs_datapath.rbs +640 -0
  61. data/sig/generated/nl/linux/ovs_flow.rbs +3659 -0
  62. data/sig/generated/nl/linux/ovs_packet.rbs +540 -0
  63. data/sig/generated/nl/linux/ovs_vport.rbs +777 -0
  64. data/sig/generated/nl/linux/psp.rbs +1846 -0
  65. data/sig/generated/nl/linux/rt_addr.rbs +866 -0
  66. data/sig/generated/nl/linux/rt_link.rbs +13438 -0
  67. data/sig/generated/nl/linux/rt_neigh.rbs +2124 -0
  68. data/sig/generated/nl/linux/rt_route.rbs +2218 -0
  69. data/sig/generated/nl/linux/rt_rule.rbs +1726 -0
  70. data/sig/generated/nl/linux/sunrpc_cache.rbs +739 -0
  71. data/sig/generated/nl/linux/tc.rbs +19931 -0
  72. data/sig/generated/nl/linux/tcp_metrics.rbs +740 -0
  73. data/sig/generated/nl/linux/team.rbs +733 -0
  74. data/sig/generated/nl/linux/version.rbs +7 -0
  75. data/sig/generated/nl/linux/wireguard.rbs +1006 -0
  76. data/sig/generated/nl/linux.rbs +6 -0
  77. data/sig/generated/nl-linux.rbs +2 -0
  78. metadata +46 -7
@@ -8,334 +8,519 @@
8
8
  #
9
9
  #--
10
10
  # frozen_string_literal: true
11
- # rbs_inline: enabled
12
11
  # This code is generated by Ynl::Generator. DO NOT EDIT.
13
12
  require 'nl'
14
13
  module Nl; module Linux
15
14
  # Energy model netlink interface to notify its changes.
16
- class DevEnergymodel < ::Nl::Family
15
+ class DevEnergymodel < ::Nl::Genl::Family
17
16
  NAME = "dev-energymodel"
18
- PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("dev-energymodel"))
17
+ VERSION = 1
18
+ # @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
19
+ # @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
20
+ # @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
21
+ # @param [#call] resolver
22
+ # @param [Symbol, nil] executor
23
+ # @param [Integer, nil] notification_capacity
24
+ # @return [DevEnergymodel]
25
+ # @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
26
+ # @param [#call] resolver
27
+ # @param [Symbol, nil] executor
28
+ # @param [Integer, nil] notification_capacity
29
+ # @yieldparam [DevEnergymodel] family
30
+ # @return [Object] the result of the block
31
+ def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
32
+ super
33
+ end
34
+ # @private
19
35
  MCAST_GROUPS = Ractor.make_shareable({:"event" => ::Nl::McastGroup.new("event", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
36
+ module Flags
37
+ module PerfStateFlags
38
+ # The performance state is inefficient. There is in this perf-domain, another performance state with a higher frequency but a lower or equal power cost.
39
+ PerfStateInefficient = 1
40
+ end
41
+ module PerfDomainFlags
42
+ # The power values are in micro-Watts or some other scale.
43
+ PerfDomainMicrowatts = 1
44
+ # Skip inefficient states when estimating energy consumption.
45
+ PerfDomainSkipInefficiencies = 2
46
+ # The power values are artificial and might be created by platform missing real power information.
47
+ PerfDomainArtificial = 4
48
+ end
49
+ end
20
50
  module Structs
21
51
  end
22
52
  module AttributeSets
23
53
  # Information on a single performance domains.
24
- class PerfDomain < ::Nl::Protocols::Genl::AttributeSet
54
+ class PerfDomain < ::Nl::AttributeSet
25
55
  # Abstract class
26
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
56
+ class Attribute < ::Nl::AttributeSet::Attribute
27
57
  end
28
58
  class Pad < Attribute
29
59
  TYPE = 1
30
60
  NAME = :"pad"
31
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Pad.new()
61
+ # @private
62
+ ORDER = 0
63
+ # @private
64
+ DATATYPE = ::Nl::DataTypes::Pad.new()
32
65
  end
66
+ # A unique ID number for each performance domain.
33
67
  class PerfDomainId < Attribute
34
68
  TYPE = 2
35
69
  NAME = :"perf_domain_id"
36
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
70
+ # @private
71
+ ORDER = 1
72
+ # @private
73
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
37
74
  end
75
+ # Bitmask of performance domain flags.
76
+ #
77
+ # Known flags are defined in {Flags::PerfDomainFlags}.
38
78
  class Flags < Attribute
39
79
  TYPE = 3
40
80
  NAME = :"flags"
41
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
81
+ # @private
82
+ ORDER = 2
83
+ # @private
84
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
42
85
  end
86
+ # CPUs that belong to this performance domain.
43
87
  class Cpus < Attribute
44
88
  TYPE = 4
45
89
  NAME = :"cpus"
46
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
90
+ # @private
91
+ MULTI = true
92
+ # @private
93
+ ORDER = 3
94
+ # @private
95
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
47
96
  end
48
- # :nodoc:
97
+ # @private
49
98
  BY_NAME = Ractor.make_shareable({:"pad" => Pad, :"perf_domain_id" => PerfDomainId, :"flags" => Flags, :"cpus" => Cpus}) #: Hash[::Symbol, Attribute]
50
- # :nodoc:
99
+ # @private
51
100
  BY_TYPE = Ractor.make_shareable({1 => Pad, 2 => PerfDomainId, 3 => Flags, 4 => Cpus}) #: Hash[::Integer, Attribute]
101
+ # A unique ID number for each performance domain.
102
+ # @rbs return: ::Integer
103
+ # @return [Integer]
104
+ # @see PerfDomainId
105
+ def perf_domain_id; self[:"perf_domain_id"]&.value; end
106
+ # Bitmask of performance domain flags.
107
+ #
108
+ # Known flags are defined in {Flags::PerfDomainFlags}.
109
+ # @rbs return: ::Integer
110
+ # @return [Integer]
111
+ # @see Flags
112
+ def flags; self[:"flags"]&.value; end
113
+ # CPUs that belong to this performance domain.
114
+ # @rbs return: ::Array[::Integer]
115
+ # @return [Array<Integer>]
116
+ # @see Cpus
117
+ def cpus; self[:"cpus"].map(&:value); end
52
118
  class << self
53
119
  # Looks up Attribute class by name.
54
- #--
55
120
  # @rbs name: Symbol
56
121
  # @rbs return: Attribute
122
+ # @param [Symbol] name
123
+ # @return [Attribute]
57
124
  def by_name(name); BY_NAME.fetch(name); end
58
125
  # Looks up Attribute class by type value.
59
- #--
60
126
  # @rbs type: Integer
61
127
  # @rbs return: Attribute
128
+ # @param [Integer] type
129
+ # @return [Attribute]
62
130
  def by_type(type); BY_TYPE.fetch(type); end
63
131
  end
64
132
  end
65
133
  # Performance states table.
66
- class PerfTable < ::Nl::Protocols::Genl::AttributeSet
134
+ class PerfTable < ::Nl::AttributeSet
67
135
  # Abstract class
68
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
136
+ class Attribute < ::Nl::AttributeSet::Attribute
69
137
  end
138
+ # A unique ID number for each performance domain.
70
139
  class PerfDomainId < Attribute
71
140
  TYPE = 1
72
141
  NAME = :"perf_domain_id"
73
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
142
+ # @private
143
+ ORDER = 0
144
+ # @private
145
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
74
146
  end
75
147
  class PerfState < Attribute
76
148
  TYPE = 2
77
149
  NAME = :"perf_state"
150
+ # @private
151
+ MULTI = true
152
+ # @private
153
+ ORDER = 1
78
154
  end
79
- # :nodoc:
155
+ # @private
80
156
  BY_NAME = Ractor.make_shareable({:"perf_domain_id" => PerfDomainId, :"perf_state" => PerfState}) #: Hash[::Symbol, Attribute]
81
- # :nodoc:
157
+ # @private
82
158
  BY_TYPE = Ractor.make_shareable({1 => PerfDomainId, 2 => PerfState}) #: Hash[::Integer, Attribute]
159
+ # A unique ID number for each performance domain.
160
+ # @rbs return: ::Integer
161
+ # @return [Integer]
162
+ # @see PerfDomainId
163
+ def perf_domain_id; self[:"perf_domain_id"]&.value; end
164
+ # @rbs return: ::Array[AttributeSets::PerfState]
165
+ # @return [Array<AttributeSets::PerfState>]
166
+ # @see PerfState
167
+ def perf_state; self[:"perf_state"].map(&:value); end
83
168
  class << self
84
169
  # Looks up Attribute class by name.
85
- #--
86
170
  # @rbs name: Symbol
87
171
  # @rbs return: Attribute
172
+ # @param [Symbol] name
173
+ # @return [Attribute]
88
174
  def by_name(name); BY_NAME.fetch(name); end
89
175
  # Looks up Attribute class by type value.
90
- #--
91
176
  # @rbs type: Integer
92
177
  # @rbs return: Attribute
178
+ # @param [Integer] type
179
+ # @return [Attribute]
93
180
  def by_type(type); BY_TYPE.fetch(type); end
94
181
  end
95
182
  end
96
183
  # Performance state of a performance domain.
97
- class PerfState < ::Nl::Protocols::Genl::AttributeSet
184
+ class PerfState < ::Nl::AttributeSet
98
185
  # Abstract class
99
- class Attribute < ::Nl::Protocols::Genl::AttributeSet::Attribute
186
+ class Attribute < ::Nl::AttributeSet::Attribute
100
187
  end
101
188
  class Pad < Attribute
102
189
  TYPE = 1
103
190
  NAME = :"pad"
104
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Pad.new()
191
+ # @private
192
+ ORDER = 0
193
+ # @private
194
+ DATATYPE = ::Nl::DataTypes::Pad.new()
105
195
  end
196
+ # CPU performance (capacity) at a given frequency.
106
197
  class Performance < Attribute
107
198
  TYPE = 2
108
199
  NAME = :"performance"
109
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
200
+ # @private
201
+ ORDER = 1
202
+ # @private
203
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
110
204
  end
205
+ # The frequency in KHz, for consistency with CPUFreq.
111
206
  class Frequency < Attribute
112
207
  TYPE = 3
113
208
  NAME = :"frequency"
114
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
209
+ # @private
210
+ ORDER = 2
211
+ # @private
212
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
115
213
  end
214
+ # The power consumed at this level (by 1 CPU or by a registered device). It can be a total power: static and dynamic.
116
215
  class Power < Attribute
117
216
  TYPE = 4
118
217
  NAME = :"power"
119
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
218
+ # @private
219
+ ORDER = 3
220
+ # @private
221
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
120
222
  end
223
+ # The cost coefficient associated with this level, used during energy calculation. Equal to: power * max_frequency / frequency.
121
224
  class Cost < Attribute
122
225
  TYPE = 5
123
226
  NAME = :"cost"
124
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
227
+ # @private
228
+ ORDER = 4
229
+ # @private
230
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
125
231
  end
232
+ # Bitmask of performance state flags.
233
+ #
234
+ # Known flags are defined in {Flags::PerfStateFlags}.
126
235
  class Flags < Attribute
127
236
  TYPE = 6
128
237
  NAME = :"flags"
129
- DATATYPE = ::Nl::Protocols::Genl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
238
+ # @private
239
+ ORDER = 5
240
+ # @private
241
+ DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
130
242
  end
131
- # :nodoc:
243
+ # @private
132
244
  BY_NAME = Ractor.make_shareable({:"pad" => Pad, :"performance" => Performance, :"frequency" => Frequency, :"power" => Power, :"cost" => Cost, :"flags" => Flags}) #: Hash[::Symbol, Attribute]
133
- # :nodoc:
245
+ # @private
134
246
  BY_TYPE = Ractor.make_shareable({1 => Pad, 2 => Performance, 3 => Frequency, 4 => Power, 5 => Cost, 6 => Flags}) #: Hash[::Integer, Attribute]
247
+ # CPU performance (capacity) at a given frequency.
248
+ # @rbs return: ::Integer
249
+ # @return [Integer]
250
+ # @see Performance
251
+ def performance; self[:"performance"]&.value; end
252
+ # The frequency in KHz, for consistency with CPUFreq.
253
+ # @rbs return: ::Integer
254
+ # @return [Integer]
255
+ # @see Frequency
256
+ def frequency; self[:"frequency"]&.value; end
257
+ # The power consumed at this level (by 1 CPU or by a registered device). It can be a total power: static and dynamic.
258
+ # @rbs return: ::Integer
259
+ # @return [Integer]
260
+ # @see Power
261
+ def power; self[:"power"]&.value; end
262
+ # The cost coefficient associated with this level, used during energy calculation. Equal to: power * max_frequency / frequency.
263
+ # @rbs return: ::Integer
264
+ # @return [Integer]
265
+ # @see Cost
266
+ def cost; self[:"cost"]&.value; end
267
+ # Bitmask of performance state flags.
268
+ #
269
+ # Known flags are defined in {Flags::PerfStateFlags}.
270
+ # @rbs return: ::Integer
271
+ # @return [Integer]
272
+ # @see Flags
273
+ def flags; self[:"flags"]&.value; end
135
274
  class << self
136
275
  # Looks up Attribute class by name.
137
- #--
138
276
  # @rbs name: Symbol
139
277
  # @rbs return: Attribute
278
+ # @param [Symbol] name
279
+ # @return [Attribute]
140
280
  def by_name(name); BY_NAME.fetch(name); end
141
281
  # Looks up Attribute class by type value.
142
- #--
143
282
  # @rbs type: Integer
144
283
  # @rbs return: Attribute
284
+ # @param [Integer] type
285
+ # @return [Attribute]
145
286
  def by_type(type); BY_TYPE.fetch(type); end
146
287
  end
147
288
  end
148
- PerfTable::PerfState::DATATYPE = ::Nl::Protocols::Genl::DataTypes::NestedAttributes.new(PerfState)
289
+ # @private
290
+ PerfTable::PerfState::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::PerfState, selector_bindings: Ractor.make_shareable([]))
149
291
  end
150
292
  module Messages
151
293
  # Get the list of information for all performance domains.
152
- class DoGetPerfDomainsRequest < ::Nl::Protocols::Genl::Message
294
+ class DoGetPerfDomainsRequest < ::Nl::Genl::Message
153
295
  TYPE = 1
154
296
  FIXED_HEADER = nil
155
297
  ATTRIBUTE_SET = AttributeSets::PerfDomain
156
298
  ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id])
157
- # Gets the value of `perf-domain-id` attribute in the message.
158
- #--
299
+ # A unique ID number for each performance domain.
159
300
  # @rbs return: ::Integer
301
+ # @return [Integer]
302
+ # @see AttributeSets::PerfDomain::PerfDomainId
160
303
  def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
161
304
  end
162
305
  # Get the list of information for all performance domains.
163
- class DoGetPerfDomainsReply < ::Nl::Protocols::Genl::Message
306
+ class DoGetPerfDomainsReply < ::Nl::Genl::Message
164
307
  TYPE = 1
165
308
  FIXED_HEADER = nil
166
309
  ATTRIBUTE_SET = AttributeSets::PerfDomain
167
310
  ATTRIBUTES = Ractor.make_shareable(%i[pad perf_domain_id flags cpus])
168
- # Gets the value of `perf-domain-id` attribute in the message.
169
- #--
311
+ # A unique ID number for each performance domain.
170
312
  # @rbs return: ::Integer
313
+ # @return [Integer]
314
+ # @see AttributeSets::PerfDomain::PerfDomainId
171
315
  def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
172
- # Gets the value of `flags` attribute in the message.
173
- #--
316
+ # Bitmask of performance domain flags.
317
+ #
318
+ # Known flags are defined in {Flags::PerfDomainFlags}.
174
319
  # @rbs return: ::Integer
320
+ # @return [Integer]
321
+ # @see AttributeSets::PerfDomain::Flags
175
322
  def flags; attributes[:"flags"]&.value; end
176
- # Gets the value of `cpus` attribute in the message.
177
- #--
178
- # @rbs return: ::Integer
179
- def cpus; attributes[:"cpus"]&.value; end
323
+ # CPUs that belong to this performance domain.
324
+ # @rbs return: ::Array[::Integer]
325
+ # @return [Array<Integer>]
326
+ # @see AttributeSets::PerfDomain::Cpus
327
+ def cpus; attributes[:"cpus"].map(&:value); end
180
328
  end
181
329
  # Get the list of information for all performance domains.
182
- class DumpGetPerfDomainsRequest < ::Nl::Protocols::Genl::Message
330
+ class DumpGetPerfDomainsRequest < ::Nl::Genl::Message
183
331
  TYPE = 1
184
332
  FIXED_HEADER = nil
185
333
  ATTRIBUTE_SET = AttributeSets::PerfDomain
186
334
  ATTRIBUTES = Ractor.make_shareable(%i[])
187
335
  end
188
336
  # Get the list of information for all performance domains.
189
- class DumpGetPerfDomainsReply < ::Nl::Protocols::Genl::Message
337
+ class DumpGetPerfDomainsReply < ::Nl::Genl::Message
190
338
  TYPE = 1
191
339
  FIXED_HEADER = nil
192
340
  ATTRIBUTE_SET = AttributeSets::PerfDomain
193
341
  ATTRIBUTES = Ractor.make_shareable(%i[pad perf_domain_id flags cpus])
194
- # Gets the value of `perf-domain-id` attribute in the message.
195
- #--
342
+ # A unique ID number for each performance domain.
196
343
  # @rbs return: ::Integer
344
+ # @return [Integer]
345
+ # @see AttributeSets::PerfDomain::PerfDomainId
197
346
  def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
198
- # Gets the value of `flags` attribute in the message.
199
- #--
347
+ # Bitmask of performance domain flags.
348
+ #
349
+ # Known flags are defined in {Flags::PerfDomainFlags}.
200
350
  # @rbs return: ::Integer
351
+ # @return [Integer]
352
+ # @see AttributeSets::PerfDomain::Flags
201
353
  def flags; attributes[:"flags"]&.value; end
202
- # Gets the value of `cpus` attribute in the message.
203
- #--
204
- # @rbs return: ::Integer
205
- def cpus; attributes[:"cpus"]&.value; end
354
+ # CPUs that belong to this performance domain.
355
+ # @rbs return: ::Array[::Integer]
356
+ # @return [Array<Integer>]
357
+ # @see AttributeSets::PerfDomain::Cpus
358
+ def cpus; attributes[:"cpus"].map(&:value); end
206
359
  end
207
360
  # Get the energy model table of a performance domain.
208
- class DoGetPerfTableRequest < ::Nl::Protocols::Genl::Message
361
+ class DoGetPerfTableRequest < ::Nl::Genl::Message
209
362
  TYPE = 2
210
363
  FIXED_HEADER = nil
211
364
  ATTRIBUTE_SET = AttributeSets::PerfTable
212
365
  ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id])
213
- # Gets the value of `perf-domain-id` attribute in the message.
214
- #--
366
+ # A unique ID number for each performance domain.
215
367
  # @rbs return: ::Integer
368
+ # @return [Integer]
369
+ # @see AttributeSets::PerfTable::PerfDomainId
216
370
  def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
217
371
  end
218
372
  # Get the energy model table of a performance domain.
219
- class DoGetPerfTableReply < ::Nl::Protocols::Genl::Message
373
+ class DoGetPerfTableReply < ::Nl::Genl::Message
220
374
  TYPE = 2
221
375
  FIXED_HEADER = nil
222
376
  ATTRIBUTE_SET = AttributeSets::PerfTable
223
377
  ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id perf_state])
224
- # Gets the value of `perf-domain-id` attribute in the message.
225
- #--
378
+ # A unique ID number for each performance domain.
226
379
  # @rbs return: ::Integer
380
+ # @return [Integer]
381
+ # @see AttributeSets::PerfTable::PerfDomainId
227
382
  def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
228
- # Gets the value of `perf-state` attribute in the message.
229
- #--
230
- # @rbs return: AttributeSets::PerfState
231
- def perf_state; attributes[:"perf_state"]&.value; end
383
+ # @rbs return: ::Array[AttributeSets::PerfState]
384
+ # @return [Array<AttributeSets::PerfState>]
385
+ # @see AttributeSets::PerfTable::PerfState
386
+ def perf_state; attributes[:"perf_state"].map(&:value); end
232
387
  end
233
388
  end
234
389
  module Notifications
235
390
  # A performance domain is created.
236
391
  #
237
392
  # Multicast group: `event`.
238
- class PerfDomainCreated < ::Nl::Protocols::Genl::Message
393
+ class PerfDomainCreated < ::Nl::Genl::Message
239
394
  TYPE = 3
240
395
  FIXED_HEADER = nil
241
396
  ATTRIBUTE_SET = AttributeSets::PerfTable
242
397
  ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id perf_state])
243
- # Gets the value of `perf-domain-id` attribute in the message.
244
- #--
398
+ # A unique ID number for each performance domain.
245
399
  # @rbs return: ::Integer
400
+ # @return [Integer]
401
+ # @see AttributeSets::PerfTable::PerfDomainId
246
402
  def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
247
- # Gets the value of `perf-state` attribute in the message.
248
- #--
249
- # @rbs return: AttributeSets::PerfState
250
- def perf_state; attributes[:"perf_state"]&.value; end
403
+ # @rbs return: ::Array[AttributeSets::PerfState]
404
+ # @return [Array<AttributeSets::PerfState>]
405
+ # @see AttributeSets::PerfTable::PerfState
406
+ def perf_state; attributes[:"perf_state"].map(&:value); end
251
407
  end
252
408
  # A performance domain is updated.
253
409
  #
254
410
  # Multicast group: `event`.
255
- class PerfDomainUpdated < ::Nl::Protocols::Genl::Message
411
+ class PerfDomainUpdated < ::Nl::Genl::Message
256
412
  TYPE = 4
257
413
  FIXED_HEADER = nil
258
414
  ATTRIBUTE_SET = AttributeSets::PerfTable
259
415
  ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id perf_state])
260
- # Gets the value of `perf-domain-id` attribute in the message.
261
- #--
416
+ # A unique ID number for each performance domain.
262
417
  # @rbs return: ::Integer
418
+ # @return [Integer]
419
+ # @see AttributeSets::PerfTable::PerfDomainId
263
420
  def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
264
- # Gets the value of `perf-state` attribute in the message.
265
- #--
266
- # @rbs return: AttributeSets::PerfState
267
- def perf_state; attributes[:"perf_state"]&.value; end
421
+ # @rbs return: ::Array[AttributeSets::PerfState]
422
+ # @return [Array<AttributeSets::PerfState>]
423
+ # @see AttributeSets::PerfTable::PerfState
424
+ def perf_state; attributes[:"perf_state"].map(&:value); end
268
425
  end
269
426
  # A performance domain is deleted.
270
427
  #
271
428
  # Multicast group: `event`.
272
- class PerfDomainDeleted < ::Nl::Protocols::Genl::Message
429
+ class PerfDomainDeleted < ::Nl::Genl::Message
273
430
  TYPE = 5
274
431
  FIXED_HEADER = nil
275
432
  ATTRIBUTE_SET = AttributeSets::PerfTable
276
433
  ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id])
277
- # Gets the value of `perf-domain-id` attribute in the message.
278
- #--
434
+ # A unique ID number for each performance domain.
279
435
  # @rbs return: ::Integer
436
+ # @return [Integer]
437
+ # @see AttributeSets::PerfTable::PerfDomainId
280
438
  def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
281
439
  end
282
440
  end
441
+ # @private
283
442
  NOTIFICATIONS = Ractor.make_shareable({3 => Notifications::PerfDomainCreated, 4 => Notifications::PerfDomainUpdated, 5 => Notifications::PerfDomainDeleted}) #: Hash[::Integer, ::Class]
284
443
  # Get the list of information for all performance domains.
285
- #--
286
444
  # @rbs (?perf_domain_id: ::Integer) -> Messages::DoGetPerfDomainsReply
445
+ # @param [Hash] args
446
+ # @option args [Integer] perf_domain_id A unique ID number for each performance domain.
447
+ # @return [Messages::DoGetPerfDomainsReply]
448
+ # @see Messages::DoGetPerfDomainsRequest
287
449
  def do_get_perf_domains(**args)
288
450
  exchange_message(:"do", Messages::DoGetPerfDomainsRequest, Messages::DoGetPerfDomainsReply, args)
289
451
  end
290
452
  # Get the list of information for all performance domains.
291
- #--
292
- # @rbs () -> Enumerable[Messages::DumpGetPerfDomainsReply]
453
+ # @rbs () -> Array[Messages::DumpGetPerfDomainsReply]
293
454
  # | () { (Messages::DumpGetPerfDomainsReply) -> void } -> void
455
+ # @overload dump_get_perf_domains(**args)
456
+ # Returns an array when no block is given.
457
+ # @param [Hash] args
458
+ # @return [Array<Messages::DumpGetPerfDomainsReply>]
459
+ # @overload dump_get_perf_domains(**args, &block)
460
+ # Yields each reply when a block is given.
461
+ # @param [Hash] args
462
+ # @yieldparam [Messages::DumpGetPerfDomainsReply] reply
463
+ # @return [void]
464
+ # @see Messages::DumpGetPerfDomainsRequest
294
465
  def dump_get_perf_domains(**args, &block)
295
466
  exchange_message(:"dump", Messages::DumpGetPerfDomainsRequest, Messages::DumpGetPerfDomainsReply, args, &block)
296
467
  end
297
468
  # Get the energy model table of a performance domain.
298
- #--
299
469
  # @rbs (?perf_domain_id: ::Integer) -> Messages::DoGetPerfTableReply
470
+ # @param [Hash] args
471
+ # @option args [Integer] perf_domain_id A unique ID number for each performance domain.
472
+ # @return [Messages::DoGetPerfTableReply]
473
+ # @see Messages::DoGetPerfTableRequest
300
474
  def do_get_perf_table(**args)
301
475
  exchange_message(:"do", Messages::DoGetPerfTableRequest, Messages::DoGetPerfTableReply, args)
302
476
  end
303
477
  class AsyncOperations
304
- # :nodoc:
478
+ # @private
305
479
  def initialize(&exchange)
306
480
  @exchange = exchange
307
481
  end
308
482
  # Get the list of information for all performance domains.
309
- #--
310
483
  # @rbs (?perf_domain_id: ::Integer) -> ::Nl::Async::Future[Messages::DoGetPerfDomainsReply]
484
+ # @param [Hash] args
485
+ # @option args [Integer] perf_domain_id A unique ID number for each performance domain.
486
+ # @return [Nl::Async::Future<Messages::DoGetPerfDomainsReply>]
487
+ # @see Messages::DoGetPerfDomainsRequest
311
488
  def do_get_perf_domains(**args)
312
489
  @exchange.call(:"do", Messages::DoGetPerfDomainsRequest, Messages::DoGetPerfDomainsReply, args)
313
490
  end
314
491
  # Get the list of information for all performance domains.
315
- #--
316
492
  # @rbs () -> ::Nl::Async::Stream[Messages::DumpGetPerfDomainsReply]
493
+ # @param [Hash] args
494
+ # @return [Nl::Async::Stream<Messages::DumpGetPerfDomainsReply>]
495
+ # @see Messages::DumpGetPerfDomainsRequest
317
496
  def dump_get_perf_domains(**args)
318
497
  @exchange.call(:"dump", Messages::DumpGetPerfDomainsRequest, Messages::DumpGetPerfDomainsReply, args)
319
498
  end
320
499
  # Get the energy model table of a performance domain.
321
- #--
322
500
  # @rbs (?perf_domain_id: ::Integer) -> ::Nl::Async::Future[Messages::DoGetPerfTableReply]
501
+ # @param [Hash] args
502
+ # @option args [Integer] perf_domain_id A unique ID number for each performance domain.
503
+ # @return [Nl::Async::Future<Messages::DoGetPerfTableReply>]
504
+ # @see Messages::DoGetPerfTableRequest
323
505
  def do_get_perf_table(**args)
324
506
  @exchange.call(:"do", Messages::DoGetPerfTableRequest, Messages::DoGetPerfTableReply, args)
325
507
  end
326
508
  end
327
509
  # Returns the asynchronous operation facade for this family.
328
- #--
329
510
  # @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
511
+ # @param [::Integer, nil] stream_capacity
512
+ # @return [AsyncOperations]
330
513
  def async(stream_capacity: nil)
331
514
  return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
332
515
  build_async_facade(AsyncOperations, stream_capacity:)
333
516
  end
334
- #--
335
517
  # @rbs (*(:event) groups) -> self
518
+ # @param [Array<:event>] groups
519
+ # @return [self]
336
520
  def subscribe(*groups) = super
337
- #--
338
521
  # @rbs (*(:event) groups) -> self
522
+ # @param [Array<:event>] groups
523
+ # @return [self]
339
524
  def unsubscribe(*groups) = super
340
525
  end
341
526
  end; end