Class: Syskit::NetworkGeneration::PortDynamics::Trigger

Inherits:
Object
  • Object
show all
Defined in:
lib/syskit/network_generation/dataflow_dynamics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, period, sample_count) ⇒ Trigger

Returns a new instance of Trigger



62
63
64
65
66
67
# File 'lib/syskit/network_generation/dataflow_dynamics.rb', line 62

def initialize(name, period, sample_count)
    @name, @period, @sample_count =
        name.to_str, period, sample_count
    @hash = [@name, @period, @sample_count].hash
    freeze
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash



60
61
62
# File 'lib/syskit/network_generation/dataflow_dynamics.rb', line 60

def hash
  @hash
end

#nameObject (readonly)

Returns the value of attribute name



56
57
58
# File 'lib/syskit/network_generation/dataflow_dynamics.rb', line 56

def name
  @name
end

#periodObject (readonly)

Returns the value of attribute period



57
58
59
# File 'lib/syskit/network_generation/dataflow_dynamics.rb', line 57

def period
  @period
end

#sample_countObject (readonly)

Returns the value of attribute sample_count



58
59
60
# File 'lib/syskit/network_generation/dataflow_dynamics.rb', line 58

def sample_count
  @sample_count
end

Instance Method Details

#==(other) ⇒ Object



73
74
75
# File 'lib/syskit/network_generation/dataflow_dynamics.rb', line 73

def ==(other)
    eql?(other)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


68
69
70
71
72
# File 'lib/syskit/network_generation/dataflow_dynamics.rb', line 68

def eql?(other)
    @period == other.period &&
        @name == other.name &&
        @sample_count == other.sample_count
end