Operator Reference

read_messageT_read_messageReadMessageReadMessageread_message (Operator)

read_messageT_read_messageReadMessageReadMessageread_message — Read a message from a file.

Signature

Herror T_read_message(const Htuple FileName, const Htuple GenParamName, const Htuple GenParamValue, Htuple* MessageHandle)

void ReadMessage(const HTuple& FileName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* MessageHandle)

void HMessage::HMessage(const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue)

void HMessage::HMessage(const HString& FileName, const HString& GenParamName, const HString& GenParamValue)

void HMessage::HMessage(const char* FileName, const char* GenParamName, const char* GenParamValue)

void HMessage::HMessage(const wchar_t* FileName, const wchar_t* GenParamName, const wchar_t* GenParamValue)   ( Windows only)

void HMessage::ReadMessage(const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue)

void HMessage::ReadMessage(const HString& FileName, const HString& GenParamName, const HString& GenParamValue)

void HMessage::ReadMessage(const char* FileName, const char* GenParamName, const char* GenParamValue)

void HMessage::ReadMessage(const wchar_t* FileName, const wchar_t* GenParamName, const wchar_t* GenParamValue)   ( Windows only)

static void HOperatorSet.ReadMessage(HTuple fileName, HTuple genParamName, HTuple genParamValue, out HTuple messageHandle)

public HMessage(string fileName, HTuple genParamName, HTuple genParamValue)

public HMessage(string fileName, string genParamName, string genParamValue)

void HMessage.ReadMessage(string fileName, HTuple genParamName, HTuple genParamValue)

void HMessage.ReadMessage(string fileName, string genParamName, string genParamValue)

def read_message(file_name: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[int, float, str]]) -> HHandle

Description

read_messageread_messageReadMessageReadMessageread_message reads a message that has been stored with write_messagewrite_messageWriteMessageWriteMessagewrite_message. The default HALCON file extension for a message is 'hmsg'.

Execution Information

  • Multithreading type: independent (runs in parallel even with exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

FileNameFileNameFileNamefileNamefile_name (input_control)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

File name.

File extension: .hmsg

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Name of the generic parameter.

Default: []

List of values: 'name'"name""name""name""name"

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.name(-array) HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Value of the generic parameter.

Default: []

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

Message handle.

Number of elements: MessageHandle == 1

Assertion: MessageHandle != 0

Result

If the parameters are valid, the operator read_messageread_messageReadMessageReadMessageread_message returns the value 2 ( H_MSG_TRUE) . If necessary an exception is raised.

Possible Predecessors

write_messagewrite_messageWriteMessageWriteMessagewrite_message

See also

write_messagewrite_messageWriteMessageWriteMessagewrite_message, serialize_handleserialize_handleSerializeHandleSerializeHandleserialize_handle, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandledeserialize_handle

Module

Foundation