public CommandValuesMessage(MipsCommand command, string value1, string value2, int value3, int value4, int value5) : base(command) { this.command = command; this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); this.value3 = Encoding.ASCII.GetBytes(value3.ToString()); this.value4 = Encoding.ASCII.GetBytes(value4.ToString()); this.value5 = Encoding.ASCII.GetBytes(value5.ToString()); }
public CommandValueValueMessage(MipsCommand command, string value1, BitArray value2) : base(command) { StringBuilder sb = new StringBuilder(); foreach (var b in value2) { sb.Append((bool)b ? "1" : "0"); } this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(sb.ToString()); }
public CommandEnumerableValueValueMessage(MipsCommand command, string value1, IEnumerable <int> values) : base(command) { bytevalue = new byte[values.Count()][]; int i = 0; this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); foreach (var value in values) { bytevalue[i] = Encoding.ASCII.GetBytes(value.ToString()); i++; } }
public CommandEnumerableMessage(MipsCommand command, IEnumerable <double> values) : base(command) { bytevalue = new byte[values.Count()][]; int i = 0; foreach (var value in values) { byte[] result = Encoding.ASCII.GetBytes(value.ToString()); bytevalue[i] = result; i++; } }
public CommandValueEnumerableMessage(MipsCommand command, string value, IEnumerable <int> values) : base(command) { bytevalue = new byte[values.Count()][]; int i = 0; this.value = Encoding.ASCII.GetBytes(value); foreach (var val in values) { byte[] result = Encoding.ASCII.GetBytes(val.ToString()); bytevalue[i] = result; i++; } }
public void WriteHeader(MipsCommand command) { var commandBytes = MipsCommandMap.Default.GetBytes(command); if (commandBytes == null) { throw new NotImplementedException(); } foreach (var commandByte in commandBytes) { port.WriteByte(commandByte); } }
public void WriteHeader(MipsCommand command) { var commandBytes = MipsCommandMap.Default.GetBytes(command); if (commandBytes == null) { throw new NotImplementedException(); } lock (sync) { foreach (var commandByte in commandBytes) { serialPort.BaseStream.WriteByte(commandByte); } } System.Diagnostics.Debug.Write(Encoding.UTF8.GetString(commandBytes)); }
public CommandValueValueValueMessage(MipsCommand command, string value1, string value2, int value3) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); this.value3 = Encoding.ASCII.GetBytes(value3.ToString()); }
public static MipsMessage Create(MipsCommand command, CompressionTable compressionTable) { return(new CommandCompressionTableMessage(command, compressionTable)); }
public static MipsMessage Create(MipsCommand command, string value1, IEnumerable <int> values) { return(new CommandEnumerableValueValueMessage(command, value1, values)); }
public static MipsMessage Create(MipsCommand command, int value, IEnumerable <int> values) { return(new CommandValueEnumerableMessage(command, value, values)); }
public CommandValueValueMessage(MipsCommand command, double value1, double value2) : base(command) { this.value1 = Encoding.ASCII.GetBytes(value1.ToString()); this.value2 = Encoding.ASCII.GetBytes(value2.ToString()); }
public static MipsMessage Create(MipsCommand command, double value1, double value2) { return(new CommandValueValueMessage(command, value1, value2)); }
public void IsAvailable(MipsCommand command) { //return map[(int)command] != null; }
internal byte[] GetBytes(MipsCommand command) { return(map[(int)command]); }
public CommandCompressionTableMessage(MipsCommand command, CompressionTable compressionTable) : base(command) { this.value = Encoding.ASCII.GetBytes(compressionTable.RetrieveTableAsEncodedString()); }
public CommandBase(MipsCommand command) : base(command) { }
public CommandMessage(MipsCommand command) : base(command) { }
public static MipsMessage Create(MipsCommand command, int value1, int value2, string value3) { return(new CommandValueValueValueMessage(command, value1, value2, value3)); }
public static MipsMessage Create(MipsCommand command, string value1, string value2, int value3, int value4, int value5) { return(new CommandValuesMessage(command, value1, value2, value3, value4, value5)); }
public MipsMessage(MipsCommand command) { this.command = command; createdDateTime = DateTime.UtcNow; createdTimestamp = System.Diagnostics.Stopwatch.GetTimestamp(); }
public CommandSignalTableMessage(MipsCommand command, MipsSignalTable signalTable) : base(command) { this.value = Encoding.ASCII.GetBytes(value.ToString()); }
public CommandSignalTableMessage(MipsCommand command, MipsSignalTable signalTable) : base(command) { this.value = Encoding.ASCII.GetBytes(signalTable.RetrieveTableAsEncodedString()); }
public static MipsMessage Create(MipsCommand command, bool value) { return(new CommandValueMessage(command, value)); }
public CommandValueMessage(MipsCommand command, string value) : base(command) { this.value = Encoding.ASCII.GetBytes(value.ToString()); }
public static MipsMessage Create(MipsCommand command, string value1, BitArray value2) { return(new CommandValueValueMessage(command, value1, value2)); }
public static MipsMessage Create(MipsCommand command, MipsSignalTable signalTable) { return(new CommandSignalTableMessage(command, signalTable)); }
// public virtual string CommandAndKey => Command.ToString(); public static MipsMessage Create(MipsCommand command) { return(new CommandMessage(command)); }
public static MipsMessage Create(MipsCommand command, IEnumerable <double> values) { return(new CommandEnumerableMessage(command, values)); }