Sha256: 434d364e828e6e6beade6b1426e434e9eb1439044e6872df5cac2dc48af26d9d

Contents?: true

Size: 781 Bytes

Versions: 4

Compression:

Stored size: 781 Bytes

Contents

require 'pio'

data_dump = [
  0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e, 0x01, 0x02, 0x03, 0x04,
  0x05, 0x06, 0x88, 0xcc, 0x02, 0x09, 0x07, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x01, 0x23, 0x04, 0x05, 0x07, 0x00, 0x00,
  0x00, 0x0c, 0x06, 0x02, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00
].pack('C*')

packet_out = Pio::PacketOut.new(transaction_id: 0x16,
                                buffer_id: 0xffffffff,
                                in_port: 0xffff,
                                actions: Pio::SendOutPort.new(2),
                                raw_data: data_dump)
packet_out.to_binary  # => Packet-Out message in binary format.

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pio-0.18.2 examples/packet_out_new.rb
pio-0.18.1 examples/packet_out_new.rb
pio-0.18.0 examples/packet_out_new.rb
pio-0.17.0 examples/packet_out_new.rb