SIRVector class for absolute positions.
Наследование: SIRVector
        public void AbsCoordSirVector_Constructor_GetiType()
        {
            VecPoint _vecPoints = MockRepository.GenerateStub<VecPoint>(10, 10, 10, 10, 10);
            AbsCoordSirVector _absCoordSirVector = new AbsCoordSirVector("TestOne");

            Assert.AreEqual(-32766, _absCoordSirVector.Type);
        }
        public void AbsCoordSirVector_getSize_AddOneToList_GetOneFromCount()
        {
            VecPoint _vecPoints = MockRepository.GenerateStub<VecPoint>(10, 10, 10, 10, 10);
            AbsCoordSirVector _absCoordSirVector = new AbsCoordSirVector("TestOne");

            _absCoordSirVector.addPoint(_vecPoints);

            Assert.AreEqual(1, _absCoordSirVector.getSize());
        }
        public void AbsCoordSirVector_getPoint_AddPoint_TestIfSame()
        {
            VecPoint _vecPoints = MockRepository.GenerateStub<VecPoint>(10, 10, 10, 10, 10);
            AbsCoordSirVector _absCoordSirVector = new AbsCoordSirVector("TestOne");

            _absCoordSirVector.addPoint(_vecPoints);

            Assert.AreEqual(_vecPoints, _absCoordSirVector.getPoint(0));
        }
        public void AbsCoordSirVector_Constructor_GetNameTest()
        {
            VecPoint _vecPoints = MockRepository.GenerateStub<VecPoint>(10, 10, 10, 10, 10);
            AbsCoordSirVector _absCoordSirVector = new AbsCoordSirVector("TestOne");

            _absCoordSirVector.addPoint(_vecPoints);

            Assert.AreEqual("TestOne", _absCoordSirVector.Name);
        }
Пример #5
0
        public bool moveByAbsoluteVector(AbsCoordSirVector abs)
        {
            if (!teach(abs))
                return false;

            for (int i = 0; i < abs.getSize(); i++)
            {
                movementlock.WaitOne();

                if (!_wrapper.moveLinearWrapped(abs.Name, (i + 1)))
                    return false;
            }
            return true;
        }
Пример #6
0
 // subject to change
 public bool moveByAbsoluteCoordinates(string vectorname,int _iX, int _iY, int _iZ, int _iPitch, int _iRoll)
 {
     SIRVector temp = new AbsCoordSirVector(vectorname);
     temp.addPoint(new VecPoint(_iX,_iY,_iZ,_iPitch,_iRoll));
     if (!defineVector(temp))
         return false;
     if (!teach(temp))
         return false;
     if (!moveLinear(vectorname, 1))
         return false;
     return true;
 }