#118 refactoring of comms types
This commit is contained in:
@@ -7,7 +7,7 @@ local unit_session = require("supervisor.session.rtu.unit_session")
|
||||
|
||||
local sps = {}
|
||||
|
||||
local RTU_UNIT_TYPES = comms.RTU_UNIT_TYPES
|
||||
local RTU_UNIT_TYPE = comms.RTU_UNIT_TYPE
|
||||
local MODBUS_FCODE = types.MODBUS_FCODE
|
||||
|
||||
local TXN_TYPES = {
|
||||
@@ -38,7 +38,7 @@ local PERIODICS = {
|
||||
---@param out_queue mqueue RTU unit message out queue
|
||||
function sps.new(session_id, unit_id, advert, out_queue)
|
||||
-- type check
|
||||
if advert.type ~= RTU_UNIT_TYPES.SPS then
|
||||
if advert.type ~= RTU_UNIT_TYPE.SPS then
|
||||
log.error("attempt to instantiate sps RTU for type '" .. advert.type .. "'. this is a bug.")
|
||||
return nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user