ClassesClasses | | Operators

get_message_paramget_message_paramGetMessageParamGetMessageParam (Operator)

Name

get_message_paramget_message_paramGetMessageParamGetMessageParam — Query message parameters or information about the message.

Signature

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

Herror get_message_param(const Hlong MessageHandle, const char* GenParamName, const char* Key, char* 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

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)

Description

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

With each call of get_message_paramget_message_paramGetMessageParamGetMessageParamGetMessageParam, 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":

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 GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue. 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 GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue, 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_tupleGetMessageTupleGetMessageTupleGetMessageTuple). Reports 'object'"object""object""object""object" for keys associated with object data (the data can be retrieved using get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObj). The results are reported via GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue, one value for each key. This parameter is useful to decide dynamically whether to use get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTuple or get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObj to get the data of a specific key.

Execution Information

Parameters

MessageHandleMessageHandleMessageHandleMessageHandlemessageHandle (input_control)  message HMessage, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Message handle.

Number of elements: MessageHandle == 1

Restriction: MessageHandle != 0

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  string HTupleHTupleHtuple (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"

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) HTupleHTupleHtuple (string) (string) (HString) (char*)

Message keys the parameter/query should be applied to.

Restriction: length(Key) > 0

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (output_control)  tuple(-array) HTupleHTupleHtuple (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_paramGetMessageParamGetMessageParamGetMessageParam returns 2 (H_MSG_TRUE). Otherwise an exception is raised.

Possible Predecessors

dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessage

See also

create_messagecreate_messageCreateMessageCreateMessageCreateMessage, clear_messageclear_messageClearMessageClearMessageClearMessage, set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleSetMessageTuple, get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTuple, set_message_objset_message_objSetMessageObjSetMessageObjSetMessageObj, get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObj, set_message_paramset_message_paramSetMessageParamSetMessageParamSetMessageParam, enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageEnqueueMessage, dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessage

Module

Foundation


ClassesClasses | | Operators