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
IRmpService2 (ITF) ¶ INTERFACE IRmpService2 EXTENDS IRmpService Interface implemented by the RMP (Reliable Message Protocoll) service Methods: GetIsActionOngoing SetIsActionOngoing Structure: GetIsActionOngoing (Method) SetIsActionOngoing (Method)
IRmpService2.GetIsActionOngoing (METH) ¶ METHOD GetIsActionOngoing : BOOL This method determines if this channel (for RMP) is currently active writing or reading. ..note: Do not perform an action without checking for avitivity first. This is especially important when using multi-threading (especially on multi-core systems). Whenever an action is ongoing, one should omit to do any work on variables used in the RMP (for example as mirror variables). In the case of an action is ongoing and you want to work on RMP variables, just wait as amny cycles as necessary, until no action is ongoing any more. Then when working on the variables use IRmpService2.SetIsActionOngoing to ensure, that AC generated code will not interfere with your work on the RMP variables. ..return: If it was possible to get the current state of activity. If this is FALSE xIsActionOngoing is not valid! InOut: Scope Name Type Comment Return GetIsActionOngoing BOOL Output xIsActionOngoing BOOL Whether the RMPService is currently active.
IRmpService2.SetIsActionOngoing (METH) ¶ METHOD SetIsActionOngoing : BOOL This method tries to set that this channel (for RMP) is currently active writing or reading. ..note: Do not start an activity without setting the flag by this method! And do not forget to reset it after finishing. This is especially important when using multi-threading (especially on multi-core systems). Whenever an action is ongoing, one should omit to do any work on variables used in the RMP (for example as mirror variables). In the case of an action is ongoing and you want to work on RMP variables, just wait as many cycles as necessary, until no action is ongoing any more. Then when working on the variables use IRmpService2.SetIsActionOngoing to ensure, that AC generated code will not interfere with your work on the RMP variables. ..return: If it was possible to set the current state of activity. If this is FALSE xIsActionOngoing has not been set! InOut: Scope Name Type Return SetIsActionOngoing BOOL Input xIsActionOngoing BOOL
IRmpService3 (ITF) ¶ INTERFACE IRmpService3 EXTENDS IRmpService2 Interface implemented by the RMP (Reliable Message Protocoll) service Methods: GetComFBForComAddress GetIsActionOngoing , inherited from IRmpService2 SetIsActionOngoing , inherited from IRmpService2 Structure: GetComFBForComAddress (Method)
IRmpService3.GetComFBForComAddress (METH) ¶ METHOD GetComFBForComAddress : IRMPFBCommunication This functions returns the communication FB used to communicate to or from a given Module ComAddress of a Module. ..note: If communication FBs are not used for communication this function will always return 0! ..return: If FB communication was used and a FB communicating to or from the given ComAddress exists the correspnding FB/Interface is returned If no communication FB is available 0 is reutnred. InOut: Scope Name Type Comment Return GetComFBForComAddress IRMPFBCommunication Input udiModuleComAddress UDINT The ComAddress of the Module for which the CommunicationFB shall be received
IRMPFBCommunication.InitializeCommunicationParameters (METH) ¶ METHOD InitializeCommunicationParameters : BOOL This method is called before the Cyclic-RMP-Communication AND provides you with the communication addresses of the application to receive messages from and to send messages to. InOut: Scope Name Type Comment Return InitializeCommunicationParameters BOOL Input uiSendToComAddress UINT The communication address of the application to send data via any network to; use this address to identify the FB receiving from this FB via the network uiReceiveComAddress UINT The communication address of the application to receive data via any network (local); use this address to identify the FB sending to this FB via the network
IRMPFBCommunication.InitializeReceiveBuffers (METH) ¶ METHOD InitializeReceiveBuffers : BOOL This method provides you with pointers TO the buffers holding the RMP data AND mirrored variables to be received. InOut: Scope Name Type Comment Return InitializeReceiveBuffers BOOL Input pRMPReceiveData POINTER TO RMPExchangeData The data structure used for the generall RMP; this data has to be received via any network connection from the application having the given communication address pReceiveVars POINTER TO RMPVarData The data list of variables being mirrored from a module in another application; this data has to be received via any network connection from the application having the given communication address udiReceiveVarsCount UDINT This is the number of variables given via the pointer pReceiveVars
IRMPFBCommunication.InitializeSendBuffers (METH) ¶ METHOD InitializeSendBuffers : BOOL This provides you with pointers to the buffers holding the RMP data and mirrored variables to be sent. InOut: Scope Name Type Comment Return InitializeSendBuffers BOOL Input pRMPSendData POINTER TO RMPExchangeData The data structure used for the generall RMP; this data has to be send via any network connection to the application having the given communication address pSendVars POINTER TO RMPVarData The data list of variables being mirrored to a module in the targeted application; this data has to be send via any network connection to the application having the given communication address udiSendVarsCount UDINT This is the number of variables given via the pointer pSendVars
IRMPFBCommunication.ReceiveComAdress (PROP) ¶ PROPERTY ReceiveComAdress : UDINT This property returns the ComAddress of the application messages are received from (given via InitializeCommunicationParameters).