Method: Twib::Interface#send
- Defined in:
- lib/twib/interface.rb
#send(command_id, payload = String.new) {|rs| ... } ⇒ ActiveRequest
Sends a request to the remote object this instance is bound to.
object.send(10, [1234].pack("L<")) do |rs|
puts "got back: " + rs.assert_ok.payload
end
object.send(10, [1234].pack("L<")).wait_ok
# => #<Twib::TwibConnection::Response>
33 34 35 |
# File 'lib/twib/interface.rb', line 33 def send(command_id, payload=String.new, &block) @connection.send(@device_id, @object_id, command_id, payload, &block) end |