Class: SerialCanBus::ISOTP::Flow

Inherits:
BitStruct
  • Object
show all
Defined in:
lib/serial_can_bus/iso-tp.rb

Overview

Flow control packet

Instance Method Summary collapse

Instance Method Details

#block_sizeObject

:attr_accessor: block_size block size (Fixnum, 1 byte)


117
# File 'lib/serial_can_bus/iso-tp.rb', line 117

unsigned :block_size, 8, 'block size'

#errorsObject


124
125
126
127
128
129
130
131
132
# File 'lib/serial_can_bus/iso-tp.rb', line 124

def errors
  errors = []

  if fc > 2
    errors << "invalid FC flag (#{dindex} > 2)"
  end

  errors
end

#fcObject

:attr_accessor: fc flow control flag (Fixnum, 4 bits)


112
# File 'lib/serial_can_bus/iso-tp.rb', line 112

unsigned :fc,         4, 'FC flag'

#stObject

:attr_accessor: st separation time (Fixnum, 1 byte)


122
# File 'lib/serial_can_bus/iso-tp.rb', line 122

unsigned :st,         8, 'ST'