Method: OpenC3::SimulatedTargetInterface#write
- Defined in:
- lib/openc3/interfaces/simulated_target_interface.rb
#write(packet) ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/openc3/interfaces/simulated_target_interface.rb', line 124 def write(packet) if @connected # Update count of commands sent through this interface @write_count += 1 @bytes_written += packet.length @written_raw_data_time = Time.now @written_raw_data = packet.buffer # Have simulated target handle the packet @sim_target.write(packet) else raise "Interface not connected" end end |