08-31-2011 02:42 PM
The CDapDelivery can either be of type CDapMessage or CDapNotification. This is the code I need to implement in LabVIEW:
foreach (CDapDelivery DapDelivery in DapDeliveries)
{
if (DapDelivery is CDapMessage)
{
CDapMessage DapMessage = (CDapMessage)DapDelivery;
LogTextBox.AppendText(String.Format("received message terminal={0}\r\n", DapMessage.TerminalID));
}
else if (DapDelivery is CDapNotification)
{
CDapNotification DapNotification = (CDapNotification)DapDelivery;
LogTextBox.AppendText(String.Format("received notification ID={0} state={1}\r\n",
DapNotification.MessageIdentifier, DapNotification.MessageDeliveryStatus.ToString()));
}
}
09-01-2011 09:01 AM
It appears that you're dealing with a C++ class that inherits from multiple base classes. I've never had to use such a class so I don't know if the GetType on the individual list item will return the right base class name. You could try it, I suppose.