nserve_query

Gamma: Version 4.0
Prev |  | Next

# `nserve_query`

`nserve_query` -- puts information from nserve into an array.

## Syntax

    nserve_query ()

## Arguments

none

## Returns

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

## Description

This function retrieves all the information available in the Cascade NameServer (nserve), and puts it into an array. Each item in the array is an instance of the `TaskInfo` class, as returned from the function `task_info`. Please refer to the documentation of that function for more details.

| This function requires that `init_ipc` be called first.

## Example

        Gamma> init_ipc("a", "aq");
        t
        Gamma> pretty_princ(nserve_query(), "\n");
        [{TaskInfo (channel_id . 0) (domain . toolsdemo) (name . /dh/toolsdemo)
        	   (node_id . 0) (node_name . 0) (pid . 5394)
        	   (queue_name . /dh/toolsde) (queue_size . 0)}
         {TaskInfo (channel_id . 0) (domain . toolsdemo) (name . control)
        	   (node_id . 0) (node_name . 0) (pid . 16995)
        	   (queue_name . controlq) (queue_size . 0)}
         {TaskInfo (channel_id . 0) (domain . toolsdemo) (name . emul) (node_id . 0)
        	   (node_name . 0) (pid . 16998) (queue_name . emulq)
        	   (queue_size . 0)}
         {TaskInfo (channel_id . 0) (domain . default) (name . a) (node_id . 0)
        	   (node_name . 0) (pid . 16999) (queue_name . aq) (queue_size . 0)}]
        t
        Gamma>

See the Common: The Process Status display section of the Controller Functions chapter in the Cogent Tools Demo and Tutorials book for an example of this function used in context.

## See Also

`task_info`

Prev | Home | Next
`name_attach` | Up | `remove_hook`

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