#367 RTU fail enum and logging messages

This commit is contained in:
Mikayla
2024-08-22 16:42:57 +00:00
parent a1b6ff4bcc
commit a087eda0ee
6 changed files with 72 additions and 36 deletions

View File

@ -5,7 +5,7 @@
---@class types
local types = {}
-- CLASSES --
--#region CLASSES
---@class tank_fluid
---@field name fluid
@ -67,12 +67,13 @@ function types.new_zero_coordinate() return { x = 0, y = 0, z = 0 } end
---@field reactor integer
---@field rsio table|nil
--#endregion
-- ALIASES --
---@alias color integer
-- ENUMERATION TYPES --
--#region
--#region ENUMERATION TYPES
---@enum TEMP_SCALE
types.TEMP_SCALE = {
@ -169,6 +170,15 @@ function types.rtu_type_to_string(utype)
end
end
---@enum RTU_ID_FAIL
types.RTU_ID_FAIL = {
OK = 0,
OUT_OF_RANGE = 1,
DUPLICATE = 2,
MAX_DEVICES = 3,
MISSING = 4
}
---@enum TRI_FAIL
types.TRI_FAIL = {
OK = 1,
@ -290,8 +300,7 @@ types.ALARM_STATE_NAMES = {
--#endregion
-- STRING TYPES --
--#region
--#region STRING TYPES
---@alias side
---|"top"
@ -405,8 +414,7 @@ types.DUMPING_MODE = {
--#endregion
-- MODBUS --
--#region
--#region MODBUS
-- MODBUS function codes
---@enum MODBUS_FCODE