Class: McProtocolE::Frame3e::Device
- Inherits:
-
Object
- Object
- McProtocolE::Frame3e::Device
- Defined in:
- lib/mc_protocol_e/frame_3e/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
- .direct_access_input ⇒ Object
- .direct_access_output ⇒ Object
- .edge_relay ⇒ Object
- .file_register_bsm ⇒ Object
- .file_register_snam ⇒ Object
- .index_register ⇒ Object
- .input ⇒ Object
- .internal_relay ⇒ Object
- .latch_relay ⇒ Object
- .link_register ⇒ Object
- .link_relay ⇒ Object
- .link_special_register ⇒ Object
- .link_special_relay ⇒ Object
- .output ⇒ Object
- .retentive_timer_coil ⇒ Object
- .retentive_timer_contact ⇒ Object
- .retentive_timer_current_value ⇒ Object
- .special_register ⇒ Object
- .special_relay ⇒ 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.
49 50 51 52 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 49 def initialize(code:, type:) @code = code @type = type end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
44 45 46 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 44 def code @code end |
Class Method Details
.annunciator ⇒ Object
78 79 80 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 78 def self.annunciator new(code: Code::ANNUNCIATOR, type: Type::BIT) end |
.counter_coil ⇒ Object
126 127 128 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 126 def self.counter_coil new(code: Code::COUNTER_COIL, type: Type::BIT) end |
.counter_contact ⇒ Object
122 123 124 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 122 def self.counter_contact new(code: Code::COUNTER_CONTACT, type: Type::BIT) end |
.counter_current_value ⇒ Object
130 131 132 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 130 def self.counter_current_value new(code: Code::COUNTER_CURRENT_VALUE, type: Type::WORD) end |
.data_register ⇒ Object
90 91 92 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 90 def self.data_register new(code: Code::DATA_REGISTER, type: Type::WORD) end |
.direct_access_input ⇒ Object
142 143 144 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 142 def self.direct_access_input new(code: Code::DIRECT_ACCESS_INPUT, type: Type::BIT) end |
.direct_access_output ⇒ Object
146 147 148 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 146 def self.direct_access_output new(code: Code::DIRECT_ACCESS_OUTPUT, type: Type::BIT) end |
.edge_relay ⇒ Object
82 83 84 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 82 def self.edge_relay new(code: Code::EDGE_RELAY, type: Type::BIT) end |
.file_register_bsm ⇒ Object
154 155 156 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 154 def self.file_register_bsm new(code: Code::FILE_REGISTER_BSM, type: Type::WORD) end |
.file_register_snam ⇒ Object
158 159 160 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 158 def self.file_register_snam new(code: Code::FILE_REGISTER_SNAM, type: Type::BIT) end |
.index_register ⇒ Object
150 151 152 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 150 def self.index_register new(code: Code::INDEX_REGISTER, type: Type::WORD) end |
.input ⇒ Object
62 63 64 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 62 def self.input new(code: Code::INPUT, type: Type::BIT) end |
.internal_relay ⇒ Object
70 71 72 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 70 def self.internal_relay new(code: Code::INTERNAL_RELAY, type: Type::BIT) end |
.latch_relay ⇒ Object
74 75 76 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 74 def self.latch_relay new(code: Code::LATCH_RELAY, type: Type::BIT) end |
.link_register ⇒ Object
94 95 96 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 94 def self.link_register new(code: Code::LINK_REGISTER, type: Type::WORD) end |
.link_relay ⇒ Object
86 87 88 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 86 def self.link_relay new(code: Code::LINK_RELAY, type: Type::BIT) end |
.link_special_register ⇒ Object
138 139 140 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 138 def self.link_special_register new(code: Code::LINK_SPECIAL_REGISTER, type: Type::WORD) end |
.link_special_relay ⇒ Object
134 135 136 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 134 def self.link_special_relay new(code: Code::LINK_SPECIAL_RELAY, type: Type::BIT) end |
.output ⇒ Object
66 67 68 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 66 def self.output new(code: Code::OUTPUT, type: Type::BIT) end |
.retentive_timer_coil ⇒ Object
114 115 116 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 114 def self.retentive_timer_coil new(code: Code::RETENTIVE_TIMER_COIL, type: Type::BIT) end |
.retentive_timer_contact ⇒ Object
110 111 112 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 110 def self.retentive_timer_contact new(code: Code::RETENTIVE_TIMER_CONTACT, type: Type::BIT) end |
.retentive_timer_current_value ⇒ Object
118 119 120 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 118 def self.retentive_timer_current_value new(code: Code::RETENTIVE_TIMER_CURRENT_VALUE, type: Type::WORD) end |
.special_register ⇒ Object
58 59 60 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 58 def self.special_register new(code: Code::SPECIAL_REGISTER, type: Type::WORD) end |
.special_relay ⇒ Object
54 55 56 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 54 def self.special_relay new(code: Code::SPECIAL_RELAY, type: Type::BIT) end |
.timer_coil ⇒ Object
102 103 104 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 102 def self.timer_coil new(code: Code::TIMER_COIL, type: Type::BIT) end |
.timer_contact ⇒ Object
98 99 100 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 98 def self.timer_contact new(code: Code::TIMER_CONTACT, type: Type::BIT) end |
.timer_current_value ⇒ Object
106 107 108 |
# File 'lib/mc_protocol_e/frame_3e/device.rb', line 106 def self.timer_current_value new(code: Code::TIMER_CURRENT_VALUE, type: Type::WORD) end |