Difference between revisions of "Core.Actions.SetBit"

From emotive
Jump to navigation Jump to search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Core]]
+
{{DISPLAYTITLE:OTX '''SetBit'''}}[[Category:Core]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | SetBit | Sets a bit in a ByteField | [[Action]] | [[Core|OTX Core library]] | [[ByteFieldModifiers related actions]] | [[OutOfBoundsException]] | - }}
+
{{ClassificationActivity | SetBit | Sets a bit in a ByteField | [[Action]] | [[Core|OTX Core library]] | [[ByteFieldModifiers related actions]] | [[Core.Actions.Throw.Exception.OutOfBoundsException|OutOfBoundsException]] | - }}
 +
 
 +
== OTL Syntax ==
 +
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
ByteField.SetBit(ByteFieldVariable, IntegerTerm, IntegerTerm, BooleanTerm);
 +
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The OTX '''SetBit''' activity sets a bit in a [[ByteField]].
+
The OTX '''SetBit''' activity sets a bit in a [[Core.DataTypes.ComplexDataType.ByteField|ByteField]].
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ByteField | [[ByteField]] | [[Variable]] | - | [1] | Variable of type ByteField bit should be}}
+
{{TableRowPropertie1| ByteField | [[Core.DataTypes.ComplexDataType.ByteField|ByteField]] | [[Variable]] | - | [1] | Variable of type ByteField in which the bit should be set}}
{{TableRowPropertie2| Index | [[Integer]] | [[Term]] | - | [1] | The byte in the ByteField in which the bit will be used to determine}}
+
{{TableRowPropertie2| Index | [[Core.DataTypes.SimpleDataType.Integer|Integer]] | [[Term]] | - | [1] | The byte in the ByteField in which the bit will be used to determine}}
{{TableRowPropertie1| Position | [[Integer]] | [[Term]] | - | [1] | Bit position in the byte where bit should be set}}
+
{{TableRowPropertie1| Position | [[Core.DataTypes.SimpleDataType.Integer|Integer]] | [[Term]] | - | [1] | Bit position in the byte where bit should be set}}
{{TableRowPropertie2| Value | [[Boolean]] | [[Term]] | - | [1] | True or false value to which the bit is set}}
+
{{TableRowPropertie2| Value | [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | [[Term]] | - | [1] | True or false value to which the bit is set}}
 
|}
 
|}
 +
 +
== OTL Examples ==
 +
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
Integer Positions1 = 1;
 +
ByteField ByteField1 = &00FF;
 +
Integer Index1;
 +
 +
ByteField.SetBit(ByteField1, Index1, Positions1, false);
 +
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
[[Assignment]] <br/>
+
[[Core.Actions.Assignment|Assignment]] <br/>
[[ProcedureCall]] <br/>
+
[[Core.Actions.ProcedureCall|ProcedureCall]] <br/>
[[ShiftRight]] <br/>
+
[[Core.Actions.ShiftRight|ShiftRight]] <br/>
[[ShiftLeft]] <br/>
+
[[Core.Actions.ShiftLeft|ShiftLeft]] <br/>
[[ReplaceSubByteField]] <br/>
+
[[Core.Actions.ReplaceSubByteField|ReplaceSubByteField]] <br/>
[[AppendByteField]] <br/>
+
[[Core.Actions.AppendByteField|AppendByteField]] <br/>
[[ListConcatenate]] <br/>
+
[[Core.Actions.ListConcatenate|ListConcatenate]] <br/>
[[ListAppendItems]] <br/>
+
[[Core.Actions.ListAppendItems|ListAppendItems]] <br/>
[[ListInsertItems]] <br/>
+
[[Core.Actions.ListInsertItems|ListInsertItems]] <br/>
[[ListRemoveItems]] <br/>
+
[[Core.Actions.ListRemoveItems|ListRemoveItems]] <br/>
[[ListClear]] <br/>
+
[[Core.Actions.ListClear|ListClear]] <br/>
[[MapUnion]] <br/>
+
[[Core.Actions.MapUnion|MapUnion]] <br/>
[[MapPutItems]] <br/>
+
[[Core.Actions.MapPutItems|MapPutItems]] <br/>
[[MapRemoveItems]] <br/>
+
[[Core.Actions.MapRemoveItems|MapRemoveItems]] <br/>
[[MapClear]]
+
[[Core.Actions.MapClear|MapClear]]

Latest revision as of 08:54, 16 February 2016

Classification

Name SetBit
Short Description Sets a bit in a ByteField
Class Action
Extension OTX Core library
Group ByteFieldModifiers related actions
Exceptions OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

ByteField.SetBit(ByteFieldVariable, IntegerTerm, IntegerTerm, BooleanTerm);

Description

The OTX SetBit activity sets a bit in a ByteField.

Properties

Name Data Type Class Default Cardinality Description
ByteField ByteField Variable - [1] Variable of type ByteField in which the bit should be set
Index Integer Term - [1] The byte in the ByteField in which the bit will be used to determine
Position Integer Term - [1] Bit position in the byte where bit should be set
Value Boolean Term - [1] True or false value to which the bit is set

OTL Examples

Integer Positions1 = 1;
ByteField ByteField1 = &00FF;
Integer Index1;

ByteField.SetBit(ByteField1, Index1, Positions1, false);

See also

Assignment
ProcedureCall
ShiftRight
ShiftLeft
ReplaceSubByteField
AppendByteField
ListConcatenate
ListAppendItems
ListInsertItems
ListRemoveItems
ListClear
MapUnion
MapPutItems
MapRemoveItems
MapClear