class Telos::Message
Public Class Methods
incoming(data)
click to toggle source
# File lib/telos/message.rb, line 14 def incoming(data) Incoming.new(data) end
outgoing(command, arguments = {})
click to toggle source
# File lib/telos/message.rb, line 10 def outgoing(command, arguments = {}) Outgoing.new(command, arguments) end
response_size(data)
click to toggle source
# File lib/telos/message.rb, line 18 def response_size(data) size = data.slice(0,4).unpack('N')[0] checksum = data.slice(4,4).unpack('N')[0] raise(ChecksumMismatch) if size ^ 0xA5A55A5A != checksum size end