get_message_queue_paramT_get_message_queue_paramGetMessageQueueParamGetMessageQueueParamget_message_queue_param (Operator)
Name
get_message_queue_paramT_get_message_queue_paramGetMessageQueueParamGetMessageQueueParamget_message_queue_param
— Query message queue parameters or information about the queue.
Signature
Description
get_message_queue_paramget_message_queue_paramGetMessageQueueParamGetMessageQueueParamget_message_queue_param
queries current values of message
queue parameters or other information about the queue status.
Multiple queries can be carried out with a single
get_message_queue_paramget_message_queue_paramGetMessageQueueParamGetMessageQueueParamget_message_queue_param
call, passing multiple parameter names
to parameter GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
. The parameter values are returned
in GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
in the same order as the parameter names
requested by the caller.
Currently, following parameter names are supported:
- 'is_empty'"is_empty""is_empty""is_empty""is_empty":
-
Returns 1 if the queue is empty, 0 otherwise.
- 'message_num'"message_num""message_num""message_num""message_num":
-
Returns the number of messages currently stored in the queue.
- 'max_message_num'"max_message_num""max_message_num""max_message_num""max_message_num":
Returns the current value of the 'max_message_num'"max_message_num""max_message_num""max_message_num""max_message_num" parameter
of the message queue, as it was set using
set_message_queue_paramset_message_queue_paramSetMessageQueueParamSetMessageQueueParamset_message_queue_param
.
The default value -1 stands for no limit.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
QueueHandleQueueHandleQueueHandlequeueHandlequeue_handle
(input_control) message_queue →
HMessageQueue, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Message queue handle.
Number of elements:
QueueHandle == 1
Restriction:
QueueHandle != 0
GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name
(input_control) string(-array) →
HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Names of the queue parameters or info queries.
Number of elements:
GenParamName == GenParamValue
Default:
'max_message_num'
"max_message_num"
"max_message_num"
"max_message_num"
"max_message_num"
List of values:
'is_empty'"is_empty""is_empty""is_empty""is_empty", 'max_message_num'"max_message_num""max_message_num""max_message_num""max_message_num", 'message_num'"message_num""message_num""message_num""message_num"
GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
(output_control) tuple(-array) →
HTupleSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
Values of the queue parameters or info queries.
Number of elements:
GenParamName == GenParamValue
Example (HDevelop)
create_message_queue (QueueHandle)
set_message_queue_param ( QueueHandle, 'max_message_num', 10)
* ...
get_message_queue_param( QueueHandle, 'message_num', Num)
Result
If all the operator parameters are valid, get_message_queue_paramget_message_queue_paramGetMessageQueueParamGetMessageQueueParamget_message_queue_param
returns 2 (
H_MSG_TRUE)
. Otherwise an exception is raised.
Possible Predecessors
create_message_queuecreate_message_queueCreateMessageQueueCreateMessageQueuecreate_message_queue
,
enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageenqueue_message
,
dequeue_messagedequeue_messageDequeueMessageDequeueMessagedequeue_message
See also
create_message_queuecreate_message_queueCreateMessageQueueCreateMessageQueuecreate_message_queue
,
clear_message_queueclear_message_queueClearMessageQueueClearMessageQueueclear_message_queue
,
enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageenqueue_message
,
dequeue_messagedequeue_messageDequeueMessageDequeueMessagedequeue_message
,
set_message_queue_paramset_message_queue_paramSetMessageQueueParamSetMessageQueueParamset_message_queue_param
,
create_messagecreate_messageCreateMessageCreateMessagecreate_message
,
clear_messageclear_messageClearMessageClearMessageclear_message
,
set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleset_message_tuple
,
get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleget_message_tuple
,
set_message_objset_message_objSetMessageObjSetMessageObjset_message_obj
,
get_message_objget_message_objGetMessageObjGetMessageObjget_message_obj
Module
Foundation