コード例 #1
0
ファイル: CameraBuffer.cpp プロジェクト: uboot/stromx
 CameraBuffer::CameraBuffer()
   : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(), setupParameters()),
     m_bufferSize(0),
     m_numBuffers(1),
     m_id(0)
 {
 }
コード例 #2
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()));
}
コード例 #3
0
ファイル: ParameterOperator.cpp プロジェクト: uboot/stromx
 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;
 }
コード例 #4
0
ファイル: Merge.cpp プロジェクト: roteroktober/stromx
 Merge::Merge()
   : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs()),
     m_numItems(0),
     m_list(0)
 {
 }
コード例 #5
0
ファイル: ReadGpio.cpp プロジェクト: joccccc/stromx
 ReadGpio::ReadGpio()
 : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(), setupParameters())
 {
 }
コード例 #6
0
//------------------------------------------------------------------------------
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;
}
コード例 #7
0
ファイル: ReadDirectory.cpp プロジェクト: uboot/stromx
 void ReadDirectory::initialize()
 {
     OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
コード例 #8
0
ファイル: Split.cpp プロジェクト: roteroktober/stromx
 Split::Split()
   : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs())
 {
 }
コード例 #9
0
ファイル: Flicker.cpp プロジェクト: roteroktober/stromx
 Flicker::Flicker()
 : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(), setupParameters()),
     m_amount(0.1)
 {
 }
コード例 #10
0
ファイル: ExceptionOperator.cpp プロジェクト: joccccc/stromx
 ExceptionOperator::ExceptionOperator()
 : OperatorKernel(TYPE, PACKAGE, VERSION,
                 setupInputs(), setupOutputs(),
                 setupParameters())
 {
 }
コード例 #11
0
ファイル: TestOperator.cpp プロジェクト: roteroktober/stromx
 void TestOperator::initialize()
 {
     OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
コード例 #12
0
 void ConvertPixelType::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
コード例 #13
0
ファイル: WriteGpio.cpp プロジェクト: joccccc/stromx
 WriteGpio::WriteGpio()
 : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(),
                  setupParameters(), setupProperties())
 {
 }
コード例 #14
0
ファイル: Add.cpp プロジェクト: roteroktober/stromx
 Add::Add()
   : OperatorKernel(TYPE, PACKAGE, VERSION, setupInputs(), setupOutputs(), setupParameters())
 {
 }
コード例 #15
0
 void CornerMinEigenVal::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
コード例 #16
0
ファイル: Send.cpp プロジェクト: roteroktober/stromx
 void Send::initialize()
 {
     OperatorKernel::initialize(setupInputs(),
                                setupOutputs(),
                                std::vector<const Parameter*>());
 }
コード例 #17
0
ファイル: PyrUp.cpp プロジェクト: joccccc/stromx
 void PyrUp::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
コード例 #18
0
 void BilateralFilter::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
コード例 #19
0
ファイル: Bitwise_and.cpp プロジェクト: joccccc/stromx
 void Bitwise_and::initialize()
 {
     runtime::OperatorKernel::initialize(setupInputs(), setupOutputs(), setupParameters());
 }
コード例 #20
0
ファイル: main.cpp プロジェクト: berak/vst2.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;
}