Esempio n. 1
0
        public void BoolTag_AddAddress()
        {
            BoolTag myTag = new BoolTag(StatusFunction.InputStatus);

            myTag.AddAddress(5);
            myTag.AddAddress(12);
            myTag.SetData(GetModbusBoolValues());
        }
Esempio n. 2
0
        public void BoolTag_OrMerge3()
        {
            BoolTag myTag = new BoolTag(StatusFunction.InputStatus);

            myTag.AddAddress(8); // false
            myTag.AddAddress(9); // false
            myTag.MergeType = TagAddressMergeType.OrMerge;
            myTag.SetData(GetModbusBoolValues());
            Assert.AreEqual(false, myTag.Value);
        }
Esempio n. 3
0
        public void BoolTag_AndMerge2()
        {
            BoolTag myTag = new BoolTag(StatusFunction.InputStatus);

            myTag.AddAddress(3); // true
            myTag.AddAddress(4); // true
            myTag.MergeType = TagAddressMergeType.AndMerge;
            myTag.SetData(GetModbusBoolValues());
            Assert.AreEqual(true, myTag.Value);
        }
Esempio n. 4
0
        public void BoolTag_OrMask5()
        {
            BoolTag myTag = new BoolTag(StatusFunction.InputStatus);

            myTag.AddAddress(5); // false
            myTag.MaskType = TagAddressMaskType.None;
            myTag.Mask     = true;
            myTag.SetData(GetModbusBoolValues());
            Assert.AreEqual(false, myTag.Value);
        }
Esempio n. 5
0
        public void BoolTag_OrMask2()
        {
            BoolTag myTag = new BoolTag(StatusFunction.InputStatus);

            myTag.AddAddress(3); // true
            myTag.MaskType = TagAddressMaskType.OrMask;
            myTag.Mask     = false;
            myTag.SetData(GetModbusBoolValues());
            Assert.AreEqual(true, myTag.Value);
        }