Beispiel #1
0
 CameraBuffer::CameraBuffer()
   : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(), setupParameters()),
     m_bufferSize(0),
     m_numBuffers(1),
     m_id(0)
 {
 }
TriangulationWidget::TriangulationWidget(QWidget *parent) :
		QWidget(parent),
		lastRoverPos(0, 0),
		lastRoverHeading(0),
		validBitmap(0)
{
    setupUi(this);
	setupInputs();

	connect(setToRoverButtonA, SIGNAL(clicked()), this, SLOT(setInputAToRover()));
	connect(setToRoverButtonB, SIGNAL(clicked()), this, SLOT(setInputBToRover()));
	connect(saveToLogButton, SIGNAL(clicked()), this, SLOT(saveToLog()));
	connect(clearLogButton, SIGNAL(clicked()), this, SLOT(clearLog()));
}
Beispiel #3
0
 void ParameterOperator::initialize()
 {
     OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
     
     m_matrixParam.resize(3, 4, stromx::runtime::Matrix::FLOAT_32);
     for (unsigned int i = 0; i < m_matrixParam.rows(); ++i)
         for (unsigned int j = 0; j < m_matrixParam.cols(); ++j)
             m_matrixParam.at<float>(i, j) = float(i + j);
         
     m_intMatrixParam.resize(1, 2, stromx::runtime::Matrix::UINT_32);
     for (unsigned int i = 0; i < m_intMatrixParam.rows(); ++i)
         for (unsigned int j = 0; j < m_intMatrixParam.cols(); ++j)
             m_intMatrixParam.at<uint32_t>(i, j) = i + j;
 }
Beispiel #4
0
 Merge::Merge()
   : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs()),
     m_numItems(0),
     m_list(0)
 {
 }
Beispiel #5
0
 ReadGpio::ReadGpio()
 : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(), setupParameters())
 {
 }
//------------------------------------------------------------------------------
static void loopMain(void)
{
    tOplkError              ret = kErrorOk;
    char                    cKey = 0;
    BOOL                    fExit = FALSE;

#if !defined(CONFIG_KERNELSTACK_DIRECTLINK)

#if defined(CONFIG_USE_SYNCTHREAD)
    system_startSyncThread(processSync);
#endif

#endif

    // start processing
    ret = oplk_execNmtCommand(kNmtEventSwReset);
    if (ret != kErrorOk)
    {
        return;
    }

    printf("start POWERLINK Stack... ok\n");
    printf("Digital I/O interface with openPOWERLINK is ready!\n");
    printf("\n-------------------------------\n");
    printf("Press Esc to leave the programm\n");
    printf("Press r to reset the node\n");
    printf("Press i to increase digital input\n");
    printf("Press d to decrease digital input\n");
    printf("Press p to print digital outputs\n");
    printf("-------------------------------\n\n");

    setupInputs();

    // wait for key hit
    while (!fExit)
    {
        if (console_kbhit())
        {
            cKey = (BYTE)console_getch();

            switch (cKey)
            {
                case 'r':
                    ret = oplk_execNmtCommand(kNmtEventSwReset);
                    if (ret != kErrorOk)
                    {
                        fExit = TRUE;
                    }
                    break;

                case 'i':
                    increaseInputs();
                    break;

                case 'd':
                    decreaseInputs();
                    break;

                case 'p':
                    printOutputs();
                    break;

                case 0x1B:
                    fExit = TRUE;
                    break;

                default:
                    break;
            }
        }

        if (system_getTermSignalState() == TRUE)
        {
            fExit = TRUE;
            printf("Received termination signal, exiting...\n");
        }

        if (oplk_checkKernelStack() == FALSE)
        {
            fExit = TRUE;
            fprintf(stderr, "Kernel stack has gone! Exiting...\n");
        }

#if defined(CONFIG_USE_SYNCTHREAD) || defined(CONFIG_KERNELSTACK_DIRECTLINK)
        system_msleep(100);
#else
        processSync();
#endif
    }

#if (TARGET_SYSTEM == _WIN32_)
    printf("Press Enter to quit!\n");
    console_getch();
#endif

    return;
}
Beispiel #7
0
 void ReadDirectory::initialize()
 {
     OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
Beispiel #8
0
 Split::Split()
   : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs())
 {
 }
Beispiel #9
0
 Flicker::Flicker()
 : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(), setupParameters()),
     m_amount(0.1)
 {
 }
Beispiel #10
0
 ExceptionOperator::ExceptionOperator()
 : OperatorKernel(TYPE, PACKAGE, VERSION,
                 setupInputs(), setupOutputs(),
                 setupParameters())
 {
 }
Beispiel #11
0
 void TestOperator::initialize()
 {
     OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
Beispiel #12
0
 void ConvertPixelType::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
Beispiel #13
0
 WriteGpio::WriteGpio()
 : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(),
                  setupParameters(), setupProperties())
 {
 }
Beispiel #14
0
 Add::Add()
   : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(), setupParameters())
 {
 }
 void CornerMinEigenVal::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
Beispiel #16
0
 void Send::initialize()
 {
     OperatorKernel::initialize(setupInputs(),
                                setupOutputs(),
                                std::vector<const Parameter*>());
 }
Beispiel #17
0
 void PyrUp::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
Beispiel #18
0
 void BilateralFilter::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
Beispiel #19
0
 void Bitwise_and::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
Beispiel #20
0
Item * loadXml(  int type )
{
	PROFILE;
	Item * it = 0;
	XMLNode & root = getRoot();
	if ( root.isEmpty() )
		return 0;

	XMLNode items = root.getChildNode( "items" );
	if ( items.isEmpty() )
		return 0;

	int n = items.nChildNode();
	int i=0;
	while ( i<n && (!it) )
	{
		XMLNode plug = items.getChildNode( "fiducial", &i );
		if ( plug.isEmpty() )
			break;


		int fid = getIntAtt( plug, "id" );
		if ( fid != type )
		{
			continue;
		}

		const char * tex = getStringAtt( plug, "tex" );
		if ( ! texId[ fid ] )
		{
			texId[fid] = loadImage( tex );
		}

		bool isVstHost = false;
		int nInputs = plug.nChildNode();
		const char * dllName = plug.getAttribute( "plugin" );
		if ( dllName )
		{
			int ma = getIntAtt( plug, "map", -1 );

			it = createVstHost( dllName, fid, nInputs, ma );
			isVstHost = true;
		}
		else 
		{
			it = createSynItem( fid );
			isVstHost = false;
		}

		if ( ! it ) 
		{
			break;
		}
		int j=0;
		while ( j<nInputs )
		{
			XMLNode pin = plug.getChildNode( "pin", &j );
			if ( pin.isEmpty() )
				continue;

			it->conMult[ j - 1 ] = getFloatAtt( pin, "multiply", 1.0f );

			if ( isVstHost )
				setVstHostMapping( it, getIntAtt( pin, "param" ), (j - 1) );

			setupInputs( it, pin, j-1 );
		}
		break;
	}
	return it;
}