crc

 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 _crc as _crc
 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
57CRC24Q_SEED = _crc.CRC24Q_SEED
58r"""This constant represents the default CRC-24Q seed state."""
59CRC24Q_MASK = _crc.CRC24Q_MASK
60r"""
61    This constant provides a mask to get a valid CRC-24Q value from the
62      integers returned by _CRC24Q_Update() and _CRC24Q_Sequence_update().
63    """
64
65def _CRC24Q_Update(crc, byte):
66    r"""
67    Updates the CRC-24Q state using a byte.
68
69    :type crc: uint32_t
70    :param crc: is the input CRC-24Q state.
71
72    :type byte: uint8_t
73    :param byte: is the byte updating the input CRC-24Q state.
74
75    :rtype: uint32_t
76    :return: Returns the updated CRC-24Q state.  Use the #CRC24Q_MASK to get a
77          valid CRC-24Q value.
78    """
79    return _crc._CRC24Q_Update(crc, byte)
80
81def _CRC24Q_Sequence_update(crc, bytes, size_in_bytes):
82    r"""
83    Updates the CRC-24Q state using a sequence of bytes.
84
85    :type crc: uint32_t
86    :param crc: is the input CRC-24Q state.
87
88    :param bytes[in]: is the sequence of bytes updating the input CRC-24Q state.
89
90    :type size_in_bytes: int
91    :param size_in_bytes: is the size in bytes of the byte sequence.
92
93    :rtype: uint32_t
94    :return: Returns the updated CRC-24Q state.  Use the #CRC24Q_MASK to get a
95          valid CRC-24Q value.
96    """
97    return _crc._CRC24Q_Sequence_update(crc, bytes, size_in_bytes)
CRC24Q_SEED = See C documentation

This constant represents the default CRC-24Q seed state.

CRC24Q_MASK = See C documentation

This constant provides a mask to get a valid CRC-24Q value from the integers returned by _CRC24Q_Update() and _CRC24Q_Sequence_update().