IRMPService.Receive (METH)ΒΆ

METHOD Receive : UDINT

This method is called by each module that is able to receive a message it takes the oldest received message for uiReceiverID and acknowledges it. Returns 16#FFFFFFFF if there is no message waiting for the receiver. Returns 16#FFFFFFFE if there is at least one message waiting for the receiver, if the oldest message is currently locked by a different task. In all other cases, the communication address of the sender is returned.

A possible call semantic could be:

udiRec := Environment^.rmps.Receive(uiReceiverModuleID:=UDINT_TO_UINT(ComAddress AND 16#FFFF), pmd:=ADR(mdData));

Where udiRec returns the address of the module/communicator from which the message was received. Accesing this function was done using the environemin any module implementing IModule.

InOut:

Scope

Name

Type

Comment

Return

Receive

UDINT

Input

uiReceiverModuleID

UINT

The (local) address of the receiver, which equals the first 16bit of the ComAddress (see AND 16#FFFF)

pmd

POINTER TO ARRAY [0..63] OF BYTE

The message data buffer to write to