#74 coordinator comms and work on database

This commit is contained in:
Mikayla Fischler
2022-06-25 13:39:47 -04:00
parent cf6f0e3153
commit e54d5b3d85
3 changed files with 114 additions and 69 deletions

View File

@@ -57,6 +57,11 @@ local COORD_TYPES = {
ALARM = 4 -- alarm signaling
}
---@alias CAPI_TYPES integer
local CAPI_TYPES = {
ESTABLISH = 0 -- initial greeting
}
---@alias RTU_UNIT_TYPES integer
local RTU_UNIT_TYPES = {
REDSTONE = 0, -- redstone I/O
@@ -433,7 +438,6 @@ function comms.mgmt_packet()
end
-- SCADA coordinator packet
-- @todo
function comms.coord_packet()
local self = {
frame = nil,
@@ -456,7 +460,7 @@ function comms.coord_packet()
end
-- make a coordinator packet
---@param packet_type any
---@param packet_type COORD_TYPES
---@param data table
function public.make(packet_type, data)
if type(data) == "table" then
@@ -541,7 +545,7 @@ function comms.capi_packet()
end
-- make a coordinator API packet
---@param packet_type any
---@param packet_type CAPI_TYPES
---@param data table
function public.make(packet_type, data)
if type(data) == "table" then