Home>CVC>Remote Control | ||
Remote Control |
||
Introduction: Remote Control is a testing tool which could simulate running environment of Virtual Classroom. Using it , you could send/receive messages to/from your component and verify functions of your component. How does it work? Figure 1 Communication between component and remote control Remote Control and Interface Daemon communicate based on Socket, which is programming language INDEPENDENT. In other words, the same universal remote control could talk with any components no matter what language it is implemented by. Component and Interface Daemon communicate based on Parameter Passing, which is programming language DEPENDENT. Now it is available in two language: Java and C++. For Java, Interface Daemon is implemented in InterfaceServer.java ( refer to my slide) For C++, Click here to download the version executable in Linux with GUN g++ compiler. Thank Mr. Chirag Vaidya for his hard work on this. (refer to his page) Note: Keep Interface Damon and component in same language. In other words, if using C++ to code your component, you have to use C++ version of Interface Damon. However, remote controls for both version are same. How to get start? Here is tutorial to run example of authentication component (refer to my slide) . Step 1 : Download the example and unzip it (refer to download page) Step 2: Compile the component using " javac *.java" ( shown in Figure 2) Figure 2 Compile the component Step 3 Run Interface Daemon using " java InterfaceServer" ( Shown in Figure 2) Step 4 Keep the Interface Daemon running, go to the same directory and run remote control ( either by clicking in windows or type projRemote.exe in command line). The remote control will turn out as Figure 3. Figure 3 Remote Control without connection Step 5: Server's IP and Port Number refer to IP address and Port of computer where you run Interface Daemon. If you run it on the local machine, please leave the "127.0.0.1" unchanged ( it means the local computer). If you run it on the remote machine, please change this to its IP address. (For example, if Interface Daemon runs on hydrogen.cs.pitt.edu, please fill its IP address here--130.49.220.34). Click connect button at top right of window, remote control will connect with interface daemon. (Figure 4) Figure 4. Remote Control with connection Troubleshooting: Error message "Error: Server not available." shows up while clicking connect if the Interface daemon is not accessible. Please check the following:
Step 6 Using remote control with connection, you could design messages using button "AddKey" and "DeleteKey", or load and save messages. To run example, please click load Msg0.XML and click send (shown in Figure 5). Interface Daemon will show the messages it received and sent ( shown in Figure 6). Figure 5. Remote Control: Load and send messages Figure 6 Interface Daemon receiving and sending messages Step 7 As shown above, Interface Daemon ( such as InterfaceServer.java) just relays messages between Remote Control and component. The logic to process messages is implemented in componentMy.java (refer to my slide). To design your own component, please rewrite this part ( especially for the function processMsg).
|