Class: NXT::Interface::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/nxt/interface/base.rb

Overview

The base implementation of all communication interfaces. This is effectively the basic set of abstract methods that an interface needs to define to slot into this framework.

Direct Known Subclasses

SerialPort, Usb

Instance Method Summary collapse

Instance Method Details

#receiveObject

Raises:

  • (InterfaceNotImplemented)


13
14
15
# File 'lib/nxt/interface/base.rb', line 13

def receive
  raise(InterfaceNotImplemented, 'The #receive method must be implemented.')
end

#sendObject

Raises:

  • (InterfaceNotImplemented)


9
10
11
# File 'lib/nxt/interface/base.rb', line 9

def send
  raise(InterfaceNotImplemented, 'The #send method must be implemented.')
end