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