next up previous
Next: The C++-file RTDX_Service_2.cpp Up: Decription of RTDX_Service_2 Previous: Decription of RTDX_Service_2

The header file RTDX_Service_2.h



/*
 * RTDX_Service.h
 */

#ifndef _RTDX_SERVICE_2_H_
#define _RTDX_SERVICE_2_H_

#import "rtdxint.dll"
using namespace RTDXINTLib;

class RTDX_Service_2
{
public:
    RTDX_Service_2();

    long Init();
    long SetBoardAndProcessor(wchar_t* board,wchar_t* cpu);
    long StartRTDX();
    long OpenWriteChannel();
    long OpenReadChannel();
    long WriteToClient(long data);
    long ReadFromClient();

private:
    IRtdxExpPtr w_pRtdx;
    IRtdxExpPtr r_pRtdx;
};

#endif	// RTDX_SERVICE_2_H_

The header file RTDX_Service_2.h loads the library rtdxint.dll , which is located in the directory ...\cc\bin' of the 'Code Composer Studio'. This directory should also be added to the additional 'include path' of the Visual C++ IDE. The class RTDX_Service_2 is defined next (by the way - the name is chosen because it belongs to 'Tutorial 2' and is a specialized version of the standard version used in 'Tutorial 3' and in production runs). Apart from the parameter-less creator 7 public functions are defined that work more or less as wrappers of the built-in Rtdx-function accessible via the COM-interface. The two pointers to two instantiations of the RTDX-interface are private.



H. Rogalla 2005-12-07