OTX Reference  
OpenTestSystem.Otx.Core.Actions.SetBit Class Reference

Sets a bit in ByteField More...

Inheritance diagram for OpenTestSystem.Otx.Core.Actions.SetBit:
Inheritance graph

Public Attributes

NumericTerm index
 The zero based byte index of the byte in which the bit of interest resides. The bytes in a ByteField of byte size n are ordered from left to right, where the leftmost byte have a byte index of 0 and the rightmost byte have a byte index of n-1. More...
 
NumericTerm position
 The zero based bit position of the bit within the identified byte. The bits in each byte of the ByteField are ordered from the least significant bit (LSB) to the most significant bit (MSB). More...
 
BooleanTerm value
 Value of type boolean. If the value is true the bit is set to 1. Otherwise it is set to 0. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ByteFieldModifier
ByteFieldVariable byteField
 Identifies a ByteField variable which shall be modified. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation
OtxLink validFor
 Validity of ActionRealisation. More...
 

Detailed Description

Sets a bit in ByteField

The SetBit activity sets a bit in a ByteField at a given Position.

Exceptions
Exceptions.OutOfBoundsExceptionIt is thrown if the index is not within the range [0,n-1], where n is the size of the ByteField.
Syntax
ByteField.SetBit(ByteFieldVariable, IntegerTerm, IntegerTerm, BooleanTerm);
Examples
// Local Declarations
Integer Positions1 = 1;
ByteField ByteField1 = &00FF;
Integer Index1;
// Flow
ByteField.SetBit(ByteField1, Index1, Positions1, false);

Member Data Documentation

◆ index

NumericTerm OpenTestSystem.Otx.Core.Actions.SetBit.index

The zero based byte index of the byte in which the bit of interest resides. The bytes in a ByteField of byte size n are ordered from left to right, where the leftmost byte have a byte index of 0 and the rightmost byte have a byte index of n-1.

◆ position

NumericTerm OpenTestSystem.Otx.Core.Actions.SetBit.position

The zero based bit position of the bit within the identified byte. The bits in each byte of the ByteField are ordered from the least significant bit (LSB) to the most significant bit (MSB).

◆ value

BooleanTerm OpenTestSystem.Otx.Core.Actions.SetBit.value

Value of type boolean. If the value is true the bit is set to 1. Otherwise it is set to 0.