Operator Reference

get_message_paramT_get_message_paramGetMessageParamGetMessageParamget_message_param (Operator)

get_message_paramT_get_message_paramGetMessageParamGetMessageParamget_message_param — Query message parameters or information about the message.

Signature

get_message_param( : : MessageHandle, GenParamName, Key : GenParamValue)

Herror T_get_message_param(const Htuple MessageHandle, const Htuple GenParamName, const Htuple Key, Htuple* GenParamValue)

void GetMessageParam(const HTuple& MessageHandle, const HTuple& GenParamName, const HTuple& Key, HTuple* GenParamValue)

HTuple HMessage::GetMessageParam(const HString& GenParamName, const HTuple& Key) const

HTuple HMessage::GetMessageParam(const HString& GenParamName, const HString& Key) const

HTuple HMessage::GetMessageParam(const char* GenParamName, const char* Key) const

HTuple HMessage::GetMessageParam(const wchar_t* GenParamName, const wchar_t* Key) const   ( Windows only)

static void HOperatorSet.GetMessageParam(HTuple messageHandle, HTuple genParamName, HTuple key, out HTuple genParamValue)

HTuple HMessage.GetMessageParam(string genParamName, HTuple key)

HTuple HMessage.GetMessageParam(string genParamName, string key)

def get_message_param(message_handle: HHandle, gen_param_name: str, key: MaybeSequence[Union[str, int]]) -> Sequence[Union[int, float, str]]

def get_message_param_s(message_handle: HHandle, gen_param_name: str, key: MaybeSequence[Union[str, int]]) -> Union[int, float, str]

Description

get_message_paramget_message_paramGetMessageParamGetMessageParamget_message_param queries current values of message parameters or other information about the message status.

With each call of get_message_paramget_message_paramGetMessageParamGetMessageParamget_message_param, only a single parameter value can be queried. However, there are two types of parameters/queries:

  • Parameters/queries applicable to the entire message. In this case no keys must be specified, the parameter KeyKeyKeykeykey must be an empty tuple.

  • Parameters/queries applicable to the individual keys. In this case a non-empty list of keys must be specified in the parameter KeyKeyKeykeykey. The keys are processed in the same order as specified in the KeyKeyKeykeykey parameter.

Key-independent (global) parameter names:

'message_keys'"message_keys""message_keys""message_keys""message_keys":

Queries all the keys stored in the message, no matter whether they are associated with tuple or object data. The list of keys is reported as a string tuple via GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value. For this query the parameter KeyKeyKeykeykey must be an empty tuple.

Currently supported key-specific parameter names are:

'key_exists'"key_exists""key_exists""key_exists""key_exists":

Reports 1 if the given key is stored in the message, 0 otherwise. The results are reported via GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value, one value for each key.

'key_data_type'"key_data_type""key_data_type""key_data_type""key_data_type":

Reports 'tuple'"tuple""tuple""tuple""tuple" for keys associated with tuple data within the message (the data can be retrieved using get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleget_message_tuple). Reports 'object'"object""object""object""object" for keys associated with object data (the data can be retrieved using get_message_objget_message_objGetMessageObjGetMessageObjget_message_obj). The results are reported via GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value, one value for each key. This parameter is useful to decide dynamically whether to use get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleget_message_tuple or get_message_objget_message_objGetMessageObjGetMessageObjget_message_obj to get the data of a specific key.

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

MessageHandleMessageHandleMessageHandlemessageHandlemessage_handle (input_control)  message HMessage, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Message handle.

Number of elements: MessageHandle == 1

Restriction: MessageHandle != 0

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Names of the message parameters or info queries.

Number of elements: GenParamName == GenParamValue

Default: 'message_keys' "message_keys" "message_keys" "message_keys" "message_keys"

List of values: 'key_data_type'"key_data_type""key_data_type""key_data_type""key_data_type", 'key_exists'"key_exists""key_exists""key_exists""key_exists", 'message_keys'"message_keys""message_keys""message_keys""message_keys"

KeyKeyKeykeykey (input_control)  string(-array) HTupleMaybeSequence[Union[str, int]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Message keys the parameter/query should be applied to.

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 message parameters or info queries.

Example (HDevelop)

get_message_param (Message, 'message_keys', [], AllKeys)
get_message_param (Message, 'key_data_type', AllKeys, KeysType)

Result

If all the operator parameters, and the specified keys are valid, get_message_paramget_message_paramGetMessageParamGetMessageParamget_message_param returns 2 ( H_MSG_TRUE) . Otherwise an exception is raised.

Possible Predecessors

dequeue_messagedequeue_messageDequeueMessageDequeueMessagedequeue_message

See also

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, set_message_paramset_message_paramSetMessageParamSetMessageParamset_message_param, enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageenqueue_message, dequeue_messagedequeue_messageDequeueMessageDequeueMessagedequeue_message

Module

Foundation