get_message_paramT_get_message_paramGetMessageParamGetMessageParamget_message_param (Operator)

Name

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_paramGetMessageParamGetMessageParamGetMessageParamget_message_param queries current values of message parameters or other information about the message status.

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

Key-independent (global) parameter names:

'message_keys'"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 GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value. For this query the parameter KeyKeyKeyKeykeykey must be an empty tuple.

Currently supported key-specific parameter names are:

'key_exists'"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 GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value, one value for each key.

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

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

Execution Information

Parameters

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

Message handle.

Number of elements: MessageHandle == 1

Restriction: MessageHandle != 0

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

Names of the message parameters or info queries.

Number of elements: GenParamName == GenParamValue

Default value: 'message_keys' "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_data_type", 'key_exists'"key_exists""key_exists""key_exists""key_exists""key_exists", 'message_keys'"message_keys""message_keys""message_keys""message_keys""message_keys"

KeyKeyKeyKeykeykey (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.

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_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_paramGetMessageParamGetMessageParamGetMessageParamget_message_param returns 2 (H_MSG_TRUE). Otherwise an exception is raised.

Possible Predecessors

dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessagedequeue_message

See also

create_messagecreate_messageCreateMessageCreateMessageCreateMessagecreate_message, clear_messageclear_messageClearMessageClearMessageClearMessageclear_message, set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleSetMessageTupleset_message_tuple, get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTupleget_message_tuple, set_message_objset_message_objSetMessageObjSetMessageObjSetMessageObjset_message_obj, get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObjget_message_obj, set_message_paramset_message_paramSetMessageParamSetMessageParamSetMessageParamset_message_param, enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageEnqueueMessageenqueue_message, dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessagedequeue_message

Module

Foundation