PIDataPipe and AF

Discussion created by brendanbell on Aug 12, 2013
Latest reply on Aug 13, 2013 by cmanhard

I am experimenting with code around Event Frame generation, and trying to get to grips with the EventPipe/PIDataPipe model.


I am using AF Templates for my Asset Hierarchy and want to be able to subscribe/signup a specific AFAttribute tag from my assets. I can see how to use.. 



List<PIPoint> tagList = new List<PIPoint>();
foreach (AFElement unit in compressionUnits)
    AFAttribute tag = unit.Attributes["StatusTag"];

 using (PIDataPipe myPipe = new PIDataPipe(AFDataPipeType.Snapshot))



From the documentation and sample code, it looks like the PIDataPipe takes a list of PIPoints, but once I have subscribed to the PIPoint using the code above, I think I have lost the reference to the AF Hierarchy.


If I want to generate an AF Event Frame against an AFElement based on the UpdateEvents in the PIDataPipe how can I get the AFAttribute reference?