Class: AutomateEm::Device

Inherits:
Object
  • Object
show all
Includes:
ModuleCore
Defined in:
lib/automate-em/device/device.rb,
lib/automate-em/device/tcp_control.rb

Defined Under Namespace

Classes: Base

Constant Summary

Constants included from Constants

Constants::Off, Constants::On

Instance Attribute Summary collapse

Attributes included from ModuleCore

#base, #systems

Attributes included from Status

#status

Instance Method Summary collapse

Methods included from ModuleCore

#clear_active_timers, #join_system, #leave_system, #logger, #setbase

Methods included from Utilities

array_to_str, byte_to_hex, hex_to_byte, schedule, str_to_array, task

Methods included from Status

#[], #[]=, #mark_emit_end, #mark_emit_start

Constructor Details

#initialize(tls, makebreak) ⇒ Device

Returns a new instance of Device.



86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/automate-em/device/device.rb', line 86

def initialize(tls, makebreak)
	@systems = []

	#
	# Status variables
	#	NOTE:: if changed then change in logic.rb 
	#
	@secure_connection = tls
	@makebreak_connection = makebreak
	@status = {}
	@status_lock = Mutex.new
	@system_lock = Mutex.new
	@status_waiting = false
end

Instance Attribute Details

#makebreak_connectionObject (readonly)

Returns the value of attribute makebreak_connection.



108
109
110
# File 'lib/automate-em/device/device.rb', line 108

def makebreak_connection
  @makebreak_connection
end

#secure_connectionObject (readonly)

required by base for send logic



107
108
109
# File 'lib/automate-em/device/device.rb', line 107

def secure_connection
  @secure_connection
end