Task Manager XML Files
Task Manager XML Files
The default file name for the top level configuration file for the task manager is "global.xml". A minimum global.xml file looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<app apiPort="42420" maxglobaldata="1000" lockout="15" configFile=”global.xml”/>
<app chan="0" name="csiDataEngine" key="2" apiPort="42421" configFile="objects.xml"/>
<app chan="1" name="csiModbusEngine" key="3550" apiPort="42422" portType="1" portNum="0" cval="1000,502,20,0,0" configFile="server.xml"/>
<app chan="2" name="csiModbusEngine" key="3551" apiPort="42423" portType="1" portNum="1" cval="1000,502,20,1,0" configFile="server.xml"/>
Task Manager Attributes
apiPort="n" - The port on which the respective API should listen on is given as apiPort="n". The access is local only in production, but may be set to global as a build option using the switch found in taskmanager.h that will be part of all system application builds.
maxglobaldata="n" - specifies maximum number of data objects that will be configured for use by all applications.
lockout="n" - specifies the number of seconds that must elapse between NAND file writes of persistent data values. This is provided in order to prevent too-frequent writing of NAND Flash, which shortens the life of the memory.
configFile="xxx" – sets the file name that the task manager’s load and save requests will act on.
System/User Task Attributes
chan="n" - Channel number is 0..31 where system channel zero is always the data engine. There are 32 system channels and 32 user channels for data processing. The channel number is provided to system and user tasks as argv for use in creating unique error log names when multiple instances of the same executable will be run on the system.
name="xxx" - The executable that should be invoked as a Linux process is given as ‘name’.
key="n" - The key is an arbitrary value that is specific to the process, and generally will direct the process to select any applicable execution options or features.
apiPort="n" - Specifies the port that the Json listener is listening to.
portType="n" - Not to be confused with any API usage, this port is provided to communication engines for use as applicable. Refer to communication engine documentation. Port type is 0 for none, 1 for Ethernet, 2 for serial (tty).
portNum="n" - Provided to communication engines for their use. Valid port numbers for BB4-8422 are 0 or 1 for Ethernet, and 2 or 3 for serial (tty) ports.
alivePeriod="n" (Json “alivePeriod", integer) - This time period in seconds is how long the task manager will wait for this task to update its alive counter before killing and restarting this task. If set to zero, the alive check is disabled for this task. If set to a non-zero value, then the application must increment its alive counter within this time period to indicate to the task manager that it is still alive.
configFile="xxx" - This specifies a file name that will be parsed upon the task being issued the ‘load’ request, or saved upon being issued the ‘save’ request. The normal framework for application implementation is to retrieve configuration information from the task’s database, and only (optionally) parse an XML configuration file when requested to do so. This file should NOT be automatically parsed at startup because any changes made via the API following startup are stored in the database automatically, but only stored in the XML file if the user remembered to request saving the file.
cval="n1,n2,n3,n4,n5" - Used optionally for application specific purposes. The data engine does not currently use or require any cvals. Refer to specific applications for information regarding any use of cval’s. The Modbus engine, for example, does make use of the cvals. If provided, the cval attribute must consist of a series of 5 integer values separated by commas.