Class: PacketGen::Types::SInt64

Inherits:
Int64
  • Object
show all
Defined in:
lib/packetgen/types/int.rb

Overview

8-byte unsigned integer

Author:

  • Sylvain Daubert

Since:

  • 2.8.2

Direct Known Subclasses

SInt64be, SInt64le, SInt64n

Instance Attribute Summary

Attributes inherited from Int

#default, #endian, #value, #width

Instance Method Summary collapse

Methods inherited from Int

#format_inspect, #nbits, #read, #sz, #to_f, #to_i, #to_s

Methods included from Fieldable

#format_inspect, #read, #sz, #to_human, #to_s, #type_name

Constructor Details

#initialize(value = nil, endian = :big) ⇒ SInt64

Returns a new instance of SInt64.

Parameters:

  • value (Integer, nil) (defaults to: nil)
  • endian (:big, :little, :native) (defaults to: :big)

Since:

  • 2.8.2



433
434
435
436
# File 'lib/packetgen/types/int.rb', line 433

def initialize(value=nil, endian=:big)
  super
  @packstr = { big: 'q>', little: 'q<', native: 'q' }
end