diff options
Diffstat (limited to 'build-aux/qmi-codegen/Message.py')
-rw-r--r-- | build-aux/qmi-codegen/Message.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/build-aux/qmi-codegen/Message.py b/build-aux/qmi-codegen/Message.py index 9c78cf5..3460150 100644 --- a/build-aux/qmi-codegen/Message.py +++ b/build-aux/qmi-codegen/Message.py @@ -38,6 +38,7 @@ class Message: self.name = dictionary['name'] # The specific message ID self.id = dictionary['id'] + # The type, which must always be 'Message' or 'Indication' self.type = dictionary['type'] # The version info, optional @@ -45,6 +46,11 @@ class Message: self.static = True if 'scope' in dictionary and dictionary['scope'] == 'library-only' else False self.abort = True if 'abort' in dictionary and dictionary['abort'] == 'yes' else False + # libqmi version where the message was introduced + self.since = dictionary['since'] if 'since' in dictionary else None + if self.since is None: + raise ValueError('Message ' + self.name + ' requires a "since" tag specifying the major version where it was introduced') + # The vendor id if this command is vendor specific self.vendor = dictionary['vendor'] if 'vendor' in dictionary else None if self.type == 'Indication' and self.vendor is not None: @@ -69,7 +75,8 @@ class Message: 'Output', dictionary['output'] if 'output' in dictionary else None, common_objects_dictionary, - self.static) + self.static, + self.since) self.input = None if self.type == 'Message': @@ -81,7 +88,8 @@ class Message: 'Input', dictionary['input'] if 'input' in dictionary else None, common_objects_dictionary, - self.static) + self.static, + self.since) """ |