Class: McProtocolE::Frame1e::Device
- Inherits:
-
Object
- Object
- McProtocolE::Frame1e::Device
- Defined in:
- lib/mc_protocol_e/frame_1e/device.rb
Overview
This class shows a device.
Defined Under Namespace
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Class Method Summary collapse
- .annunciator ⇒ Object
- .counter_coil ⇒ Object
- .counter_contact ⇒ Object
- .counter_current_value ⇒ Object
- .data_register ⇒ Object
- .file_register ⇒ Object
- .input ⇒ Object
- .internal_relay ⇒ Object
- .link_register ⇒ Object
- .link_relay ⇒ Object
- .output ⇒ Object
- .timer_coil ⇒ Object
- .timer_contact ⇒ Object
- .timer_current_value ⇒ Object
Instance Method Summary collapse
- #bit? ⇒ Boolean
-
#initialize(code:, type:) ⇒ Device
constructor
Constructor.
- #to_b ⇒ Object
- #word? ⇒ Boolean
Constructor Details
#initialize(code:, type:) ⇒ Device
Constructor.
35 36 37 38 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 35 def initialize(code:, type:) @code = code @type = type end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
30 31 32 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 30 def code @code end |
Class Method Details
.annunciator ⇒ Object
52 53 54 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 52 def self.annunciator new(code: Code::ANNUNCIATOR, type: Type::BIT) end |
.counter_coil ⇒ Object
80 81 82 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 80 def self.counter_coil new(code: Code::COUNTER_COIL, type: Type::BIT) end |
.counter_contact ⇒ Object
76 77 78 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 76 def self.counter_contact new(code: Code::COUNTER_CONTACT, type: Type::BIT) end |
.counter_current_value ⇒ Object
72 73 74 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 72 def self.counter_current_value new(code: Code::COUNTER_CURRENT_VALUE, type: Type::WORD) end |
.data_register ⇒ Object
84 85 86 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 84 def self.data_register new(code: Code::DATA_REGISTER, type: Type::WORD) end |
.file_register ⇒ Object
92 93 94 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 92 def self.file_register new(code: Code::FILE_REGISTER, type: Type::WORD) end |
.input ⇒ Object
40 41 42 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 40 def self.input new(code: Code::INPUT, type: Type::BIT) end |
.internal_relay ⇒ Object
48 49 50 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 48 def self.internal_relay new(code: Code::INTERNAL_RELAY, type: Type::BIT) end |
.link_register ⇒ Object
88 89 90 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 88 def self.link_register new(code: Code::LINK_REGISTER, type: Type::WORD) end |
.link_relay ⇒ Object
56 57 58 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 56 def self.link_relay new(code: Code::LINK_RELAY, type: Type::BIT) end |
.output ⇒ Object
44 45 46 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 44 def self.output new(code: Code::OUTPUT, type: Type::BIT) end |
.timer_coil ⇒ Object
68 69 70 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 68 def self.timer_coil new(code: Code::TIMER_COIL, type: Type::BIT) end |
.timer_contact ⇒ Object
64 65 66 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 64 def self.timer_contact new(code: Code::TIMER_CONTACT, type: Type::BIT) end |
.timer_current_value ⇒ Object
60 61 62 |
# File 'lib/mc_protocol_e/frame_1e/device.rb', line 60 def self.timer_current_value new(code: Code::TIMER_CURRENT_VALUE, type: Type::WORD) end |