Class: McProtocolE::Frame1e::AccessRoute
- Inherits:
-
Object
- Object
- McProtocolE::Frame1e::AccessRoute
- Defined in:
- lib/mc_protocol_e/frame_1e/access_route.rb
Overview
This class shows a access route.
Constant Summary collapse
- OWN_PC_NUM =
255
Instance Attribute Summary collapse
-
#pc_num ⇒ Object
readonly
Returns the value of attribute pc_num.
Class Method Summary collapse
-
.own_station ⇒ AccessRoute
Returns instance of own station.
Instance Method Summary collapse
-
#initialize(pc_num:) ⇒ AccessRoute
constructor
Constructor.
-
#to_b ⇒ String
Returns binary string.
Constructor Details
#initialize(pc_num:) ⇒ AccessRoute
Constructor.
14 15 16 |
# File 'lib/mc_protocol_e/frame_1e/access_route.rb', line 14 def initialize(pc_num:) @pc_num = pc_num end |
Instance Attribute Details
#pc_num ⇒ Object (readonly)
Returns the value of attribute pc_num.
10 11 12 |
# File 'lib/mc_protocol_e/frame_1e/access_route.rb', line 10 def pc_num @pc_num end |
Class Method Details
.own_station ⇒ AccessRoute
Returns instance of own station.
20 21 22 |
# File 'lib/mc_protocol_e/frame_1e/access_route.rb', line 20 def self.own_station new(pc_num: OWN_PC_NUM) end |
Instance Method Details
#to_b ⇒ String
Returns binary string.
26 27 28 |
# File 'lib/mc_protocol_e/frame_1e/access_route.rb', line 26 def to_b [pc_num].pack("v")[0] end |