Пример #1
0
        internal async Task <string> GetModeNameAsyncInternal(InputPort port, int mode)
        {
            Command c = new Command(CommandType.DirectReply, 0x7f, 0);

            c.GetModeName(port, mode, 0x7f, 0);
            await _brick.SendCommandAsyncInternal(c);

            int index = Array.IndexOf(c.Response.Data, (byte)0);

            return(Encoding.UTF8.GetString(c.Response.Data, 0, index));
        }
Пример #2
0
		internal async Task<string> GetModeNameAsyncInternal(InputPort port, int mode)
		{
			Command c = new Command(CommandType.DirectReply, 0x7f, 0);
			c.GetModeName(port, mode, 0x7f, 0);
			await _brick.SendCommandAsyncInternal(c);
			int index = Array.IndexOf(c.Response.Data, (byte)0);
			return Encoding.UTF8.GetString(c.Response.Data, 0, index);
		}