Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  18 May 2009, Exaos Lee, Suggestion, Question about using mvmestd.h 
    Reply  18 May 2009, Stefan Ritt, Suggestion, Question about using mvmestd.h 
    Reply  19 May 2009, Konstantin Olchanski, Suggestion, Question about using mvmestd.h 
       Reply  20 May 2009, Exaos Lee, Suggestion, Question about using mvmestd.h 
Message ID: 580     Entry time: 18 May 2009     In reply to: 579
Author: Stefan Ritt 
Topic: Suggestion 
Subject: Question about using mvmestd.h 

Exaos Lee wrote:
The "mvmestd.h" uses the following function to open a VME device:
int mvme_open(MVME_INTERFACE **vme, int idx)
I found that the "driver/vme/sis3100/sis3100.c" uses the implementation as:
   /* open VME */
   sprintf(str, "/dev/sis1100_%02dremote", idx);
   (*vme)->handle = open(str, O_RDWR, 0);
   if ((*vme)->handle < 0)
      return MVME_NO_INTERFACE;
   }

The problem is: I renamed my SIS1100 devices as /dev/sis1100/xxxxx. So I have to hack the "sis3100.c".
Shall we have some smart way? Smile


In principle one could pass the device name to the user level. But I would like to keep the same code for Windows and Linux, and Windows does not need a device name. So you can either hack the file (I'm pretty sure it won't change in the next few years) or what I do is to make a symbolic link

/dev/sis1100/xxxx -> /dev/sis1100_00remote

Best regards,

Stefan
ELOG V3.1.4-2e1708b5