Sha256: 5ded13c0778380f8bb723496112a2b1a79fb6d2454c7fc4567a6ec88784c4785

Contents?: true

Size: 294 Bytes

Versions: 10

Compression:

Stored size: 294 Bytes

Contents

class Ecu
  class SignalList
    DBCREGEXP = /  SG_ ([A-Z_0-9]+) : .*/

    def self.from_dbc(file_path)
      new(File.open(file_path, "rb").read.scan(DBCREGEXP).map do |name|
        Ecu::Signal.new(name: name.first)
      end.reject { |signal| signal.name =~ /TA|TPCI/ })
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
automotive-ecu-0.1.9 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.8 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.7 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.6 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.5 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.4 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.3 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.2 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.1 lib/ecu/interfaces/dbc/signal_list.rb
automotive-ecu-0.1.0 lib/ecu/interfaces/dbc/signal_list.rb