Class: DSP::ReadMemoryArguments

Inherits:
DSPBase
  • Object
show all
Defined in:
lib/dsp/dsp_protocol.rb

Overview

interface ReadMemoryArguments {

    /** Memory reference to the base location from which data should be read. */
    memoryReference: string;
    /** Optional offset (in bytes) to be applied to the reference location before reading data. Can be negative. */
    offset?: number;
    /** Number of bytes to read at the specified location and offset. */
    count: number;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ ReadMemoryArguments

Returns a new instance of ReadMemoryArguments.



3440
3441
3442
3443
# File 'lib/dsp/dsp_protocol.rb', line 3440

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[offset]
end

Instance Attribute Details

#countObject

type: string # type: number # type: number



3438
3439
3440
# File 'lib/dsp/dsp_protocol.rb', line 3438

def count
  @count
end

#memoryReferenceObject

type: string # type: number # type: number



3438
3439
3440
# File 'lib/dsp/dsp_protocol.rb', line 3438

def memoryReference
  @memoryReference
end

#offsetObject

type: string # type: number # type: number



3438
3439
3440
# File 'lib/dsp/dsp_protocol.rb', line 3438

def offset
  @offset
end

Instance Method Details

#from_h!(value) ⇒ Object



3445
3446
3447
3448
3449
3450
3451
# File 'lib/dsp/dsp_protocol.rb', line 3445

def from_h!(value)
  value = {} if value.nil?
  self.memoryReference = value['memoryReference']
  self.offset = value['offset']
  self.count = value['count']
  self
end