public bool SetASCIIString(string ASCIIString, bool reverse) { bool isOk = !string.IsNullOrWhiteSpace(ASCIIString); if (isOk) { this.RawValue = McCommand.ASCIIStringToShortArray(ASCIIString, reverse); } return(isOk); }
public bool GetDInput(int address, ref short[] state) { bool isOk = false; if (address >= 0 && this.InputDAddress >= 0 && this.InputDCount > 0) { this.updateInputBuffer_D(); int index = address - this.InputDAddress; if (this.inputBuffer_D != null && this.inputBuffer_D.Length > index) { string strdata = McCommand.ShortArrayToASCIIString(false, inputBuffer_D); state = McCommand.ASCIIStringToShortArray(strdata, false); isOk = true; } } return(isOk); }