extension

  1# This file was automatically generated by SWIG (https://www.swig.org).
  2# Version 4.2.1
  3#
  4# Do not make changes to this file unless you know what you are doing - modify
  5# the SWIG interface file instead.
  6
  7from sys import version_info as _swig_python_version_info
  8from mock_rtems import _extension as _extension
  9
 10try:
 11    import builtins as __builtin__
 12except ImportError:
 13    import __builtin__
 14
 15def _swig_repr(self):
 16    try:
 17        strthis = "proxy of " + self.this.__repr__()
 18    except __builtin__.Exception:
 19        strthis = ""
 20    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
 21
 22
 23def _swig_setattr_nondynamic_instance_variable(set):
 24    def set_instance_attr(self, name, value):
 25        if name == "this":
 26            set(self, name, value)
 27        elif name == "thisown":
 28            self.this.own(value)
 29        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
 30            set(self, name, value)
 31        else:
 32            raise AttributeError("You cannot add instance attributes to %s" % self)
 33    return set_instance_attr
 34
 35
 36def _swig_setattr_nondynamic_class_variable(set):
 37    def set_class_attr(cls, name, value):
 38        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
 39            set(cls, name, value)
 40        else:
 41            raise AttributeError("You cannot add class attributes to %s" % cls)
 42    return set_class_attr
 43
 44
 45def _swig_add_metaclass(metaclass):
 46    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
 47    def wrapper(cls):
 48        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
 49    return wrapper
 50
 51
 52class _SwigNonDynamicMeta(type):
 53    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
 54    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
 55
 56
 57
 58def rtems_extension_delete(id):
 59    r"""
 60    Deletes the extension set.
 61
 62    :type id: rtems_id
 63    :param id: is the extension set identifier.
 64
 65    This directive deletes the extension set specified by ``id``.
 66
 67    Title: Notes
 68    The ESCB for the deleted extension set is reclaimed by RTEMS.
 69
 70    Title: Constraints
 71
 72    The following constraints apply to this directive:
 73
 74    * The directive may be called from within device driver initialization
 75      context.
 76
 77    * The directive may be called from within task context.
 78
 79    * The directive may obtain and release the object allocator mutex.  This may
 80      cause the calling task to be preempted.
 81
 82    * The calling task does not have to be the task that created the object.
 83      Any local task that knows the object identifier can delete the object.
 84    """
 85    return _extension.rtems_extension_delete(id)
 86
 87def rtems_extension_ident(name, id):
 88    r"""
 89    Identifies an extension set by the object name.
 90
 91    :type name: rtems_name
 92    :param name: is the object name to look up.
 93
 94    :type id: rtems_id, out
 95    :param id: is the pointer to an ::rtems_id object.  When the directive
 96          call is successful, the object identifier of an object with the specified
 97          name will be stored in this object.
 98
 99    This directive obtains an extension set identifier associated with the
100    extension set name specified in ``name``.
101
102    Title: Notes
103
104    If the extension set name is not unique, then the extension set identifier
105    will match the first extension set with that name in the search order.
106    However, this extension set identifier is not guaranteed to correspond to
107    the desired extension set.
108
109    The objects are searched from lowest to the highest index.  Only the local
110    node is searched.
111
112    The extension set identifier is used with other extension related directives
113    to access the extension set.
114
115
116    Title: Constraints
117
118    The following constraints apply to this directive:
119
120    * The directive may be called from within device driver initialization
121      context.
122
123    * The directive will not cause the calling task to be preempted.
124    """
125    return _extension.rtems_extension_ident(name, id)
126
127def rtems_extension_create(name, extension_table, id):
128    r"""
129    Creates an extension set.
130
131    :type name: rtems_name
132    :param name: is the object name of the extension set.
133
134    :type extension_table: rtems_extensions_table
135    :param extension_table: is the table with the extensions to be used by the
136          extension set.
137
138    :type id: rtems_id, out
139    :param id: is the pointer to an ::rtems_id object.  When the directive
140          call is successful, the identifier of the created extension set will be
141          stored in this object.
142
143    This directive creates an extension set which resides on the local node.
144    The extension set has the user-defined object name specified in ``name``.
145    The assigned object identifier is returned in ``id``.  This identifier is
146    used to access the extension set with other extension set related
147    directives.
148
149    The extension set is initialized using the extension table specified in
150    ``extension_table``.
151
152    Title: Notes
153
154    The user-provided extension table is not used after the return of the
155    directive.
156
157    Each extension of the extension table is optional and may be NULL.  All
158    extensions except the task switch extension of the extension table are
159    atomically and immediately installed.  A task switch extension is separately
160    installed after the other extensions.  The extensions of the extension table
161    are invoked upon the next system event supporting an extension.
162
163    An alternative to dynamically created extension sets are initial extensions,
164    see 'CONFIGURE_INITIAL_EXTENSIONS'.  Initial extensions are recommended
165    for extension sets which provide a fatal error extension.
166
167    For control and maintenance of the extension set, RTEMS allocates a ESCB
168    from the local ESCB free pool and initializes it.
169
170
171    Title: Constraints
172
173    The following constraints apply to this directive:
174
175    * The directive may be called from within device driver initialization
176      context.
177
178    * The directive may be called from within task context.
179
180    * The directive may obtain and release the object allocator mutex.  This may
181      cause the calling task to be preempted.
182
183    * The number of extension sets available to the application is configured
184      through the 'CONFIGURE_MAXIMUM_USER_EXTENSIONS' application
185      configuration option.
186    """
187    return _extension.rtems_extension_create(name, extension_table, id)
def rtems_extension_delete(id):
59def rtems_extension_delete(id):
60    r"""
61    Deletes the extension set.
62
63    :type id: rtems_id
64    :param id: is the extension set identifier.
65
66    This directive deletes the extension set specified by ``id``.
67
68    Title: Notes
69    The ESCB for the deleted extension set is reclaimed by RTEMS.
70
71    Title: Constraints
72
73    The following constraints apply to this directive:
74
75    * The directive may be called from within device driver initialization
76      context.
77
78    * The directive may be called from within task context.
79
80    * The directive may obtain and release the object allocator mutex.  This may
81      cause the calling task to be preempted.
82
83    * The calling task does not have to be the task that created the object.
84      Any local task that knows the object identifier can delete the object.
85    """
86    return _extension.rtems_extension_delete(id)

Deletes the extension set.

Parameters
  • id: is the extension set identifier.

This directive deletes the extension set specified by id.

Title: Notes The ESCB for the deleted extension set is reclaimed by RTEMS.

Title: Constraints

The following constraints apply to this directive:

  • The directive may be called from within device driver initialization context.

  • The directive may be called from within task context.

  • The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.

  • The calling task does not have to be the task that created the object. Any local task that knows the object identifier can delete the object.

def rtems_extension_ident(name, id):
 88def rtems_extension_ident(name, id):
 89    r"""
 90    Identifies an extension set by the object name.
 91
 92    :type name: rtems_name
 93    :param name: is the object name to look up.
 94
 95    :type id: rtems_id, out
 96    :param id: is the pointer to an ::rtems_id object.  When the directive
 97          call is successful, the object identifier of an object with the specified
 98          name will be stored in this object.
 99
100    This directive obtains an extension set identifier associated with the
101    extension set name specified in ``name``.
102
103    Title: Notes
104
105    If the extension set name is not unique, then the extension set identifier
106    will match the first extension set with that name in the search order.
107    However, this extension set identifier is not guaranteed to correspond to
108    the desired extension set.
109
110    The objects are searched from lowest to the highest index.  Only the local
111    node is searched.
112
113    The extension set identifier is used with other extension related directives
114    to access the extension set.
115
116
117    Title: Constraints
118
119    The following constraints apply to this directive:
120
121    * The directive may be called from within device driver initialization
122      context.
123
124    * The directive will not cause the calling task to be preempted.
125    """
126    return _extension.rtems_extension_ident(name, id)

Identifies an extension set by the object name.

Parameters
  • name: is the object name to look up.

  • id: is the pointer to an :: rtems_id object. When the directive call is successful, the object identifier of an object with the specified name will be stored in this object.

This directive obtains an extension set identifier associated with the extension set name specified in name.

Title: Notes

If the extension set name is not unique, then the extension set identifier will match the first extension set with that name in the search order. However, this extension set identifier is not guaranteed to correspond to the desired extension set.

The objects are searched from lowest to the highest index. Only the local node is searched.

The extension set identifier is used with other extension related directives to access the extension set.

Title: Constraints

The following constraints apply to this directive:

  • The directive may be called from within device driver initialization context.

  • The directive will not cause the calling task to be preempted.

def rtems_extension_create(name, extension_table, id):
128def rtems_extension_create(name, extension_table, id):
129    r"""
130    Creates an extension set.
131
132    :type name: rtems_name
133    :param name: is the object name of the extension set.
134
135    :type extension_table: rtems_extensions_table
136    :param extension_table: is the table with the extensions to be used by the
137          extension set.
138
139    :type id: rtems_id, out
140    :param id: is the pointer to an ::rtems_id object.  When the directive
141          call is successful, the identifier of the created extension set will be
142          stored in this object.
143
144    This directive creates an extension set which resides on the local node.
145    The extension set has the user-defined object name specified in ``name``.
146    The assigned object identifier is returned in ``id``.  This identifier is
147    used to access the extension set with other extension set related
148    directives.
149
150    The extension set is initialized using the extension table specified in
151    ``extension_table``.
152
153    Title: Notes
154
155    The user-provided extension table is not used after the return of the
156    directive.
157
158    Each extension of the extension table is optional and may be NULL.  All
159    extensions except the task switch extension of the extension table are
160    atomically and immediately installed.  A task switch extension is separately
161    installed after the other extensions.  The extensions of the extension table
162    are invoked upon the next system event supporting an extension.
163
164    An alternative to dynamically created extension sets are initial extensions,
165    see 'CONFIGURE_INITIAL_EXTENSIONS'.  Initial extensions are recommended
166    for extension sets which provide a fatal error extension.
167
168    For control and maintenance of the extension set, RTEMS allocates a ESCB
169    from the local ESCB free pool and initializes it.
170
171
172    Title: Constraints
173
174    The following constraints apply to this directive:
175
176    * The directive may be called from within device driver initialization
177      context.
178
179    * The directive may be called from within task context.
180
181    * The directive may obtain and release the object allocator mutex.  This may
182      cause the calling task to be preempted.
183
184    * The number of extension sets available to the application is configured
185      through the 'CONFIGURE_MAXIMUM_USER_EXTENSIONS' application
186      configuration option.
187    """
188    return _extension.rtems_extension_create(name, extension_table, id)

Creates an extension set.

Parameters
  • name: is the object name of the extension set.

  • extension_table: is the table with the extensions to be used by the extension set.

  • id: is the pointer to an :: rtems_id object. When the directive call is successful, the identifier of the created extension set will be stored in this object.

This directive creates an extension set which resides on the local node. The extension set has the user-defined object name specified in name. The assigned object identifier is returned in id. This identifier is used to access the extension set with other extension set related directives.

The extension set is initialized using the extension table specified in extension_table.

Title: Notes

The user-provided extension table is not used after the return of the directive.

Each extension of the extension table is optional and may be NULL. All extensions except the task switch extension of the extension table are atomically and immediately installed. A task switch extension is separately installed after the other extensions. The extensions of the extension table are invoked upon the next system event supporting an extension.

An alternative to dynamically created extension sets are initial extensions, see 'CONFIGURE_INITIAL_EXTENSIONS'. Initial extensions are recommended for extension sets which provide a fatal error extension.

For control and maintenance of the extension set, RTEMS allocates a ESCB from the local ESCB free pool and initializes it.

Title: Constraints

The following constraints apply to this directive:

  • The directive may be called from within device driver initialization context.

  • The directive may be called from within task context.

  • The directive may obtain and release the object allocator mutex. This may cause the calling task to be preempted.

  • The number of extension sets available to the application is configured through the 'CONFIGURE_MAXIMUM_USER_EXTENSIONS' application configuration option.