cpp

If the client runs on the local host (P4 @ 2.4 GHz) which is connected to the VME crate, we observe an IO speed of 2.6 kHz (10000 read cycles in 3.8s). If the client runs on a remote host (P4 @ 2.8 GHz), the speed is reduced to 1.8 kHz.

Here is the code.

 
#include <tango.h>
using namespace Tango;

main(unsigned int argc, char **argv)
{
  unsigned long temp; 
  int i; 

  DeviceProxy *device = new DeviceProxy( "//has107k:10000/bw4/exp/t1");

  for( i = 0; i < 10000; i++)
    {
      DeviceData devdata = device->command_inout( "Check"); 
    }
}

And the make file.

CC = g++
TANGO_HOME = /usr/local

INCLUDE_DIRS = -I $(TANGO_HOME)/include -I .

LIB_DIRS = -L $(TANGO_HOME)/lib

CXXFLAGS =  -D_REENTRANT $(INCLUDE_DIRS)
LFLAGS =  $(LIB_DIRS) -ltango \
                      -llog4tango \
                      -lomniORB4 \
                      -lomniDynamic4 \
                      -lCOS4 \
                      -lomnithread \
                      -lpthread

.SUFFIXES:      .o .cpp
.cpp.o:
	$(CC) $(CXXFLAGS) -c $<

all: DGG2Test DGG2Speed

DGG2Test:   DGG2Test.o
	$(CC) DGG2Test.o -o DGG2Test $(LFLAGS)
DGG2Speed:   DGG2Speed.o
	$(CC) DGG2Speed.o -o DGG2Speed $(LFLAGS)

clean:
	rm -f *.o core