class Lib::TL1::Message::Autonomous
Attributes
alarm_code[R]
atag[R]
command[R]
correlation_tag[R]
ctag[R]
date[R]
sid[R]
system_identifier[R]
time[R]
Public Class Methods
new(sid: nil, date: nil, time: nil, alarm_code: nil, ctag: nil, command: nil, text_block: nil) { |self| ... }
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 16 def initialize(sid: nil, date: nil, time: nil, alarm_code: nil, ctag: nil, command: nil, text_block: nil) if block_given? yield self else self.sid = sid self.date = date self.time = time self.alarm_code = alarm_code self.ctag = ctag self.command = command self.text_block = text_block end end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 30 def <=>(other) return nil unless instance_of? other.class to_s <=> other.to_s end
alarm_code=(alarm_code)
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 55 def alarm_code=(alarm_code) @alarm_code = alarm_code.is_a?(Field::AlarmCode) ? alarm_code : Field::AlarmCode.new(alarm_code) end
command=(command)
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 67 def command=(command) @verb = command.is_a?(Field::CommandVerb) ? command : Field::CommandVerb.new(command) end
ctag=(ctag)
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 59 def ctag=(ctag) @atag = ctag.is_a?(Field::CorrelationTag) ? ctag : Field::CorrelationTag.new(ctag) end
Also aliased as: correlation_tag=, atag=
date=(date)
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 47 def date=(date) @date = date.is_a?(Field::Date) ? date : Field::Date.new(date) end
sid=(sid)
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 41 def sid=(sid) @sid = sid.is_a?(Field::SystemIdentifier) ? sid : Field::SystemIdentifier.new(sid) end
Also aliased as: system_identifier=
text_block=(text_block)
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 71 def text_block=(text_block) @text_block = text_block.is_a?(Field::TextBlock) ? text_block : Field::TextBlock.new(text_block) end
time=(time)
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 51 def time=(time) @time = time.is_a?(Field::Time) ? time : Field::Time.new(time) end
to_s()
click to toggle source
# File lib/lib/tl1/message/autonomous.rb, line 36 def to_s "\r\n\n #{sid} #{date} #{time}\r\n #{alarm_code} #{ctag}\r\n #{text_block}\r\n;" end
Also aliased as: to_str