예제 #1
0
        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);
        }
예제 #2
0
        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);
        }