Method: OpenC3::Protocol#initialize

Defined in:
lib/openc3/interfaces/protocols/protocol.rb

#initialize(allow_empty_data = nil) ⇒ Protocol

to be passed down to later Protocols (instead of returning :STOP). Can be true, false, or nil, where nil is interpreted as true unless the Protocol is the last Protocol of the chain.

Parameters:

  • allow_empty_data (true/false/nil) (defaults to: nil)

    Whether or not this protocol will allow an empty string



37
38
39
40
41
# File 'lib/openc3/interfaces/protocols/protocol.rb', line 37

def initialize(allow_empty_data = nil)
  @interface = nil
  @allow_empty_data = ConfigParser.handle_true_false_nil(allow_empty_data)
  reset()
end