private void ReadForcePlateDescription(ref List<Device> devices) { int id = dataStream.GetInt(); // ID string name = dataStream.GetString(); // name Device device = new Device(scene, name, id); // create device int nChannels = dataStream.GetInt(); // channel count device.channels = new Channel[nChannels]; for (int channelIdx = 0; channelIdx < nChannels; channelIdx++) { name = dataStream.GetString(); Channel channel = new Channel(device, name); device.channels[channelIdx] = channel; } devices.Add(device); }
private void ParseForcePlate(NatNetPacket_In packet, List<Device> devices) { int id = packet.GetInt32(); // force plate ID String name = packet.GetString(); // force plate serial # Device device = new Device(scene, name, id); // create device // skip next 652 bytes // (SDK 2.9 sample code does not explain what this is about) packet.Skip(652); int nChannels = packet.GetInt32(); // channel count device.channels = new Channel[nChannels]; for (int channelIdx = 0; channelIdx < nChannels; channelIdx++) { name = packet.GetString(); Channel channel = new Channel(device, name); device.channels[channelIdx] = channel; } devices.Add(device); }