|
1 | | -# bact-archiver BACT: access to the archiver appliance |
| 1 | +# bact-archiver: access to the archiver appliance |
2 | 2 |
|
3 | | -Build instructions |
4 | | ------------------- |
| 3 | +## Usage |
5 | 4 |
|
6 | | -Distribution files contain the files generated by protoc and cython. THus |
7 | | -standard python build commands are sufficient. If you are using the |
8 | | -git repository you need to execute described below. |
9 | 5 |
|
| 6 | +Typically download bact-archiver-local. |
| 7 | +Rename it and configure it as described in the configuration section of this |
| 8 | +package documentation. |
10 | 9 |
|
11 | | -Rebuilding generated files |
12 | | --------------------------- |
| 10 | +Then you can use it by |
13 | 11 |
|
14 | | -This packages uses the following code generation tools |
| 12 | +```python3 |
15 | 13 |
|
16 | | -* protoc, the protocl buffer compiler |
17 | | -* cython, the cython compiler |
| 14 | +from <your-local-bact-archiver-package> import default as default_archiver |
| 15 | +import datetime |
18 | 16 |
|
19 | | -To rebuild the files generated by protoc use |
20 | | -```shell |
21 | | -> python3 setup.py build_proto_c |
22 | | -``` |
23 | | - |
24 | | -To force that the cython generated files are rebuilt use |
25 | | -```shell |
26 | | -> CYTHONIZE=1 setup.py |
27 | | -``` |
| 17 | +t0 = datetime.datetime(2020, 11, 20, 7, 40) |
| 18 | +t1 = datetime.datetime(2020, 11, 20, 7, 50) |
28 | 19 |
|
29 | | -Finally use the usual build commands: |
30 | | -```shell |
31 | | -> python3 setup.py build |
| 20 | +pvname = 'TOPUPCC:rdCur' |
| 21 | +df = default_archiver.getData(pvname, t0=t0, t1=t1) |
32 | 22 | ``` |
0 commit comments