next up previous
Next: Configuration Functions Up: Host (PC) RTDX API Previous: Host (PC) RTDX API

Set Processor and CPU



Set Processor


long SetProcessor( BSTR Board, BSTR CPU )

The RTDX Exported Interface, rtdxint.dll, contains an additional method that permits you to select a specific board and processor to communicate within a multiprocessor environment.

Parameters:

Board Name of the board in BSTR-format (MS-Basic-String).
CPU Name of the CPU on the board in BSTR-format (MS-Basic-String).
Returns:

long - Success / Failure
 
NumOfMainBuffers Number of main buffers. The default number of main buffers is 4.

You can use this method with each instantiation of the RTDX COM object to communicate with the board and processor of your choice. The only restriction is that this method must be the very first method called, prior to Open(). If you do not specify a board and processor prior to calling this method then the following is assumed:

The following is an example of how to use this method under Visual C++:

#import <rtdxint.dll>
using namespace RTDXINTLib;

IRtdxExpPtr rtdx;
long data;
long status;
HRESULT hr;

BSTR board=::SysAllocString(L"C6xxx EVM (Texas Instruments)");
BSTR processor=::SysAllocString(L"TMS320C6201EVM");

::CoInitialize(NULL);

hr = rtdx.CreateInstance(__uuidof(RTDXINTLib::RtdxExp));
if (FAILED(hr))
    return hr;
    
status = rtdx->SetProcessor(board,processor);
if (status == Success) {
    status = rtdx->Open("ochan","R");
    if (status == Success) {
        // Do data processing
    }
}



next up previous
Next: Configuration Functions Up: Host (PC) RTDX API Previous: Host (PC) RTDX API
H. Rogalla 2005-12-07