Class: Risc::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/risc/Sim.rb

Overview

Internal Sim class used to describe an action for a Process.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, pid, event = nil) ⇒ Action

Returns a new instance of Action.



50
51
52
53
54
# File 'lib/risc/Sim.rb', line 50

def initialize(type,pid,event = nil)
	@type = type
	@pid = pid
	@event = event
end

Instance Attribute Details

#eventObject

Returns the value of attribute event.



48
49
50
# File 'lib/risc/Sim.rb', line 48

def event
  @event
end

#pidObject

Returns the value of attribute pid.



48
49
50
# File 'lib/risc/Sim.rb', line 48

def pid
  @pid
end

#typeObject

Returns the value of attribute type.



48
49
50
# File 'lib/risc/Sim.rb', line 48

def type
  @type
end

Instance Method Details

#assign(action) ⇒ Object



56
57
58
59
60
# File 'lib/risc/Sim.rb', line 56

def assign(action)
	@type = action.type;
	@pid = action.pid;
	@event = action.event;
end