Cat
Python.cpp
Go to the documentation of this file.
1 #include <vector>
2 #include <list>
3 
4 #include "Processus.h"
5 //#include "SpecsElement.h"
6 
7 #include "Phaser.h"
8 #include "PhaserRampExec.h"
9 
10 #include <boost/python.hpp>
11 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
12 
13 using namespace boost::python;
14 
16 {
17  void (Phaser::*setPhasex2)(unsigned char, unsigned char) = (&Phaser::setPhase);
18  void (Phaser::*setPhasex4)(unsigned char, unsigned char,
19  unsigned char, unsigned char) = (&Phaser::setPhase);
20 
21  class_<Phaser, bases <Element> >("Phaser")
22  .def("setPhase",setPhasex2)
23  .def("setPhase",setPhasex4)
24  .def("phase",&Phaser::phase)
25  .def("read" ,&Phaser::read)
26  .def("write",&Phaser::write)
27  .def("reg" ,&Phaser::reg,return_value_policy<reference_existing_object>())
28  ;
29 
30  class_<PhaserRampExec,bases <Processus> >("PhaserRampExec")
31  .def("initialize",&PhaserRampExec::initialize)
32  .def("execute",&PhaserRampExec::execute)
33  .def("finalize",&PhaserRampExec::finalize)
34  ;
35 }
36 
virtual StatusCode execute()
Definition: Phaser.h:19
void setPhase(unsigned char channel, unsigned char value)
Definition: Phaser.h:42
Register * reg()
Definition: Phaser.h:101
BOOST_PYTHON_MODULE(libCatBcn)
Definition: Python.cpp:24
virtual StatusCode finalize()
virtual StatusCode initialize()
unsigned int phase(unsigned int ch)
Definition: Phaser.h:63
void read()
Definition: Phaser.cpp:23
void write()
Definition: Phaser.cpp:46