Col_send_init

Synopsis

    
    #include "collect.h"
    send_id Col_send_init(const char *name, void *data, unsigned short size);
    int Col_send(send_id sender);
    int Col_send_reset(send_id sender);
    

Description

These functions define the standard approach for sending data to collection. This is necessary whenever an auxilliary program is generating data which needs to be fed into the telemetry frame.

Col_send_init() initializes the connection, creating a data structure to hold all the details. The name string must match the name specified in the corresponding 'TM "Receive"' statement in the collection program. Data points to where the data will be stored, and size specifies the size of the data.

Whenever the data is updated, Col_send() should be called to forward the data to collection.

On termination, Col_send_reset() may be called to provide an orderly shutdown.

Returns

Col_send_init() returns a pointer to a structure which holds the state of the connection. This pointer must be passed to Col_send() or Col_send_reset(). On error, Col_send_init() will return NULL unless nl_response indicates a fatal response.

Col_send() returns 0 on success, non-zero otherwise. Failure of the send is quiet, but causes an error return.

Col_send_reset() returns 0 on success, non-zero otherwise. It does not issue any diagnostic messages, since failure is expected to be fairly common (Collection may quit before we get around to our termination.)

See Also

Data Collection functions.

Source File

/usr/local/src/nortlib/colsend.c

Alphabetical List
Subject List
Return to Manuals Page
webmaster@huarp.harvard.edu
Copyright 2001 by the President and Fellows of Harvard College