Lines Matching +full:c +full:- +full:family +full:- +full:name

1 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
26 family back reference to the full family
28 name name of the entity as listed in the spec (optional)
29 ident_name name which can be safely used as identifier in code (optional)
31 def __init__(self, family, yaml): argument
33 self.family = family
35 if 'name' in self.yaml:
36 self.name = self.yaml['name']
37 self.ident_name = self.name.replace('-', '_')
40 family.add_unresolved(self)
74 yaml = {'name': yaml}
75 super().__init__(enum_set.family, yaml)
108 entries entries by name
113 def __init__(self, family, yaml): argument
114 super().__init__(family, yaml)
119 value_start = self.yaml.get('value-start', 0)
124 self.entries[e.name] = e
155 struct_name string, name of struct definition
156 sub_type string, name of sub type
161 def __init__(self, family, attr_set, yaml, value): argument
162 super().__init__(family, yaml)
166 self.is_multi = yaml.get('multi-attr', False)
168 self.sub_type = yaml.get('sub-type')
169 self.byte_order = yaml.get('byte-order')
171 self.display_hint = yaml.get('display-hint')
180 via the dictionary interface Attribute Set exposes attributes by name.
183 attrs ordered dict of all attributes (indexed by name)
187 def __init__(self, family, yaml): argument
188 super().__init__(family, yaml)
190 self.subset_of = self.yaml.get('subset-of', None)
202 self.attrs[attr.name] = attr
206 real_set = family.attr_sets[self.subset_of]
208 attr = real_set[elem['name']]
209 self.attrs[attr.name] = attr
213 return SpecAttr(self.family, self, elem, value)
236 enum string, name of the enum definition
241 def __init__(self, family, yaml): argument
242 super().__init__(family, yaml)
244 self.byte_order = yaml.get('byte-order')
247 self.display_hint = yaml.get('display-hint')
253 Represents a C struct definition.
258 def __init__(self, family, yaml): argument
259 super().__init__(family, yaml)
263 self.members.append(self.new_member(family, member))
265 def new_member(self, family, elem): argument
266 return SpecStructMember(family, elem)
283 req_value numerical ID when serialized, user -> kernel
284 rsp_value numerical ID when serialized, user <- kernel
288 attr_set attribute set name
289 fixed_header string, optional name of fixed header struct
293 def __init__(self, family, yaml, req_value, rsp_value): argument
294 super().__init__(family, yaml)
303 self.fixed_header = self.yaml.get('fixed-header', family.fixed_header)
312 if 'attribute-set' in self.yaml:
313 attr_set_name = self.yaml['attribute-set']
315 msg = self.family.msgs[self.yaml['notify']]
316 attr_set_name = msg['attribute-set']
320 raise Exception(f"Can't resolve attribute set for op '{self.name}'")
322 self.attr_set = self.family.attr_sets[attr_set_name]
331 netlink-raw schema. Genetlink families use dynamic ID allocation
336 name name of the mulitcast group
337 value integer id of this multicast group for netlink-raw or None
340 def __init__(self, family, yaml): argument
341 super().__init__(family, yaml)
346 """ Netlink Family Spec class.
348 Netlink family information loaded from a spec (e.g. in YAML).
357 msg_id_model enum-model for operations (unified, directional etc.)
361 msgs dict of all messages (index by name)
365 fixed_header string, optional name of family default fixed header struct
366 mcast_groups dict of all multicast groups (index by name)
370 prefix = '# SPDX-License-Identifier: '
386 self.msg_id_model = self.yaml['operations'].get('enum-model', 'unified')
448 self.fixed_header = self.yaml['operations'].get('fixed-header')
457 self.msgs[op.name] = op
460 self.fixed_header = self.yaml['operations'].get('fixed-header')
492 skip |= bool(exclude.match(elem['name']))
499 self.msgs[op.name] = op
501 def find_operation(self, name): argument
503 For a given operation name, find and return operation spec.
506 if name == op['name']:
516 self.consts[elem['name']] = self.new_enum(elem)
518 self.consts[elem['name']] = self.new_struct(elem)
520 self.consts[elem['name']] = elem
522 for elem in self.yaml['attribute-sets']:
524 self.attr_sets[elem['name']] = attr_set
536 if not op.is_async and 'attribute-set' in op:
537 self.ops[op.name] = op
539 self.ntfs[op.name] = op
541 mcgs = self.yaml.get('mcast-groups')
545 self.mcast_groups[elem['name']] = mcg