lib/mcg/signal_analysis/dsp_file.rb
def to_file( f )
          # NOTE: data element size is hard-coded to 2. See above NOTE.
          buf = [@source, Op::SOURCE_TYPES.index(@src_type), @name, @sym, 
                 @label, @domain, @x_axis, @y_axis, 
                 @data.length(), 2].pack(PFORMAT)
          f.write(buf)

          # NOTE: again, element is hard-coded to a signed short.
          buf = data.pack("s#{@data.length()}")
          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 = [@source, Op::SOURCE_TYPES.index(@src_type), @name, @sym, 
                 @label, @domain, @x_axis, @y_axis, 
                 @data.length(), 2].pack(PFORMAT)
          f.write(buf)
          buf = data.pack("s#{@data.length()}")
          f.write(buf)
        end
def to_file ( f ) buf = [ @source , Op :: SOURCE_TYPES . index ( @src_type ) , @name , @sym , @label , @domain , @x_axis , @y_axis , @data . length ( ) , 2 ] . pack ( PFORMAT ) f . write ( buf ) buf = data . pack ( "s#{@data.length()}" ) f . write ( buf ) end
Pack contents to binary and write to file
Pack contents to binary and write to file
# NOTE: data element size is hard-coded to 2. See above NOTE. # NOTE: again, element is hard-coded to a signed short.
f