read_messageT_read_messageReadMessageReadMessage (Operator)


read_messageT_read_messageReadMessageReadMessage — Read a message from a file.


read_message( : : FileName, GenParamName, GenParamValue : MessageHandle)

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)


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

Execution Information

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.


FileNameFileNameFileNameFileNamefileName (input_control) HTupleHTupleHtuple (string) (string) (HString) (char*)

File name.

File extension: .hmsg

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control) HTupleHTupleHtuple (string) (string) (HString) (char*)

Name of the generic parameter.

Default value: []

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

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control) HTupleHTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Value of the generic parameter.

Default value: []

MessageHandleMessageHandleMessageHandleMessageHandlemessageHandle (output_control)  message HMessage, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Message handle.

Number of elements: MessageHandle == 1

Assertion: MessageHandle != 0


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

Possible Predecessors


See also

write_messagewrite_messageWriteMessageWriteMessageWriteMessage, serialize_handleserialize_handleSerializeHandleSerializeHandleSerializeHandle, deserialize_handledeserialize_handleDeserializeHandleDeserializeHandleDeserializeHandle