class LadderDrive::Protocol::Keyence::KvDevice
Constants
- SUFFIXES_FOR_BIT
- SUFFIXES_FOR_DEC
- SUFFIXES_FOR_DEC_HEX
- SUFFIXES_FOR_HEX
Public Class Methods
new(a, b = nil)
click to toggle source
Calls superclass method
LadderDrive::PlcDevice::new
# File lib/ladder_drive/protocol/keyence/kv_device.rb, line 30 def initialize a, b = nil super @suffix = "R" if @suffix.nil? || @suffix.length == 0 end
Public Instance Methods
+(value)
click to toggle source
# File lib/ladder_drive/protocol/keyence/kv_device.rb, line 35 def + value self.class.new self.suffix, self.number + value end
-(value)
click to toggle source
# File lib/ladder_drive/protocol/keyence/kv_device.rb, line 39 def - value self.class.new self.suffix, [self.number - value, 0].max end
Private Instance Methods
suffixes_for_bit()
click to toggle source
# File lib/ladder_drive/protocol/keyence/kv_device.rb, line 53 def suffixes_for_bit; SUFFIXES_FOR_BIT; end
suffixes_for_dec()
click to toggle source
# File lib/ladder_drive/protocol/keyence/kv_device.rb, line 50 def suffixes_for_dec; SUFFIXES_FOR_DEC; end
suffixes_for_dec_hex()
click to toggle source
# File lib/ladder_drive/protocol/keyence/kv_device.rb, line 51 def suffixes_for_dec_hex; SUFFIXES_FOR_DEC_HEX; end
suffixes_for_hex()
click to toggle source
# File lib/ladder_drive/protocol/keyence/kv_device.rb, line 52 def suffixes_for_hex; SUFFIXES_FOR_HEX; end