public ResultCommand WriteCardMemory(string name, int readPoint, string newValue, int mem = 1, int adr = 4) { ResultCommand result = new ResultCommand(); result.Status = -1; result.Comment = "Error write data"; if (dic_rfid.ContainsKey(name)) { result.Comment = dic_rfid[name].writeTag(readPoint, newValue, mem, adr); result.Data = "{name:" + name + ", memory:" + mem + ", adress:" + adr + ",newValue:" + newValue + "}"; result.Status = 0; } return(result); }
public ResultCommand StartScan(string name, int readPoint = 0) { ResultCommand result = new ResultCommand(); result.Status = -1; result.Comment = "RFID dictionary not contained " + name; result.Data = "{name:" + name + ",readPoint:" + readPoint + "}"; if (dic_rfid.ContainsKey(name)) { dic_rfid[name].startScan(readPoint); result.Status = 0; result.Comment = "Succesfull startScan " + name; } return(result); }
public ResultCommand ConnectRFID(string ipPort, string name = "Default") { RF600 rfid = new RF600(ipPort, name); ResultCommand result = new ResultCommand(); rfid.connectOPC(); result.Data = "{name:" + name + ",ipPort:" + ipPort + "}"; if (rfid.connected) { dic_rfid.Add(name, rfid); rfid.startScan(); result.Status = 0; result.Comment = "Successfull connection"; } else { result.Status = -1; result.Comment = "Error connection"; } return(result); }