//---------------------------------------------------------- public static IrDADeviceInfo[] CreateDeviceInfoArray(TestHolderIrDADeviceInfo[] devicesList) { int offset; byte[] allBuffer; offset = CreateBufferAndWriteHeader(devicesList.Length, out allBuffer); // foreach (TestHolderIrDADeviceInfo curDevice in devicesList) { offset += CreateDeviceListItemBuffer(allBuffer, offset, curDevice); } System.Diagnostics.Debug.Assert(offset == allBuffer.Length); //---- IrDADeviceInfo[] devices = DeviceInfoParse.DoParseDeviceList(allBuffer); return(devices); }
public static IrDADeviceInfo CreateDeviceListInfo(byte[] address, String name, byte[] hints, byte charset) { int offset; byte[] buffer; offset = CreateBufferAndWriteHeader(1, out buffer); // int length = CreateDeviceListItemBuffer(buffer, offset, address, name, hints, charset); // IrDADeviceInfo[] devices = DeviceInfoParse.DoParseDeviceList(buffer); if (devices.Length != 1) { throw new ArgumentException("Expected one device info result."); } return(devices[0]); }