AddressSpace

We found 10 examples in language CSharp for this search. You will see 25 fragments of code.

        /// <summary>
        /// Return the ISession object for the specified BAR (Base Address Register).
        ///       
        /// </summary>
        /// <param name="bar"></param>
        /// <returns></returns>
        ISession Session( AddressSpace bar );

        /// <summary>
        /// Set the timeout of the specified session (Sessions[(short)bar]) to default (2 sec)
        /// </summary>
        /// <param name="bar">session index</param>
        void VisaTimeOutDefault( AddressSpace bar );

        /// <summary>
        /// Set the timeout of the specified session  (Sessions[(short)bar]) to msTimeout
        /// </summary>
        /// <param name="bar">session index</param>
        /// <param name="msTimeout">VISA session timeout in milliseconds</param>
        void VisaTimeOut( AddressSpace bar, Int32 msTimeout );

        /// <summary>
        /// Writes the contents of a register in the specified AddressSpace to hardware.
        /// </summary>
        /// <param name="space">AddressSpace of the register</param>
        /// <param name="barOffset">Register's offset within AddressSpace.</param>
        /// <param name="value">32 bit Register value.</param>
        void RegWrite( AddressSpace space, int barOffset, int value );

        /// <summary>
        /// Writes the contents of a register in the specified AddressSpace to hardware.
        /// </summary>
        /// <param name="space">AddressSpace of the register</param>
        /// <param name="barOffset">Register's offset within AddressSpace.</param>
        /// <param name="value">64 bit Register value.</param>
        void RegWrite( AddressSpace space, int barOffset, long value );

        /// <summary>
        /// Reads the contents of a register in the specified AddressSpace from hardware.
        /// </summary>
        /// <param name="space">AddressSpace of the register</param>
        /// <param name="barOffset">Register's offset within AddressSpace.</param>
        /// <returns>register's 32 bit value</returns>
        int RegRead( AddressSpace space, int barOffset );


        /// <summary>
        /// Set the timeout of the specified session (Sessions[(short)bar]) to default (2 sec)
        /// </summary>
        /// <param name="bar">session index</param>
        public void VisaTimeOutDefault( AddressSpace bar )
        {
            // NOP
        }

        /// <summary>
        /// Set the timeout of the specified session  (Sessions[(short)bar]) to msTimeout
        /// </summary>
        /// <param name="bar">session index</param>
        /// <param name="msTimeout">VISA session timeout in milliseconds</param>
        public void VisaTimeOut( AddressSpace bar, int msTimeout )
        {
            // NOP
        }

        public void ArrayWrite( AddressSpace bar, int barOffset, byte[] data8, int startIndex, int numBytes )
        {
            throw new NotImplementedException();
        }

        public void ArrayWrite( AddressSpace bar, int barOffset, int[] data32, int length )
        {
            ArrayWrite(barOffset, data32, length);
        }

        public void ArrayWrite( AddressSpace bar, int barOffset, int[] data32, int length, int offset )
        {
            throw new NotImplementedException();
        }

        public void FifoWrite( AddressSpace PxiBar, int[] data32 )
        {
            throw new NotImplementedException();
        }


        public void ArrayRead(int barOffset, ref int[] data32, int startIndex, int num32BitWords)
        {
            ArrayRead32((AddressSpace)MyAddressSpace.MappedControlReg, barOffset, ref data32, startIndex, num32BitWords);
        }

        public void ArrayRead(AddressSpace bar, int barOffset, ref byte[] data8, int startIndex, int numBytes)
        {
            throw new NotImplementedException();
        }

        public int[] ArrayRead32(int barOffset, int num32BitWords)
        {
            return ArrayRead32((AddressSpace) MyAddressSpace.MappedControlReg, barOffset, num32BitWords);
        }

        public int[] ArrayRead32(AddressSpace bar, int barOffset, int num32BitWords)
        {
            int [] readData = new int[num32BitWords];
            ArrayRead32(bar, barOffset, ref readData, 0, num32BitWords);
            return readData;
        }

        public byte[] ArrayRead8(AddressSpace bar, int barOffset, int numBytes)
        {
            throw new NotImplementedException();
        }

        private void ArrayRead32(AddressSpace bar, int barOffset, ref int[] data32, int startIndex, int num32BitWords)
        {
            if (data32.Length < (startIndex + num32BitWords))
            {
                throw new Exception("Wrong ArrayRead32 : data32.Length < (startIndex + num32BitWords)");
            }

            for (int i = startIndex; i < (startIndex + num32BitWords); i++)
            {
                data32[i] = RegRead(bar, barOffset + i);
            }
        }

#if !(UNITY_DOTSRUNTIME && UNITY_WEBGL) // https://unity3d.atlassian.net/browse/DOTSR-2039
    [Test]
    public void VirtualMemory_Reserve1Page()
    {
        // Reserve 1 page
        BaselibErrorState errorState = default;
        var addressSpace = VirtualMemoryUtility.ReserveAddressSpace(1, VirtualMemoryUtility.DefaultPageSizeInBytes, out errorState);
        Assert.AreEqual(addressSpace.pageCount, 1u);
        VirtualMemoryUtility.FreeAddressSpace(addressSpace, out errorState);
    }


        public override bool Equals(Object o)
        {
            if (o is AddressSpace) {
                return this == (AddressSpace)o;
            }
            else {
                return false;
            }
        }

#if !(UNITY_DOTSRUNTIME && UNITY_WEBGL) // https://unity3d.atlassian.net/browse/DOTSR-2039
    [Test]
    public void VirtualMemory_Reserve1Page()
    {
        // Reserve 1 page
        BaselibErrorState errorState = default;
        var addressSpace = VirtualMemoryUtility.ReserveAddressSpace(1, VirtualMemoryUtility.DefaultPageSizeInBytes, out errorState);
        Assert.AreEqual(addressSpace.pageCount, 1);
        VirtualMemoryUtility.FreeAddressSpace(addressSpace, out errorState);
    }

#if !(UNITY_DOTSRUNTIME && UNITY_WEBGL) // https://unity3d.atlassian.net/browse/DOTSR-2039
    [Test]
    public void VirtualMemory_Reserve1Page()
    {
        // Reserve 1 page
        BaselibErrorState errorState = default;
        var addressSpace = VirtualMemoryUtility.ReserveAddressSpace(1, VirtualMemoryUtility.DefaultPageSizeInBytes, out errorState);
        Assert.AreEqual(addressSpace.pageCount, 1);
        VirtualMemoryUtility.FreeAddressSpace(addressSpace, out errorState);
    }


        public static void Part1And2(AddressSpace addressSpace)
        {
            Console.WriteLine(addressSpace.GetSumOfAddressSpace());
        }


        /// <summary>
        /// Determines whether the specified object is equals to this object.
        /// </summary>
        /// <param name="obj">The object to compare with this object.</param>
        /// <returns>True if the specified object is equal to the current object; otherwise, false.</returns>
        public override bool Equals(object obj) => Equals(obj as AddressSpace);


        private static void CopyValues(IAddressSpace addressSpace, int from, int to, int length)
        {
            for (var i = length - 1; i >= 0; i--)
            {
                var b = addressSpace.GetByte(0xFE00 + from + i) % 0xFF;
                addressSpace.SetByte(0xFE00 + to + i, b);
            }
        }

Microsoft.Azure.Management.Network.Fluent.Models.AddressSpace : Object

Constructors :

public AddressSpace()
public AddressSpace(IList<String> addressPrefixes = null)

Methods :

public IList<String> get_AddressPrefixes()
public Void set_AddressPrefixes(IList<String> value = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()

Other methods