error
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 _error as _error 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 57RTEMS_ERROR_ERRNO = _error.RTEMS_ERROR_ERRNO 58 59RTEMS_ERROR_PANIC = _error.RTEMS_ERROR_PANIC 60 61RTEMS_ERROR_ABORT = _error.RTEMS_ERROR_ABORT 62 63RTEMS_ERROR_MASK = _error.RTEMS_ERROR_MASK 64 65 66def rtems_error(*args): 67 r""" 68 Report an Error 69 70 :type error_code: rtems_error_code_t, in 71 :param error_code: can be specified as any of the following: 72 RTEMS_ERROR_ERRNO -- include errno text in output 73 RTEMS_ERROR_PANIC -- halts local system after output 74 RTEMS_ERROR_ABORT -- abort after output 75 76 :type printf_format: string, in 77 :param printf_format: is a normal printf(3) format string, 78 with its concommitant arguments 79 80 :rtype: int 81 :return: the number of characters written. 82 """ 83 return _error.rtems_error(*args) 84 85def rtems_verror(error_code, printf_format, arglist): 86 r""" 87 Report an Error 88 89 :type error_code: rtems_error_code_t, in 90 :param error_code: can be specified as any of the following: 91 RTEMS_ERROR_ERRNO -- include errno text in output 92 RTEMS_ERROR_PANIC -- halts local system after output 93 RTEMS_ERROR_ABORT -- abort after output 94 95 :type printf_format: string, in 96 :param printf_format: is a normal printf(3) format string, 97 with its concommitant arguments 98 :type arglist: va_list, in 99 :param arglist: is a varargs list corresponding to 100 printf_format 101 102 :rtype: int 103 :return: the number of characters written. 104 """ 105 return _error.rtems_verror(error_code, printf_format, arglist) 106 107cvar = _error.cvar
RTEMS_ERROR_ERRNO =
See C documentation
RTEMS_ERROR_PANIC =
See C documentation
RTEMS_ERROR_ABORT =
See C documentation
RTEMS_ERROR_MASK =
See C documentation
def
rtems_error(*args):
67def rtems_error(*args): 68 r""" 69 Report an Error 70 71 :type error_code: rtems_error_code_t, in 72 :param error_code: can be specified as any of the following: 73 RTEMS_ERROR_ERRNO -- include errno text in output 74 RTEMS_ERROR_PANIC -- halts local system after output 75 RTEMS_ERROR_ABORT -- abort after output 76 77 :type printf_format: string, in 78 :param printf_format: is a normal printf(3) format string, 79 with its concommitant arguments 80 81 :rtype: int 82 :return: the number of characters written. 83 """ 84 return _error.rtems_error(*args)
Report an Error
Parameters
error_code: can be specified as any of the following: RTEMS_ERROR_ERRNO -- include errno text in output RTEMS_ERROR_PANIC -- halts local system after output RTEMS_ERROR_ABORT -- abort after output
printf_format: is a normal printf(3) format string, with its concommitant arguments
Returns
the number of characters written.
def
rtems_verror(error_code, printf_format, arglist):
86def rtems_verror(error_code, printf_format, arglist): 87 r""" 88 Report an Error 89 90 :type error_code: rtems_error_code_t, in 91 :param error_code: can be specified as any of the following: 92 RTEMS_ERROR_ERRNO -- include errno text in output 93 RTEMS_ERROR_PANIC -- halts local system after output 94 RTEMS_ERROR_ABORT -- abort after output 95 96 :type printf_format: string, in 97 :param printf_format: is a normal printf(3) format string, 98 with its concommitant arguments 99 :type arglist: va_list, in 100 :param arglist: is a varargs list corresponding to 101 printf_format 102 103 :rtype: int 104 :return: the number of characters written. 105 """ 106 return _error.rtems_verror(error_code, printf_format, arglist)
Report an Error
Parameters
error_code: can be specified as any of the following: RTEMS_ERROR_ERRNO -- include errno text in output RTEMS_ERROR_PANIC -- halts local system after output RTEMS_ERROR_ABORT -- abort after output
printf_format: is a normal printf(3) format string, with its concommitant arguments
- arglist: is a varargs list corresponding to printf_format
Returns
the number of characters written.
cvar =
See C documentation