TxLoader

Downloads a task to the TX board.

Prototype

U32 TxLoader ( TXLOADER_DESC *desc)

Argument

Description

desc

Pointer to the following parameter structure that controls the loading and execution of the task:

/* Loader description structure */
typedef struct {
U8      debug;         /* Debug level                                   */
U8      priority;      /* Task priority                                 */
U8      cp;            /* Communications processor (TX board) number    */
U8      avail[5];      /* For future use                                */
U32     exopts;        /* Task execution options                        */
U32     stack_size;    /* Task stack size                               */
S8      taskname[10];  /* Name of task                                  */
S8      loadfile[128]; /* Filename containing binary image of the task  */
S8      cmdline[128];  /* Optional command line string                  */
S8      *descrip;      /* Pointer to 80 byte array for description      */
U32     status;        /* Completion status                             */
U8      reserved[128]; /* Reserved for future use                       */
} TXLOADER_DESC;

Refer to the Details section for field descriptions.


Details

The following table describes the TXLOADER_DESC fields:

Name

Type

Description

debug

U8

Level of debug messages returned.

0 = No debug output

1 = Limited debug output

2 = Standard debug output

3 = Verbose debug output

priority

U8

Priority at which the task executes. Allowed values are from 1 through 31, with 1 being the highest priority. Refer to the Task executable list to determine the priority to use.

cp

U8

Communications processor (TX board) number. Specifies which TX board to load the task on in multi-board systems. Valid values are 1 through 16.

avail

U8[5]

Not currently used. Zero-fill for future backwards compatibility.

exopts

U32

Execution options. Internal flags used for debugging. Set to 0.

Note: Some downloadable tasks use execution options to control task-specific behavior; other tasks use command line strings to control behavior. Set execution options only if specifically indicated for the given downloaded task.

stack_size

U32

Size of the stack used for task execution. Minimum value is 4096 (default). The default is sufficient for most tasks. Tasks requiring additional stack space are noted in the Task executable list.

taskname

S8[16]

Name of the task. Refer to the Task executable list to determine the name to use. Must be null terminated.

Note: The TX operating system currently limits task names to 8 characters.

loadfile

S8[128]

Filename containing the binary image of the task. This is a pointer to a null-terminated string containing the filename. If the file to be loaded is not in the path variable, the filename must be fully qualified.

cmdline

S8[128]

Optional command line string. Normally, set [0] = 0 to indicate no command line string.

Note: Certain downloadable tasks use execution options to control task-specific behavior; other tasks use command line strings to control behavior. Set command line options only if specifically indicated for the given downloaded task.

descrip

S8[128]

An area where a task information string is stored upon successful task download or where an error description string is stored upon failed task download.

status

U32

Completion status (0 if task loaded successfully; otherwise an error code). Refer to Return values.

reserved

U8[128]

Reserved for future use.