Code Monkey home page Code Monkey logo

vehemence's People

Contributors

delaere avatar dwwztqhzvllzs7c avatar

Stargazers

 avatar

Watchers

 avatar  avatar

vehemence's Issues

implement new features in SY525 fw 3.0

The main feature of the Version 3.00 of the SY527 software is the possibility of using non-homogeneous boards, i.e. boards containing different channel types. For example, the A933K board contains 2 channel types: 1 primary channel and 24 distributed channels.

The operation via H. S. CAENET changes slightly: in particular, the response to Code %3, %N is different than what described for non-homogeneous boards.

-> modification of the discoverBoards() method

  • create several copies of a given board, and store the subindex in the last bytes.
  • add the channel list to the board class (bit mask?)
  • properly assign channels to the (sub)board object in the constructor
  • adapt the getBoard method to hide the (index, type) encoding

Linker errors with CAENVMELib 3.3.0

I have linker errors using the latest version of CAENVMELib: undefined reference to CAENVME_DecodeError. The linking works fine if I comment this function in CommonDef.h. Running nm -gDC lib/x64/libCAENVME.so.3.3.0 does not show CAENVME_DecodeError, so it really looks like that function definition is missing from that build... although the declaration is present in include/CAENVMElib.h.

I've opened a ticket with CAEN support, but I was wondering which version has been used in the past that compiled correctly...?

Cannot call VME interface methods

various flavors of read/write requite a void* to a int. This doesn't work in python. The solution might be to use uint64_t instead for simple methods.

Need a way also for block transfers.

Python bindings sometimes useless

Some of the methods that are exposed cannot be used because of missing translations. One example is the ChannelGroup::find methods, returning (or using) iterators. There are few similar examples, or methods that work not in a friendly way.

Inconsistent units

The units for V and I are inconsistent.
For example, Vmon & Imon must be divided by 10^dec.

The convention is otherwise to let the "set" quantities explicitly as they are sent to the hardware, so the user must be aware of the powers of 10 to use.

add group operations (SY527 fw 3.04)

Since caen introduces the notion of groups of channels, we need typically a group class

  • initialized from the config on caenet with pointers to the channels
  • with methods to configure the group and read channel status in a group (must update the channel cache afterwards)
  • with methods to add a channel (either by index or by pointer)
  • with methods to remove a channel

Also, few additional caenet methods of general interest.

src/PythonModule.cpp gets bulky

Probably the simplest thing to do is to just call functions from a
central module definition. e.g.

//file 1
BOOST_PYTHON_MODULE(poc)
{
wrapFoo();
wrapBar();
wrapBaz();
}

//file 2
void wrapFoo() {
class_<...>(...);
}

//file 3
void wrapBar() {
class_<...>(...);
}

//file 4
void wrapBaz() {
class_<...>(...);
}

implement new features in SY527 fw 2.10

3 new caenet codes:
0x07: read hardware status. Requires a new status word for SY527 and related code.
0x08: self-test and restart (always)
0x09: self-test and restart (if success)
after these two, wait few seconds and perform a 0x07.
This requires one new method for SY527.

Test N470

similar but simpler than SY527.
Code ported from the original code but never tested. Should work.

CMAKE needs some tweaks

J'ai compilé vehemence sur la machine µTCA mais j'ai eu un peu de mal et il y aura peut-etre des choses à fixer dans CMAKE.

Evidemment les versions de cmake, boost et gcc sur centos sont trop vieilles mais on a pu installer des versions plus récentes avec les devtoolssets.

Malheureusement cmake ne détecte pas les nouvelles versions et malgré les requirements:

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Il ne signale pas de problèmes avant la compilation. J'ai donc ajouté les variable a la main:

# use proper boost version
set(BOOST_INCLUDEDIR "/usr/include/boost169")
set(BOOST_LIBRARYDIR "/usr/lib64/boost169")

# use proper c++ compiler
set(CMAKE_CXX_COMPILER "/opt/rh/devtoolset-8/root/usr/bin/g++")
set(CMAKE_CXX_FLAGS "-std=c++17")

Et il commence bien la compilation normalement, mais il plante au link avec:

[ 84%] Building CXX object examples/CMakeFiles/exampleFull.dir/exampleFull.cpp.o
Linking CXX executable exampleFull
/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: CMakeFiles/exampleFull.dir/exampleFull.cpp.o: undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
//lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [examples/exampleFull] Error 1

​J'ai donc du ajouter (google est mon ami):

set(CMAKE_CXX_FLAGS "-std=c++17 -pthread")

Voilà, après tout cela c'est compilé, mais il faudra juste comprendre pourquoi cmake ne signale pas le manque de C++17 et pourquoi j'ai du ajouter -pthread aux flags. Pour boost, on sait que findboost n'est pas une flèche et je ne suis pas étonné d'avoir du ajouter les variables à la main 😄

need a wrapper for std::vector<int> in python

The caenet bridge write method uses a std::vector as input.

Either change that to something more python-friendly, or add a wrapper.
As it is now, there is no way to use the method in python.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.