Exemplo n.º 1
0
        /// <summary>
        /// read one DM
        /// </summary>
        /// <param name="position"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public bool ReadDM(UInt16 position, ref UInt16 value)
        {
            // FINS command
            //
            if (!finsMemoryAreadRead(MemoryArea.DM, position, 0, 1))
            {
                return(false);
            }

            // value
            //
            value = BTool.BytesToUInt16(this._finsCmd.Response[0], this._finsCmd.Response[1]);

            return(true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// read various DM
        /// </summary>
        /// <param name="position"></param>
        /// <param name="data"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        public bool ReadDMs(UInt16 position, ref UInt16[] data, UInt16 count)
        {
            // FINS command
            //
            if (!finsMemoryAreadRead(MemoryArea.DM, position, 0, count))
            {
                return(false);
            }

            // fills the array
            //
            for (int x = 0; x < count; x++)
            {
                data[x] = BTool.BytesToUInt16(this._finsCmd.Response[(x * 2)], this._finsCmd.Response[(x * 2) + 1]);
            }

            return(true);
        }