Standard Tasks
- Luke Cerwin
NtRtMgr
The NtRtMgr is the primary manager task of the Tsentry system. It provides the following services:
Allocate data dictionary global shared memory region
Populate memory resident data dictionary with disk resident information
Allocate global shared memory regions
Initialize and restore contents of global shared memory regions
Start and monitor all process tasks
Display current status of all process tasks
Display recent contents of LogMsg message queue
Start/Restart/Suspend/Stop/Configure processes via console window
Shutdown system when requested
The Tsentry system can be started by executing the NtRtMgr task and passing the name of the system initialization file.
The following configuration files control the operation of the startup task:
System initialization file
Process initialization file
Data dictionary definition file
Data dictionary variable initialization file
LogMsg initialization file
“Nt-” as in 'Nt-Example' is an NtRtMgr Setup sub doc
This system initialization file defines:
The remaining fully qualified initialization file names to be used by the startup process:
Process initialization file
Data dictionary definition file
Data dictionary variable initialization file
LogMsg initialization file
System-wide and application parameters
An example file follows:
# ------------------------------------------------------------------------
# A Foil Mill Initialization File
[IniFiles]
#define the Data Dictionary Structure definition file
DDStruct=d:\locNtRt\afm\pif\afmStruct.ini
#define the Data Dictionary variables definition file
DDVars=d:\locNtRt\afm\pif\afmVars.ini
#define the process definition file
Procs=d:\locNtRt\afm\pif\afmProcs.ini
[AppParams]
# System Name
SystemName=A Foil Mill
# Shutdown executable
ShutdownExe=d:\locNtRt\tpriNtRt\bin\NtRtStop.exe
# Splash screen picture file
SplashPicture=d:\locNtRt\afm\Pif\afmLogo.bmp
# GUI Options: '&'-delimited list of one of more of the following strings:
# NoConsole Do not display the NtRtMgr screen
# NoStopSystem Do not allow the interactive user to stop the NtRtMgr
# NoExecProcess Do not allow the interactive user to
# start/stop/suspend/resume processes
# NoEditProcess Do not allow the user to edit process parameters
# NoProcessMenu Do not display any menu via right clicks on the
# process list
# NoConsoleLogMsg Do not allow the user to insert LogMsgs from the console
# TrayIcon Minimize the NtRtMgr screen to a tray icon
GuiOptions=
# Option not to query if system should kill existing processes on startup
#QueryKillExistingProcesses=No
# Directory for NtRtCmd files
NtRtCmdPath=D:\locNtRt\afm\NtRtCmd\
# ------------------------------------------------------------------------
This configuration file controls which processes will be started as part of the real-time control system. The fully qualified file name is passed to the startup process as the first command line parameter. An example process.ini file that contains line format definitions as comments follows:
# -------------------------------------------------------------------------------
[Process]
# This is the process.ini file for the Application system.
# This file is read by the startup process at system startup.
# Processes are started in the order they are listed in this file.
# This file is also read by each process at startup (by method PrIni)
#
# The format of the process.ini file is as follows:
#
# Lines beginning with a "#" are comments
#
# AppName - Application name of the process that is to be run.
#
# BinName - Fully qualified system executable binary file name of
# the process associated with AppName
#
# Uses NtRt - Flag indicating if this process uses the tpriNtRt library
# for process management
#
# Priority - the priority that the task is supposed to run at.
# Options for Priority are:
# 0 - 15 Standard Windows NT dynamic priority (mode=Std)
# 0 = lowest
# 15 = Highest
# 16 - 31 Standard Windows NT realtime priority (mode=Std)
# 16 = Lowest
# 31 = Highest
# 0 -127 Hard Real-Time (mode=Rt)
# 0 = Lowest
# 127= Highest
#
# Timer Delay - Initial Timer delay (milliseconds) before first
# execution. Zero if no timer specified.
#
# Timer Interval - RepRate Timer Interval in milliseconds.
# Zero if no timer specified.
#
# Run Mode - indicates whether a task is to run as "standard" or
# "realtime" process.
#
# Auto-Restart - "yes" or "no"; specifies if the process is to be
# automatically restarted should it is unexpectedly
# terminated.
#
# MemLock - Lock in memory option
# "yes" indicates locked in memory
# "no" indicates not locked in memory
# All Hard Real-Time processes are always
# locked in memory.
#
# Trap Crash - Combination of character flags specifying how process
# crashes/exceptions should be handled
# N = Default handling (windows displays message box)
# T = Terminate process
# D = Log description
# S = Try to find symbol and source line
# W = Walk back along stack and dump info
# R = Dump register values
# Y = Default 'Yes' = Same as 'TDS'
#
# Debug Mode - Debug mode / level. Values are process dependent.
# Normally lower values indicate less debug and logging
# Higher values indicate more debug and logging
#
# Startup Delay - Defines delay time (milliseconds) before starting
# this process. A negative value indicates that this
# process should not be automatically started at system
# startup.
# Negative Startup Delay's are (usually) used for the
# startup process itself and for any demand process
# that needs to run periodically, but not when
# the system is started.
#
# Init Wait - Defines the delay time (milliseconds) to allow for
# this process to initialize itself before proceeding
# to the next process in the list.
#
# Kill Wait - Defines the delay time (milliseconds) to allow for
# this process to react to a deactivation request and
# gracefully exit before it is forced to terminate.
# Negative times indicate that the process will never
# be terminated without its permission.
#
# Pulse Timeout - Defines the timeout (milliseconds) for the process
# pulse. Every time the process calls PrWait it resets
# an internal timer to this value. The NtRtPulse
# decrements this timer and kills the process if it
# expires.
#
# CTail Command tail to be passed to the process
# This parameter is optional
# If the command tail is supplied, it must
# be enclosed in double quotes
#
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
#
# GroupName Init
# Active
#
# ---------------------------------------------------------------------------
[AppGroups]
Application Y
# ---------------------------------------------------------------------------
#
# AppName BinName Uses Prty Tmr Rep Run Re- Mem Trp Dbg StUp Init Kill Pls CTail
# (FileName) NtRt Dly Rate Mod strt Lck Crs Lvl Dly Wait Wait TO
#
[System]
NtRtMgr D:\xx\NtRtMgr.exe Y 10 500 500 Std No Y N 30 0 0 -1 0
NtRtMtr D:\xx\NtRtMtr.exe Y 31 10 10 Std Yes Y T 30 0 0 -1 0
RtxTcpip C:\ww\rtxtcpip.rtss N 120 1000 1000 Rt No Y T 0 -1 0 500 0 "zz.ini"
GsmOpcSvr D:\xx\GsmOpcSvr.exe Y 10 500 500 Std No Y T 30 0 0 5000 0
TrendMgr D:\xx\TrendMgr.exe Y 10 200 200 Std No Y T 30 -1 3000 3000 0 "zz.ini"
TrendGsm D:\xx\TrendGsm.rtss Y 20 20 20 Rt Yes Y T 30 -1 5000 5000 0 "zz.ini"
TrendSrv D:\xx\TrendSrv.exe Y 10 1000 1000 Std Yes Y T 30 -1 0 5000 0
[Application]
# Insert each of the application processes here
RTSSTask D:\yy\RTSSTask.rtss Y 20 100 100 Rt No Y A 30 0 5000 5000 2000
W32Task D:\yy\Win32Task.exe Y 8 100 100 Std No Y A 30 0 0 5000 2000
# ---------------------------------------------------------------------------
This is the first of two files used by the NtRtMgr to initialize the data dictionary. It is the output of the data dictionary builder process GsmPifBld, which parses the C/C++ global common header files to generate this flat ASCII definition of shared memory. For most purposes you do not need to examine the contents of this file. It is further described in the Data Dictionary section.
NtRtSvc
NtRtStop
NtRtMtr
ProbeSvr
GsmOpcSvr
External Links
VarIniChk
VarIniSort
tpriNtRtAdmin
TpriPublisher
© 2022 TelePro, Inc.
3811 Illinois Avenue, Suite 100, St. Charles, IL 60174