Messaging Namespace PC_SDK

Hello,

I was wondering when the eventhandlers for the Messaging Namespace for PC_SDK are released.

Best regards,

F.Roos

Hi,

I wonder what information you are referring to? As far as I know, there has been no intention to add any events to the Messaging namespace. Are you already using IPC messaging?

Hi,

In the controller TASK it is possible to connect a trap routine when a message is received in RMQ. But when you sent messages the other direction. That is from Controller to windows Application. I didn’t found a solution with current namespace to handle when a message is received in Queue.

That’s where I was referring to. The Eventhandlers when a message is received in Queue.

The .Net system.messaging has eventhandlers when messages is completely received? I can’t use these, because then there is a mismatch between ABB.Robotics.controllers.messaging and system.messaging.

Is it possible to create a handler when a new messages from controller is received in Queue?

Best regards,

F. Roos

Hola,

IPC messaging was released in 5.10.

There isn’t an event handler to be notified whenever a message is in the queue. Eventhough, you can create a class which fires an event whenever a message is received: just create a thread which is constantly trying to receive a message:

private static void ServerStart()

{

IpcMessage message;

IpcReturnType ret;

try

{

// Assume that _ipcSender is created before

while (_ipcSender != null)

{

message = new IpcMessage(Ipc.MaxMessageSize);

// Try to get a messsage, times out after 50mm

ret = _ipcSender.Receive(50, message);

if (ret == IpcReturnType.OK)

{

// Process the message

}

}

}

catch (Exception e)

{

MessageBox.Show(e.ToString());

}

}

Saludos/Carlos