Class: PacketGen::Types::SInt16n

Inherits:
SInt16 show all
Defined in:
lib/packetgen/types/int.rb

Overview

native endian 2-byte signed integer

Author:

  • Sylvain Daubert

Since:

  • 3.3.1

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) ⇒ SInt16n

Returns a new instance of SInt16n.

Parameters:

  • value (Integer, nil) (defaults to: nil)

Since:

  • 3.3.1



212
213
214
# File 'lib/packetgen/types/int.rb', line 212

def initialize(value=nil)
  super(value, :native)
end