Port.FdSet (METH) ¶ METHOD FdSet Adds the port’s socket to the file descriptor set InOut: Scope Name Type Inout socketFD_SET SysSocket.SOCKET_FD_SET
Port.GetOption (METH) ¶ METHOD GetOption : SysTypes.RTS_IEC_RESULT Sets an option on the socket InOut: Scope Name Type Comment Return GetOption SysTypes.RTS_IEC_RESULT Input diSockOption DINT Option to get pdiOption POINTER TO DINT Return value of option
Port.IoControl (METH) ¶ METHOD IoControl : SysTypes.RTS_IEC_RESULT Executes a command on the socket InOut: Scope Name Type Comment Return IoControl SysTypes.RTS_IEC_RESULT Input diCommand DINT Command to execute pdiParam POINTER TO DINT Command result
Port.SetOption (METH) ¶ METHOD SetOption : SysTypes.RTS_IEC_RESULT Sets an option on the socket InOut: Scope Name Type Comment Return SetOption SysTypes.RTS_IEC_RESULT Input diSockOption DINT Option to set pdiOptionValue POINTER TO DINT Value of option diOptionLength DINT Length of the option value
Port (FB) ¶ FUNCTION_BLOCK Port Represent a UDP Port, which is managed (opened and closed) by an UDPDriver. Properties: IPAddress ReceivePort SendPort Socket Methods: Receive Receive2 Send Bind FdIsSet FdSet GetOption IoControl JoinGroup LeaveGroup SetInterface SetOption Structure: Multicast JoinGroup (Method) LeaveGroup (Method) SetInterface (Method) Properties IPAddress (Property) ReceivePort (Property) SendPort (Property) Socket (Property) Receive (Method) Receive2 (Method) Send (Method) Socket Bind (Method) FdIsSet (Method) FdSet (Method) GetOption (Method) IoControl (Method) SetOption (Method)
Multicast ¶ JoinGroup (Method) LeaveGroup (Method) SetInterface (Method)
Properties ¶ IPAddress (Property) ReceivePort (Property) SendPort (Property) Socket (Property)
Port.Receive (METH) ¶ METHOD Receive : SysTypes.RTS_IEC_RESULT Tries to receive data from a socket; returns ERR_PENDING if there is no data to receive InOut: Scope Name Type Comment Return Receive SysTypes.RTS_IEC_RESULT Input pbyData POINTER TO BYTE Pointer to receive buffer diDataSize __XINT Size of the receive buffer Output udiIPFrom UDINT IP Address of the sender uiPortFrom UINT Destination Port diRecvSize __XINT Size of the received data eLogCode ErrorCode
Port.Receive2 (METH) ¶ METHOD Receive2 : SysTypes.RTS_IEC_RESULT Tries to receive data from a socket; returns ERR_PENDING if there is no data to receive InOut: Scope Name Type Comment Return Receive2 SysTypes.RTS_IEC_RESULT Input pbyData POINTER TO BYTE Pointer to receive buffer diDataSize __XINT Size of the receive buffer Output udiIPFrom UDINT IP Address of the sender uiPortFrom UINT Destination Port diRecvSize __XINT Size of the received data eSocketType SocketType eLogCode ErrorCode
Port.Send (METH) ¶ METHOD Send : SysTypes.RTS_IEC_RESULT Sends data to sIPAddressTo and uiPortTo InOut: Scope Name Type Comment Return Send SysTypes.RTS_IEC_RESULT Input udiIPTo UDINT Addr of the receiver uiPortTo UINT OPTIONAL: Port to send the data to (Property SendPort is the default) pbyData POINTER TO BYTE Pointer to user data diDataSize __XINT Size of the user data Output diSent __XINT Number of Bytes that have been sent eLogCode ErrorCode