Class: SerialCanBus::Request::AcceptanceMask

Inherits:
BitStruct
  • Object
show all
Defined in:
lib/serial_can_bus/request.rb

Overview

Configure Acceptance Mask (AMn register of SJA1000).

Instance Method Summary collapse

Instance Method Details

#mask=(mask) ⇒ Object



138
139
140
# File 'lib/serial_can_bus/request.rb', line 138

def mask=(mask)
  self.value = mask.to_s(16).rjust(8, '0').upcase
end

#valueObject

:attr_accessor: value acceptance mask (String, 8 bytes), receive all frames by default, see mask=() for automatic conversion from Bignum



136
# File 'lib/serial_can_bus/request.rb', line 136

string :value, 8*8, 'command', :default => 'FFFFFFFF'