Skip to content

send_xldSendXldSendXldsend_xldT_send_xld🔗

Short description🔗

send_xldSendXldSendXldsend_xldT_send_xld — Send an XLD object over a socket connection.

Signature🔗

send_xld( xld XLD, socket Socket )void SendXld( const HObject& XLD, const HTuple& Socket )static void HOperatorSet.SendXld( HObject XLD, HTuple socket )def send_xld( xld: HObject, socket: HHandle ) -> None

Herror T_send_xld( const Hobject XLD, const Htuple Socket )

void HSocket::SendXld( const HXLD& XLD ) const

void HXLD::SendXld( const HSocket& Socket ) const

void HSocket.SendXld( HXLD XLD )

void HXLD.SendXld( HSocket socket )

Description🔗

send_xldSendXld sends an XLD object over the socket connection determined by Socketsocketsocket. The receiving HALCON process must call receive_xldReceiveXld to read the XLD object from the socket.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

XLDXLDxld (input_object) xld(-array) → objectHObjectHXLDHObjectHobject

XLD object to be sent.

Socketsocketsocket (input_control) socket → (handle)HTuple (HHandle)HSocket, HTuple (IntPtr)HHandleHtuple (handle)

Socket number.

Example🔗

(HDevelop)

* Process 1
dev_set_colored (12)
open_socket_accept (3000, [], [], AcceptingSocket)
socket_accept_connect (AcceptingSocket, 'true', Socket)
receive_image (Image, Socket)
edges_sub_pix (Image, Edges, 'canny', 1.5, 20, 40)
send_xld (Edges, Socket)
receive_xld (Polygons, Socket)
split_contours_xld (Polygons, Contours, 'polygon', 1, 5)
gen_parallels_xld (Polygons, Parallels, 10, 30, 0.15, 'true')
send_xld (Parallels, Socket)
receive_xld (ModParallels, Socket)
receive_xld (ExtParallels, Socket)
stop ()
close_socket (Socket)
close_socket (AcceptingSocket)

* Process 2
dev_set_colored (12)
open_socket_connect ('localhost', 3000, [], [], Socket)
read_image (Image, 'mreut')
send_image (Image, Socket)
receive_xld (Edges, Socket)
gen_polygons_xld (Edges, Polygons, 'ramer', 2)
send_xld (Polygons, Socket)
split_contours_xld (Polygons, Contours, 'polygon', 1, 5)
receive_xld (Parallels, Socket)
mod_parallels_xld (Parallels, Image, ModParallels, ExtParallels, \
                   0.4, 160, 220, 10)
send_xld (ModParallels, Socket)
send_xld (ExtParallels, Socket)
stop ()
close_socket (Socket)

Combinations with other operators🔗

Combinations

Possible predecessors

open_socket_connectOpenSocketConnect, socket_accept_connectSocketAcceptConnect

See also

receive_xldReceiveXld, send_imageSendImage, receive_imageReceiveImage, send_regionSendRegion, receive_regionReceiveRegion, send_tupleSendTuple, receive_tupleReceiveTuple, get_next_socket_data_typeGetNextSocketDataType

Module🔗

Foundation