get_message_obj — 从消息中检索与键关联的对象。
get_message_obj( : ObjectData : MessageHandle, Key : )
get_message_obj retrieves an object associated with the Key
from the message denoted by the MessageHandle.
The object has to be previously stored to the message using
set_message_obj。
The operator returns the data in the parameter ObjectData. The
iconic object is copied by the operation. Therefore, clearing or reusing
the message object afterwards will not have any side-effect on the returned
iconic object, afterwards.
If the given Key is not present in the message or if the data
associated with the key is not an object, get_message_obj fails.
Presence of keys and information about the data associated with the key can
be verified using get_message_param。
ObjectData (输出对象) object(-array) → object
Tuple value retrieved from the message.
MessageHandle (输入控制) message → (handle)
Message handle.
元素数量: MessageHandle == 1
限制:
MessageHandle != 0
Key (输入控制) string → (string / integer)
Key string or integer.
元素数量: Key == 1
* ...
get_message_param (Message,'key_exists',['simple_string','foo','my_image'],\
KeysPresence)
get_message_param (Message,'key_data_type',['simple_string','my_image'],\
KeysType)
get_message_obj (Image, Message, 'my_image')
If the operation succeeds, get_message_obj 返回 2 ( H_MSG_TRUE )。否则将抛出异常。 Possible error conditions include
invalid parameters (handle or key), the required key not found in the
message or other than object data associated with given key.
create_message,
clear_message,
set_message_tuple,
get_message_tuple,
set_message_obj,
set_message_param,
get_message_param,
enqueue_message,
dequeue_message
基础