task_info

Gamma: Version 4.0
Prev |  | Next

# `task_info`

`task_info` -- gets information from a task descriptor.

## Syntax

    task_info (tsk)

## Arguments

`tsk`

  A task descriptor, as returned by the `locate_task` function.

## Returns

An instance of the class `TaskInfo`, or `nil` on failure.

## Description

This function returns an instance of Gamma's `TaskInfo` class. The instance variables of this class correspond to information contained in the task descriptor, as follows:

channel_id

  The channel ID number, which is used in QNX 6 but not in QNX 4 or Linux.

domain

  The name of the Cascade DataHub domain for the `tsk`.

name

  The name of the `tsk`, as recorded in the Cascade NameServer. This attribute is not contained in a task descriptor, and thus is always returned as `nil` from this function.

node_id

  The node ID number.

node_name

  The `node_id` expressed as a string.

pid

  The process ID number.

queue_name

  The name of the Cascade QueueServer queue, as registered with the Cascade NameServer.

queue_size

  The size of the Cascade QueueServer queue.

## Example

        Gamma> init_ipc("a", "aq");
        t
        Gamma> tsk = locate_task("/dh/toolsdemo", nil);
        #>Task:5394<
        Gamma> task_info(tsk);
        {TaskInfo (channel_id . 0) (domain . "toolsdemo") (name)
        (node_id . 0) (node_name . "0") (pid . 5394)
        (queue_name . "/dh/toolsde") (queue_size . 0)}
        Gamma>

## See Also

`nserve_query`

Prev | Home | Next
`taskdied`, `taskstarted` | Up | Events and Callbacks

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.