class Crubyflie::LogConfVariable

Interface for Logging variable configuration objects this class lists methods to be implemented Python implementation is in cfclient/utils/logconfigreader.py

Attributes

address[R]
fetch_as[R]
name[R]
stored_as[R]

Public Class Methods

new(name, is_toc, stored_as, fetch_as, address=0) click to toggle source
# File lib/crubyflie/crazyflie/log_conf.rb, line 37
def initialize(name, is_toc, stored_as, fetch_as, address=0)
    @name = name
    @is_toc = is_toc
    @stored_as = stored_as
    @fetch_as = fetch_as
    @address = address
end

Public Instance Methods

is_toc_variable?() click to toggle source

@return [TrueClass,FalseClass] true if it is stored in the TOC

# File lib/crubyflie/crazyflie/log_conf.rb, line 52
def is_toc_variable?
    return @is_toc == true
end
stored_fetch_as() click to toggle source

@return [Integer] a byte where the upper 4 bits are the type indentifier of how the variable is stored and the lower 4 bits are the type the variable should be fetched as

# File lib/crubyflie/crazyflie/log_conf.rb, line 47
def stored_fetch_as
    return @stored_as << 4 | (0x0F & @fetch_as)
end