Ejemplo n.º 1
0
        public bool SetASCIIString(string ASCIIString, bool reverse)
        {
            bool isOk = !string.IsNullOrWhiteSpace(ASCIIString);

            if (isOk)
            {
                this.RawValue = McCommand.ASCIIStringToShortArray(ASCIIString, reverse);
            }
            return(isOk);
        }
Ejemplo n.º 2
0
        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);
        }