class Controllers

ToDo: rename Controllers to MCUs

Public Class Methods

all() click to toggle source
# File lib/rubimc/controllers.rb, line 3
def self.all # list of USER`s microcontrolles
        @@controllers_array
end
find_mcu(name) click to toggle source
# File lib/rubimc/controllers.rb, line 16
def self.find_mcu(name)
        series_array = Controllers.descendants
        real_mcu_array = []
        series_array.each {|series| real_mcu_array += series.descendants}
        return real_mcu_array.select {|mcu| mcu.is_real_controller? and mcu::MCU_NAME == name}
end
inherited(child_class) click to toggle source
# File lib/rubimc/controllers.rb, line 8
def self.inherited(child_class) # hook when define class
        @@controllers_array << child_class if child_class.is_real_controller?
end
is_real_controller?() click to toggle source
# File lib/rubimc/controllers.rb, line 12
def self.is_real_controller?
        false
end