Class: SonyCameraRemoteAPI::LiveviewFrameInformation
- Inherits:
-
Object
- Object
- SonyCameraRemoteAPI::LiveviewFrameInformation
- Defined in:
- lib/sony_camera_remote_api/packet.rb
Overview
Liveview frame information class
Defined Under Namespace
Classes: Frame
Instance Attribute Summary collapse
-
#data_version ⇒ Object
readonly
Returns the value of attribute data_version.
-
#frames ⇒ Object
readonly
Returns the value of attribute frames.
-
#sequence_number ⇒ Object
readonly
Returns the value of attribute sequence_number.
-
#time_stamp ⇒ Object
readonly
Returns the value of attribute time_stamp.
Instance Method Summary collapse
-
#initialize(packet) ⇒ LiveviewFrameInformation
constructor
A new instance of LiveviewFrameInformation.
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_version ⇒ Object (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 |
#frames ⇒ Object (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_number ⇒ Object (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_stamp ⇒ Object (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 |