Important

   

This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.1 for BMC Helix Operations Management. Open link

response_get_value()

Retrieve a return value from the elements of a dynamic response() function dialog box.

Syntax 

response_get_value(rid,[polltype])


Parameter

Parameter

Definition

rid

identifier of the response() function dialog box from which it gets values The response() function returns an rid instead of an element return value the first time it is executed with the D=1 preference specified. For more information on the D preference, see response() Function Preferences.

polltype

polling type the response_get_value() function uses to acquire the return value of the dialog box identified by rid*Valid Values* 
0 block the current PSL process and wait for the dialog box to return a value 
1 poll the queue of return values from response() function dialog boxes and return the most recent return value that is queued for rid*Default* 
0

Description

The response_get_value() function retrieves the most recent return value for the response() function dialog box identified by rid. Depending on the value of polltype, the response_get_value() function will either block the current PSL process and wait for a return value or will poll a queue of return values and retrieve the most recent return value for rid

The response_get_value() function is required to get the values of the elements for a dynamic response() function dialog box because a dynamic response() function dialog box does not return element values when it is created, updated, or closed. The dynamic response() function only returns operation status values. 

The response_get_value() function returns one of the following errno values on failure:

errno Value

Description

84

E_PSL_RESPONSE_NO_VALUE 
dialog is gone and no queued values are available

84

E_PSL_RESPONSE_NO_VALUE 
no data is available for a non-blocking call

93

E_PSL_NO_SUCH_ID 
invalid response ID was specified

128

E_PSL_ALREADY_WAITING 
another process is waiting on the ID

Blocking for a response() Function Return Value

Specifying polltype = 0 causes the response_get_value() function to block the PSL process from which it is called and wait for a return value from the response() function dialog box identified by rid. There is no timeout value for theresponse_get_value() function in blocking mode, the function must receive a return value from the response() function dialog box identified by rid

A dynamic response() function dialog box returns a value each time the o (Accept) or c (Cancel) button on the dialog box is clicked or when the dialog box is closed.

Polling for a response() Function Return Value

Specifying polltype = 1 causes the response_get_value() function to query a queue that contains return values from allresponse() function dialog boxes:

  • If rid has an invalid format, the response_get_value() function returns the NULL string and produces a PSL run-time error message ( errno = 93).
  • If rid has a valid format but the response() function dialog box is still active and has no return values in the queue, the response_get_value() function returns the NULL string and produces a PSL run-time error message ( errno= 84).
  • If rid has a valid format but the response() function dialog box is no longer active and has no more return values in the queue, the response_get_value() function returns the NULL string and produces a PSL run-time error message ( errno = 84).
  • If rid has a valid format and the response() function dialog box is active and has returned one or more return values to the queue, the response_get_value() function returns the most recent of the return values for rid and removes it from the queue.
Was this page helpful? Yes No Submitting... Thank you

Comments