Class: SonyCameraRemoteAPI::LiveviewFrameInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/sony_camera_remote_api/packet.rb

Overview

Liveview frame information class

Defined Under Namespace

Classes: Frame

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(packet) ⇒ LiveviewFrameInformation

Returns a new instance of LiveviewFrameInformation.



101
102
103
104
105
106
# File 'lib/sony_camera_remote_api/packet.rb', line 101

def initialize(packet)
  @sequence_number = packet.sequence_number
  @time_stamp = packet.time_stamp
  @data_version = "#{packet.payload.frame_information_data_version.major}.#{packet.payload.frame_information_data_version.minor}"
  @frames = packet.payload.frame_data.map { |f| Frame.new(f) }
end

Instance Attribute Details

#data_versionObject (readonly)

Returns the value of attribute data_version.



100
101
102
# File 'lib/sony_camera_remote_api/packet.rb', line 100

def data_version
  @data_version
end

#framesObject (readonly)

Returns the value of attribute frames.



100
101
102
# File 'lib/sony_camera_remote_api/packet.rb', line 100

def frames
  @frames
end

#sequence_numberObject (readonly)

Returns the value of attribute sequence_number.



100
101
102
# File 'lib/sony_camera_remote_api/packet.rb', line 100

def sequence_number
  @sequence_number
end

#time_stampObject (readonly)

Returns the value of attribute time_stamp.



100
101
102
# File 'lib/sony_camera_remote_api/packet.rb', line 100

def time_stamp
  @time_stamp
end