private static List <StatusInfo> ProcessComponent(MTConnectDevices.Component component) { var result = new List <StatusInfo>(); foreach (var item in component.DataItems) { result.Add(ProcessDataItem(item)); } return(result); }
private static ComponentDefinition Create(string deviceId, long agentInstanceId, string parentId, string parentType, MTConnectDevices.Component component) { var obj = new ComponentDefinition(); // TrakHound Properties obj.DeviceId = deviceId; obj.ParentId = parentId; obj.ParentType = parentType; // MTConnect Properties obj.AgentInstanceId = agentInstanceId; obj.Type = component.Type; obj.Id = component.Id; obj.Uuid = component.Uuid; obj.Name = component.Name; obj.NativeName = component.NativeName; obj.SampleInterval = component.SampleInterval; obj.SampleRate = component.SampleRate; return(obj); }