Class: McProtocolE::Frame1e::WaitSec
- Inherits:
-
Object
- Object
- McProtocolE::Frame1e::WaitSec
- Defined in:
- lib/mc_protocol_e/frame_1e/request.rb
Overview
This class shows waiting second for MC protocol.
Instance Method Summary collapse
-
#initialize(sec) ⇒ WaitSec
constructor
A new instance of WaitSec.
- #to_b ⇒ Object
Constructor Details
#initialize(sec) ⇒ WaitSec
Returns a new instance of WaitSec.
67 68 69 |
# File 'lib/mc_protocol_e/frame_1e/request.rb', line 67 def initialize(sec) @sec = sec end |
Instance Method Details
#to_b ⇒ Object
71 72 73 74 75 76 |
# File 'lib/mc_protocol_e/frame_1e/request.rb', line 71 def to_b return @binary if @binary quarter_sec = (sec * 4).to_i @binary = [quarter_sec].pack("v") end |