Exemple #1
0
        private DataMessage BuildDescriptor(DeviceInfo deviceInfo)
        {
            var dataMessage = new DataMessage();

            deviceInfo.DescriptorMessage.Buttons.ForEach(io => dataMessage.AddButton(io.Value));
            deviceInfo.DescriptorMessage.Axes.ForEach(io => dataMessage.AddAxis(io.Value));
            deviceInfo.DescriptorMessage.Deltas.ForEach(io => dataMessage.AddDelta(io.Value));
            deviceInfo.DescriptorMessage.Events.ForEach(io => dataMessage.AddEvent(io.Value));

            return(dataMessage);
        }