mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#403 additional work on guide app
This commit is contained in:
parent
58fb35e85b
commit
9404b50a8c
@ -114,16 +114,69 @@ local function new_view(root)
|
|||||||
PushButton{parent=fps,text="Coordinator >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=function()end}
|
PushButton{parent=fps,text="Coordinator >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=function()end}
|
||||||
|
|
||||||
TextBox{parent=gls,y=1,text="Glossary",height=1,alignment=ALIGN.CENTER}
|
TextBox{parent=gls,y=1,text="Glossary",height=1,alignment=ALIGN.CENTER}
|
||||||
|
|
||||||
PushButton{parent=gls,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=main_page.nav_to}
|
PushButton{parent=gls,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=main_page.nav_to}
|
||||||
|
|
||||||
local gls_list_box = ListBox{parent=gls,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
local gls_abb_page = app.new_page(gls_page, #panes + 1)
|
||||||
|
local gls_abb_div = Div{parent=page_div,x=2}
|
||||||
|
table.insert(panes, gls_abb_div)
|
||||||
|
TextBox{parent=gls_abb_div,y=1,text="Abbreviations",height=1,alignment=ALIGN.CENTER}
|
||||||
|
PushButton{parent=gls_abb_div,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_page.nav_to}
|
||||||
|
|
||||||
for i = 1, #docs.glossary do
|
local gls_abb_view_page = app.new_page(gls_abb_page, #panes + 1)
|
||||||
local item = docs.glossary[i] ---@type pocket_doc_item
|
local gls_abb_view_div = Div{parent=page_div,x=2}
|
||||||
doc_map[item.key] = TextBox{parent=gls_list_box,text=item.name,anchor=true}
|
table.insert(panes, gls_abb_view_div)
|
||||||
TextBox{parent=gls_list_box,text=item.desc,fg_bg=label}
|
TextBox{parent=gls_abb_view_div,y=1,text="Abbreviations",height=1,alignment=ALIGN.CENTER}
|
||||||
gls_list_box.line_break()
|
PushButton{parent=gls_abb_view_div,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_abb_page.nav_to}
|
||||||
|
|
||||||
|
local gls_term_page = app.new_page(gls_page, #panes + 1)
|
||||||
|
local gls_term_div = Div{parent=page_div,x=2}
|
||||||
|
table.insert(panes, gls_term_div)
|
||||||
|
TextBox{parent=gls_term_div,y=1,text="Terminology",height=1,alignment=ALIGN.CENTER}
|
||||||
|
PushButton{parent=gls_term_div,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_page.nav_to}
|
||||||
|
|
||||||
|
local gls_term_view_page = app.new_page(gls_term_page, #panes + 1)
|
||||||
|
local gls_term_view_div = Div{parent=page_div,x=2}
|
||||||
|
table.insert(panes, gls_term_view_div)
|
||||||
|
TextBox{parent=gls_term_view_div,y=1,text="Terminology",height=1,alignment=ALIGN.CENTER}
|
||||||
|
PushButton{parent=gls_term_view_div,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_term_page.nav_to}
|
||||||
|
|
||||||
|
PushButton{parent=gls,y=3,text="Abbreviations >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_abb_page.nav_to}
|
||||||
|
PushButton{parent=gls,text="Terminology >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_term_page.nav_to}
|
||||||
|
|
||||||
|
local abb_name_list = ListBox{parent=gls_abb_div,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||||
|
local abb_def_list = ListBox{parent=gls_abb_view_div,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||||
|
|
||||||
|
for i = 1, #docs.glossary.abbvs do
|
||||||
|
local item = docs.glossary.abbvs[i] ---@type pocket_doc_item
|
||||||
|
|
||||||
|
doc_map[item.key] = TextBox{parent=abb_def_list,text=item.name,anchor=true,cpair(colors.blue,colors.black)}
|
||||||
|
TextBox{parent=abb_def_list,text=item.desc,fg_bg=label}
|
||||||
|
TextBox{parent=abb_def_list,text="",fg_bg=label}
|
||||||
|
|
||||||
|
local function view()
|
||||||
|
gls_abb_view_page.nav_to()
|
||||||
|
doc_map[item.key].focus()
|
||||||
|
end
|
||||||
|
|
||||||
|
PushButton{parent=abb_name_list,text=item.name,fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=view}
|
||||||
|
end
|
||||||
|
|
||||||
|
local term_name_list = ListBox{parent=gls_term_div,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||||
|
local term_def_list = ListBox{parent=gls_term_view_div,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||||
|
|
||||||
|
for i = 1, #docs.glossary.terms do
|
||||||
|
local item = docs.glossary.terms[i] ---@type pocket_doc_item
|
||||||
|
|
||||||
|
doc_map[item.key] = TextBox{parent=term_def_list,text=item.name,anchor=true,cpair(colors.blue,colors.black)}
|
||||||
|
TextBox{parent=term_def_list,text=item.desc,fg_bg=label}
|
||||||
|
TextBox{parent=term_def_list,text="",fg_bg=label}
|
||||||
|
|
||||||
|
local function view()
|
||||||
|
gls_term_view_page.nav_to()
|
||||||
|
doc_map[item.key].focus()
|
||||||
|
end
|
||||||
|
|
||||||
|
PushButton{parent=term_name_list,text=item.name,fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=view}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- setup multipane
|
-- setup multipane
|
||||||
|
@ -26,9 +26,7 @@ doc("TurbineTripAlarm", "Turbine Trip", "A turbine stopped rotating, likely due
|
|||||||
|
|
||||||
docs.annunc = {
|
docs.annunc = {
|
||||||
unit = {
|
unit = {
|
||||||
main_section = {},
|
main_section = {}, rps_section = {}, rcs_section = {}
|
||||||
rps_section = {},
|
|
||||||
rcs_section = {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,15 +52,36 @@ target = docs.annunc.unit.rps_section
|
|||||||
doc("rps_tripped", "RPS Trip", "Indicates if the reactor protection system has caused a SCRAM.")
|
doc("rps_tripped", "RPS Trip", "Indicates if the reactor protection system has caused a SCRAM.")
|
||||||
doc("high_dmg", "Damage Level High", "Indicates if the RPS tripped due to significant reactor damage.")
|
doc("high_dmg", "Damage Level High", "Indicates if the RPS tripped due to significant reactor damage.")
|
||||||
|
|
||||||
docs.glossary = {}
|
|
||||||
|
|
||||||
target = docs.glossary
|
|
||||||
doc("G_Nominal", "Nominal", "")
|
|
||||||
doc("G_RCS", "RCS", "Reactor Cooling System: the combination of all machines used to cool the reactor.")
|
|
||||||
doc("G_RPS", "RPS", "Reactor Protection System: a component of the reactor PLC responsible for keeping the reactor safe.")
|
|
||||||
doc("G_Transient", "Transient", "")
|
|
||||||
doc("G_Trip", "Trip", "A checked condition has occurred, also known as 'tripped'.")
|
|
||||||
|
|
||||||
target = docs.annunc.unit.main_section
|
target = docs.annunc.unit.main_section
|
||||||
|
|
||||||
|
docs.glossary = {
|
||||||
|
abbvs = {}, terms = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
target = docs.glossary.abbvs
|
||||||
|
doc("G_ACK", "ACK", "Alarm ACKnowledge. This indicates you understand an alarm occured and would like to stop the audio tone(s).")
|
||||||
|
doc("G_CRD", "CRD", "Coordinator. Abbreviation for the coordinator computer.")
|
||||||
|
doc("G_DBG", "DBG", "Debug. Abbreviation for the debugging sessions from pocket computers found on the supervisor's front panel.")
|
||||||
|
doc("G_PKT", "PKT", "Pocket. Abbreviation for the pocket computer.")
|
||||||
|
doc("G_PLC", "PLC", "Programmable Logic Controller. A device that not only reports data and controls outputs, but also can make decisions on its own.")
|
||||||
|
doc("G_PPM", "PPM", "Protected Peripheral Manager. This is an abstraction layer created for this project that prevents peripheral calls from crashing applications.")
|
||||||
|
doc("G_RCP", "RCP", "Reactor Coolant Pump. This is from real-world terminology with water-cooled reactors, but in this system it just relates to the functioning of reactor coolant flow.")
|
||||||
|
doc("G_RCS", "RCS", "Reactor Cooling System. The combination of all machines used to cool the reactor.")
|
||||||
|
doc("G_RPS", "RPS", "Reactor Protection System. A component of the reactor PLC responsible for keeping the reactor safe.")
|
||||||
|
doc("G_RTU", "RTU", "Remote Terminal Unit. Provides monitoring to and basic output from a SCADA system, interfacing with various types of devices/controls.")
|
||||||
|
doc("G_SCADA", "SCADA", "Supervisory Control and Data Acquisition. A control systems architecture used in many different process control applications.")
|
||||||
|
doc("G_SVR", "SVR", "Supervisor. Abbreviation for the supervisory computer.")
|
||||||
|
|
||||||
|
target = docs.glossary.term
|
||||||
|
doc("G_Fault", "Fault", "Something has gone wrong and/or failed to function.")
|
||||||
|
doc("G_FrontPanel", "Front Panel", "A basic interface on the front of a device for viewing and sometimes modifying its state. This is what you see when looking at a computer running one of the SCADA applications.")
|
||||||
|
doc("G_Nominal", "Nominal", "Normal operation. Everything operating as intended.")
|
||||||
|
doc("G_Ringback", "Ringback", "An indication that an alarm had gone off so that you are aware, even if the alarm condition is no longer met.")
|
||||||
|
doc("G_SCRAM", "SCRAM", "Emergency shut-down of a reactor by stopping the fission reactor.")
|
||||||
|
doc("G_Transient", "Transient", "A temporary change in state from normal operation. Coolant levels dropping or core temperature rising above nominal values would be examples of transients.")
|
||||||
|
doc("G_Trip", "Trip", "A checked condition has occurred, also known as 'tripped'.")
|
||||||
|
doc("G_Tripped", "Tripped", "An alarm condition has been met and is still met.")
|
||||||
|
doc("G_Tripping", "Tripping", "An alarm condition is met but has not met the minimum time before a condition is deemed a problem.")
|
||||||
|
doc("G_TurbineTrip", "Turbine Trip", "The turbine stops, which prevents heated coolant from being properly cooled. In Mekanism, this would occur when a turbine cannot generate any more energy due to filling its buffer and having no output with any storage for energy left.")
|
||||||
|
|
||||||
return docs
|
return docs
|
||||||
|
Loading…
Reference in New Issue
Block a user