FSUIPC Client DLL
.NET interface for FSUIPC
FsBitArray Class Reference

Manages an array of bit values, which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0). More...

Inherits ICollection, IEnumerable, and ICloneable.

Public Member Functions

bool HasChanged (int Index)
 Returns a boolean indicating if the specified bit was changed during or since the last FSUIPCConnection.Process() call More...
 
 FsBitArray (int length)
 Initializes a new instance of the FsBitArray class that can hold the specified number of bit values, which are initially set to false. More...
 
 FsBitArray (byte[] bytes)
 Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of bytes. More...
 
 FsBitArray (bool[] values)
 Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of Booleans. More...
 
 FsBitArray (int[] values)
 Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of 32-bit integers. More...
 
 FsBitArray (BitArray bits)
 Initializes a new instance of the FsBitArray class that contains bit values copied from the specified System.Collections.BitArray. More...
 
 FsBitArray (FsBitArray bits)
 Initializes a new instance of the FsBitArray class that contains bit values copied from the specified FsBitArray. More...
 
 FsBitArray (int length, bool defaultValue)
 Initializes a new instance of the FsBitArray class that can hold the specified number of bit values, which are initially set to the specified value. More...
 
FsBitArray And (FsBitArray value)
 Performs the bitwise AND operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray. More...
 
object Clone ()
 Creates a shallow copy of the FsBitArray. More...
 
void CopyTo (Array array, int index)
 Copies the entire FsBitArray to a compatible one-dimensional System.Array, starting at the specified index of the target array. More...
 
bool Get (int index)
 Gets the value of the bit at a specific position in the FsBitArray. More...
 
IEnumerator GetEnumerator ()
 Returns an enumerator that iterates through the FsBitArray. More...
 
FsBitArray Not ()
 Inverts all the bit values in the current FsBitArray, so that elements set to true are changed to false, and elements set to false are changed to true. More...
 
FsBitArray Or (FsBitArray value)
 Performs the bitwise OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray. More...
 
void Set (int index, bool value)
 Sets the bit at a specific position in the FsBitArray to the specified value. More...
 
void SetAll (bool value)
 Sets all bits in the FsBitArray to the specified value. More...
 
FsBitArray Xor (FsBitArray value)
 Performs the bitwise exclusive OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray. More...
 

Properties

BitArray BitArray [get]
 Returns the underlying native, .NET System.Collections.BitArray associated with this FsBitArray More...
 
bool [] Changed [get]
 Returns an array of booleans indicating if the corresponding bit was changed during the last FSUIPCConnection.Process() call More...
 
bool this[int index] [get, set]
 Gets or sets the value of the bit at a specific position in the FsBitArray. More...
 
object SyncRoot [get]
 Gets an object that can be used to synchronize access to the FsBitArray. More...
 
int Count [get]
 Gets the number of elements contained in the FsBitArray. More...
 
int Length [get, set]
 Gets or sets the number of elements in the FsBitArray. More...
 
bool IsSynchronized [get]
 Gets a value indicating whether access to the FsBitArray is synchronized (thread safe). More...
 
bool IsReadOnly [get]
 Gets a value indicating whether the FsBitArray is read-only. More...
 

Detailed Description

Manages an array of bit values, which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0).

Constructor & Destructor Documentation

◆ FsBitArray() [1/7]

FsBitArray ( int  length)
inline

Initializes a new instance of the FsBitArray class that can hold the specified number of bit values, which are initially set to false.

Parameters
lengthThe number of bit values in the new FsBitArray.

◆ FsBitArray() [2/7]

FsBitArray ( byte []  bytes)
inline

Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of bytes.

Parameters
bytesAn array of bytes containing the values to copy, where each byte represents eight consecutive bits.

◆ FsBitArray() [3/7]

FsBitArray ( bool []  values)
inline

Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of Booleans.

Parameters
valuesAn array of Booleans to copy.

◆ FsBitArray() [4/7]

FsBitArray ( int []  values)
inline

Initializes a new instance of the FsBitArray class that contains bit values copied from the specified array of 32-bit integers.

Parameters
valuesAn array of integers containing the values to copy, where each integer represents 32 consecutive bits.

◆ FsBitArray() [5/7]

FsBitArray ( BitArray  bits)
inline

Initializes a new instance of the FsBitArray class that contains bit values copied from the specified System.Collections.BitArray.

Parameters
bitsThe System.Collections.BitArray to copy.

◆ FsBitArray() [6/7]

FsBitArray ( FsBitArray  bits)
inline

Initializes a new instance of the FsBitArray class that contains bit values copied from the specified FsBitArray.

Parameters
bitsThe FsBitArray to copy.

◆ FsBitArray() [7/7]

FsBitArray ( int  length,
bool  defaultValue 
)
inline

Initializes a new instance of the FsBitArray class that can hold the specified number of bit values, which are initially set to the specified value.

Parameters
lengthThe number of bit values in the new FsBitArray.
defaultValueThe Boolean value to assign to each bit.

Member Function Documentation

◆ And()

FsBitArray And ( FsBitArray  value)
inline

Performs the bitwise AND operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.

Parameters
valueThe FsBitArray with which to perform the bitwise AND operation.
Returns
The current instance after the bitwise AND operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.

◆ Clone()

object Clone ( )
inline

Creates a shallow copy of the FsBitArray.

Returns
A shallow copy of the FsBitArray.

◆ CopyTo()

void CopyTo ( Array  array,
int  index 
)
inline

Copies the entire FsBitArray to a compatible one-dimensional System.Array, starting at the specified index of the target array.

Parameters
arrayThe one-dimensional System.Array that is the destination of the elements copied from FsBitArray. The System.Array must have zero-based indexing.
indexThe zero-based index in array at which copying begins.

◆ Get()

bool Get ( int  index)
inline

Gets the value of the bit at a specific position in the FsBitArray.

Parameters
indexThe zero-based index of the value to get.
Returns
The value of the bit at position index.

◆ GetEnumerator()

IEnumerator GetEnumerator ( )
inline

Returns an enumerator that iterates through the FsBitArray.

Returns
An System.Collections.IEnumerator for the entire FsBitArray.

◆ HasChanged()

bool HasChanged ( int  Index)
inline

Returns a boolean indicating if the specified bit was changed during or since the last FSUIPCConnection.Process() call

Parameters
IndexThs index of the bit to test
Returns
True if the bit has changed during or since the last FSUIPCConnection.Process() call

◆ Not()

FsBitArray Not ( )
inline

Inverts all the bit values in the current FsBitArray, so that elements set to true are changed to false, and elements set to false are changed to true.

Returns
The current instance with inverted bit values.

◆ Or()

FsBitArray Or ( FsBitArray  value)
inline

Performs the bitwise OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.

Parameters
valueThe FsBitArray with which to perform the bitwise OR operation.
Returns
The current instance after the bitwise OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.

◆ Set()

void Set ( int  index,
bool  value 
)
inline

Sets the bit at a specific position in the FsBitArray to the specified value.

Parameters
indexThe zero-based index of the bit to set.
valueThe Boolean value to assign to the bit.

◆ SetAll()

void SetAll ( bool  value)
inline

Sets all bits in the FsBitArray to the specified value.

Parameters
valueThe Boolean value to assign to all bits.

◆ Xor()

FsBitArray Xor ( FsBitArray  value)
inline

Performs the bitwise exclusive OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.

Parameters
valueThe FsBitArray with which to perform the bitwise exclusive OR operation.
Returns
The current instance after the bitwise exclusive OR operation on the elements in the current FsBitArray against the corresponding elements in the specified FsBitArray.

Property Documentation

◆ BitArray

BitArray BitArray
get

Returns the underlying native, .NET System.Collections.BitArray associated with this FsBitArray

◆ Changed

bool [] Changed
get

Returns an array of booleans indicating if the corresponding bit was changed during the last FSUIPCConnection.Process() call

◆ Count

int Count
get

Gets the number of elements contained in the FsBitArray.

◆ IsReadOnly

bool IsReadOnly
get

Gets a value indicating whether the FsBitArray is read-only.

◆ IsSynchronized

bool IsSynchronized
get

Gets a value indicating whether access to the FsBitArray is synchronized (thread safe).

◆ Length

int Length
getset

Gets or sets the number of elements in the FsBitArray.

◆ SyncRoot

object SyncRoot
get

Gets an object that can be used to synchronize access to the FsBitArray.

◆ this[int index]

bool this[int index]
getset

Gets or sets the value of the bit at a specific position in the FsBitArray.

Parameters
indexThe zero-based index of the value to get or set.
Returns
The value of the bit at position index.