Beispiel #1
0
    def decode(data, unitSize=AbstractType.UNITSIZE_32, endianness=AbstractType.defaultEndianness(), sign=AbstractType.SIGN_UNSIGNED):
        """Decodes the specified Timestamp data into its raw representation

        >>> from netzob.all import *
        >>> value = 1444494130
        >>> print len(Timestamp.decode(value))
        4

        """

        if data is None:
            raise TypeError("Data cannot be None")

        return Integer.decode(data, unitSize=unitSize, endianness=endianness, sign=sign)
Beispiel #2
0
    def decode(data,
               unitSize=AbstractType.UNITSIZE_32,
               endianness=AbstractType.defaultEndianness(),
               sign=AbstractType.SIGN_UNSIGNED):
        """Decodes the specified Timestamp data into its raw representation

        >>> from netzob.all import *
        >>> value = 1444494130
        >>> print len(Timestamp.decode(value))
        4

        """

        if data is None:
            raise TypeError("Data cannot be None")

        return Integer.decode(data,
                              unitSize=unitSize,
                              endianness=endianness,
                              sign=sign)