Difference between revisions of "OpenIGTLink/Library2"

From NAMIC Wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
The library version 2 will provide more comprehensive testing than version 1. Specifically, it will provide server-client communication tests, which are not available in version 1.
 
The library version 2 will provide more comprehensive testing than version 1. Specifically, it will provide server-client communication tests, which are not available in version 1.
  
 +
==Strategy==
 
Xenios Papademitris suggested:
 
Xenios Papademitris suggested:
# Setting a ``server'' program that gets initialized at the start of the ctest process that simply accepts messages and dumps them to a file (with predefined filenames). Then you can compare what you sent with what it received.
+
# Setting a "server" program that gets initialized at the start of the ctest process that simply accepts messages and dumps them to a file (with predefined filenames). Then you can compare what you sent with what it received.
 
# Having a multithreaded test where the server is on one thread and the client on another ....
 
# Having a multithreaded test where the server is on one thread and the client on another ....
 +
 +
According to Andinet Enquobahrie,
 +
*OpenIGTLink relay in IGSTK uses threading for its test:
 +
http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/igstkTrackerToolObserverToOpenIGTLinkRelayTest.cxx?revision=1.2&root=IGSTK&view=markup
 +
 +
static ITK_THREAD_RETURN_TYPE ReceiverThreadFunction(void* pInfoStruct);
 +
static ITK_THREAD_RETURN_TYPE ObserverThreadFunction(void* pInfoStruct);
 +
 
 +
*Tube TK uses spawnv
 +
http://gitorious.org/tubetk/tubetk/blobs/master/Applications/CLI/ReceivePositionMessageUsingOpenIGTLink/Testing/SendAndReceivePositionMessageUsingOpenIGTLinkTest.cxx
 +
 +
 +
 +
==Test server==
 +
*Test server?
 +
**A client program binary and arguments are specified, when it is launched.
 +
**The test server runs the client program with specified arguments.
 +
**The client program sends a sequence of tests messages (described below)
 +
**After the client program exits, the server program returns the result to the CTest.
 +
==Test sequence==
 +
*Standard message tests
 +
**The client program pushes a series of messages to the server program.
 +
**At the end of the sequence, the server program creates a list of test results.
 +
*Query tests 1: Client to Server
 +
**The client issues queries to the server. The server returns the result dummy messages.
 +
**At the end of the sequence, the client program creates a list of test results.
 +
*Query test 2: Server to Client
 +
**The server issues queries to the server. The client returns the result dummy messages.
 +
**At the end of the sequence, the server program creates a list of test results.

Latest revision as of 18:23, 16 August 2010

Home < OpenIGTLink < Library2

About OpenIGTLink Library version 2

The OpenIGTLink Library version 2 is being developed to support OpenIGTLink protocol version 2. To try the library version 2, please follow the instruction in the instruction to try version 2 protocol

Testing

The library version 2 will provide more comprehensive testing than version 1. Specifically, it will provide server-client communication tests, which are not available in version 1.

Strategy

Xenios Papademitris suggested:

  1. Setting a "server" program that gets initialized at the start of the ctest process that simply accepts messages and dumps them to a file (with predefined filenames). Then you can compare what you sent with what it received.
  2. Having a multithreaded test where the server is on one thread and the client on another ....

According to Andinet Enquobahrie,

  • OpenIGTLink relay in IGSTK uses threading for its test:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/igstkTrackerToolObserverToOpenIGTLinkRelayTest.cxx?revision=1.2&root=IGSTK&view=markup

static ITK_THREAD_RETURN_TYPE ReceiverThreadFunction(void* pInfoStruct);
static ITK_THREAD_RETURN_TYPE ObserverThreadFunction(void* pInfoStruct);
 
  • Tube TK uses spawnv

http://gitorious.org/tubetk/tubetk/blobs/master/Applications/CLI/ReceivePositionMessageUsingOpenIGTLink/Testing/SendAndReceivePositionMessageUsingOpenIGTLinkTest.cxx


Test server

  • Test server?
    • A client program binary and arguments are specified, when it is launched.
    • The test server runs the client program with specified arguments.
    • The client program sends a sequence of tests messages (described below)
    • After the client program exits, the server program returns the result to the CTest.

Test sequence

  • Standard message tests
    • The client program pushes a series of messages to the server program.
    • At the end of the sequence, the server program creates a list of test results.
  • Query tests 1: Client to Server
    • The client issues queries to the server. The server returns the result dummy messages.
    • At the end of the sequence, the client program creates a list of test results.
  • Query test 2: Server to Client
    • The server issues queries to the server. The client returns the result dummy messages.
    • At the end of the sequence, the server program creates a list of test results.