Class: Erlang::ETF::Pid

Inherits:
Object
  • Object
show all
Includes:
Term
Defined in:
lib/erlang/etf/pid.rb

Overview

1 N 4 4 1
103 Node ID Serial Creation

Encode a process identifier object (obtained from spawn/3 or friends). The ID and Creation fields works just like in REFERENCE_EXT, while the Serial field is used to improve safety. In ID, only 15 bits are significant; the rest should be 0.

(see PID_EXT)

Constant Summary

Constants included from Term

Term::BERT_PREFIX, Term::BIN_LSB_PACK, Term::BIN_MSB_PACK

Instance Method Summary collapse

Methods included from Term

#==, #__erlang_evolve__, #__erlang_type__, included

Constructor Details

#initialize(node, id, serial, creation) ⇒ Pid

Returns a new instance of Pid.



34
35
36
37
38
39
# File 'lib/erlang/etf/pid.rb', line 34

def initialize(node, id, serial, creation)
  @node     = node
  @id       = id
  @serial   = serial
  @creation = creation
end

Instance Method Details

#__ruby_evolve__Object



41
42
43
44
45
46
47
48
# File 'lib/erlang/etf/pid.rb', line 41

def __ruby_evolve__
  ::Erlang::Pid.new(
    node.__ruby_evolve__,
    id,
    serial,
    creation
  )
end