Class: Modbus::Register

Inherits:
Object
  • Object
show all
Defined in:
lib/modbus/register/base.rb

Direct Known Subclasses

BitRegister, WordRegister

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(addr) ⇒ Register

Returns a new instance of Register.



13
14
15
# File 'lib/modbus/register/base.rb', line 13

def initialize(addr)
  @addr = addr
end

Instance Attribute Details

#addrObject (readonly)

Returns the value of attribute addr.



9
10
11
# File 'lib/modbus/register/base.rb', line 9

def addr
  @addr
end

#handlerObject

Returns the value of attribute handler.



10
11
12
# File 'lib/modbus/register/base.rb', line 10

def handler
  @handler
end