lib/mcg/signal_analysis/sar_file.rb
def to_file( f )
          buf = [@name, @ref.binary_role(), @ref.binary_type(), @ref.name,
                 @type, TYPE_SIZES[@type], 
                 @data.length()].pack(PFORMAT)
          f.write(buf)

          fmt_str = "%s%d" % [TYPES[@type], data.length]
          buf = data.pack(fmt_str)
          f.write(buf)
        end
# Pack contents to binary and write to file
Pack contents to binary and write to file
Pack contents to binary and write to file
def to_file( f )
          buf = [@name, @ref.binary_role(), @ref.binary_type(), @ref.name,
                 @type, TYPE_SIZES[@type], 
                 @data.length()].pack(PFORMAT)
          f.write(buf)
          fmt_str = "%s%d" % [TYPES[@type], data.length]
          buf = data.pack(fmt_str)
          f.write(buf)
        end
def to_file ( f ) buf = [ @name , @ref . binary_role ( ) , @ref . binary_type ( ) , @ref . name , @type , TYPE_SIZES [ @type ] , @data . length ( ) ] . pack ( PFORMAT ) f . write ( buf ) fmt_str = "%s%d" % [ TYPES [ @type ] , data . length ] buf = data . pack ( fmt_str ) f . write ( buf ) end
Pack contents to binary and write to file
Pack contents to binary and write to file
f