ToolTalk User's Guide

Replying to Requests

When you reply to a request, you need to:

  1. Perform the requested operation.

  2. Fill in any argument values with modes of TT_OUT or TT_INOUT.

  3. Send the reply to the message.

    Table 11–2 lists the ToolTalk functions you use to reply to requests.

    Table 11–2 Functions to Reply to Requests

    ToolTalk Function 

    Description 

    tt_message_arg_mode(Tt_message m, int n)

    The argument mode (in, out, inout). Return type is Tt_mode.

    tt_message_arg_bval_set(Tt_message m, int n, const unsigned char *value, int len)

    Sets an argument's value to the specified byte array. Return type is Tt_status.

    tt_message_arg_ival_set(Tt_message m, int n, int value)

    Sets an argument's value to the specified integer. Return type is Tt_status.

    tt_message_arg_val_set(Tt_message m, int n, const char *value)

    Sets an argument's value to the specified string. Return type is Tt_status.

    tt_message_arg_xval_set(Tt_message m, int n, xdrproc_t xdr_proc, void *value)

    Return type is Tt_status.

    tt_message_context_set(Tt_message m, const char *slotname, const char *value);

    Sets a context to the specified string. Return type is Tt_status.

    tt_message_bcontext_set(Tt_message m, const char *slotname, unsigned char *value, int length);

    Sets a context to the specified byte array. Return type is Tt_status.

    tt_message_icontext_set(Tt_message m, const char *slotname, int value);

    Sets a context to the specified integer. Return type is Tt_status.

    tt_message_xcontext_set(Tt_message m, const char *slotname, xdrproc_t xdr_proc, void *value)

    Return type is Tt_status.

    tt_message_reply(Tt_message m)

    Replies to message. Return type is Tt_status.