FUNCTION_BLOCK PUBLIC FINAL UDP_Peer EXTENDS LConC IMPLEMENTS IPeer
This function block activates a Peer by setting xEnable to TRUE.
A peer encapsulates all the necessary things for sending and receiving data over the UDP protocol. The output itfPeer can be contected with UDP_Receive, UDP_Receiver, UDP_Send and UDP_Sender.
The Send and Receive methods can also be used as an alternative to the related traditional function blocks.
Sending or receiving multicast telegrams is only possible if the input itfMulticast has been assigned accordingly with an IPAddressSet.
InOut:
|
Scope
|
Name
|
Type
|
Comment
|
Inherited from
|
Input
|
xEnable
|
BOOL
|
TRUE: Activates the defined operation FALSE: Aborts/resets the defined operation
|
LConC
|
Output
|
xBusy
|
BOOL
|
TRUE: Operation is running
|
LConC
|
xError
|
BOOL
|
TRUE: Error condition reached
|
LConC
|
eErrorID
|
ERROR
|
|
LConC
|
Input
|
itfAsyncProperty
|
IAsyncProperty
|
|
|
itfIPAddress
|
IIPAddress
|
IP Address of the specific Adpater for Receiving/Sending (The related Networkmask and Broadcast adresses for receiving will be calculated)
|
|
uiPort
|
UINT
|
Receive Port
|
|
itfMulticast
|
IIPAddressSet
|
One or more Multicast Groups (optional)
|
|
Output
|
xActive
|
BOOL
|
TRUE if the peer context is established
|
|
itfPeer
|
IPeer
|
The established context of this peer
Valid, as long xActive = TRUE
|
|
|