Module: ARbDrone::TcpControl

Defined in:
lib/arbdrone/tcp_control.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#control_channelObject

Returns the value of attribute control_channel.



3
4
5
# File 'lib/arbdrone/tcp_control.rb', line 3

def control_channel
  @control_channel
end

#control_dataObject (readonly)

Returns the value of attribute control_data.



4
5
6
# File 'lib/arbdrone/tcp_control.rb', line 4

def control_data
  @control_data
end

Instance Method Details

#post_initObject



6
7
8
# File 'lib/arbdrone/tcp_control.rb', line 6

def post_init
  
end

#receive_data(msg) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/arbdrone/tcp_control.rb', line 10

def receive_data(msg)
  # TODO: This data will require several packets until it is fully transmitted.
  # Looking at packet captures it looks like the end is signalled by a period
  # on a line by itself.
  @control_data ||= ''
  @control_data << msg
end