Skip to content

Commit b40fd1b

Browse files
committed
update version
2 parents 24f3285 + e7b3ad5 commit b40fd1b

20 files changed

+1257
-489
lines changed

configure/BUILD.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BUILD_NUMBER=1
22
EPICS_BASE_VERSION=7.0.7
3-
BOOST_VERSION=1.78.0
4-
PVAPY_VERSION=5.2.0
3+
BOOST_VERSION=1.81.0
4+
PVAPY_VERSION=5.2.1
55
PVAPY_GIT_VERSION=master

documentation/RELEASE_NOTES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## Release 5.2.1 (2022/11/DD)
2+
3+
- Fixed issue with put into PvObjectQueue when timeout is given
4+
- Updated default value for PvTimeStamp userTag field to 0
5+
- Area Detector Simulator enhancements:
6+
- added ability to load images from HDF5 files (either compressed or uncompressed)
7+
- Conda/pip package dependencies:
8+
- EPICS BASE = 7.0.7
9+
- BOOST = 1.81.0
10+
- NUMPY >= 1.22 (for python >= 3.8); >= 1.19, < 1.21 (for python < 3.8)
11+
112
## Release 5.2.0 (2022/11/04)
213

314
- Streaming Framework enhancements:

documentation/sphinx/pvapy.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,27 @@ AdImageDataEncryptor
5858
:members:
5959
:inherited-members:
6060

61+
UserMpDataProcessor
62+
-------------------
63+
64+
.. autoclass:: pvapy.hpc.userMpDataProcessor.UserMpDataProcessor()
65+
:show-inheritance:
66+
:members:
67+
:inherited-members:
68+
69+
UserMpWorker
70+
------------
71+
72+
.. autoclass:: pvapy.hpc.userMpWorker.UserMpWorker()
73+
:show-inheritance:
74+
:members:
75+
:inherited-members:
76+
77+
UserMpWorkerController
78+
----------------------
79+
80+
.. autoclass:: pvapy.hpc.userMpWorkerController.UserMpWorkerController()
81+
:show-inheritance:
82+
:members:
83+
:inherited-members:
84+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env python
2+
3+
from pvapy.utility.loggingManager import LoggingManager
4+
from pvapy.hpc.userMpDataProcessor import UserMpDataProcessor
5+
from pvapy.hpc.userMpWorkerController import UserMpWorkerController
6+
import multiprocessing as mp
7+
8+
# Example for implementing data processor that spawns separate unix process
9+
class UmpDataProcessor2(UserMpDataProcessor):
10+
def __init__(self):
11+
UserMpDataProcessor.__init__(self)
12+
self.udp = UmpDataProcessor()
13+
self.iq = mp.Queue()
14+
self.uwpc = UserMpWorkerController(2, self.udp, self.iq)
15+
16+
def start(self):
17+
self.uwpc.start()
18+
19+
def configure(self, configDict):
20+
self.configure(configDict)
21+
22+
def process(self, pvObject):
23+
self.iq.put(pvObject)
24+
return pvObject
25+
26+
def resetStats(self):
27+
self.uwpc.resetStats()
28+
29+
def getStats(self):
30+
return self.uwpc.getStats()
31+
32+
def stop(self):
33+
self.uwpc.stop()
34+
35+
class UmpDataProcessor(UserMpDataProcessor):
36+
37+
def __init__(self):
38+
UserMpDataProcessor.__init__(self)
39+
self.nProcessed = 0
40+
41+
# Process monitor update
42+
def process(self, pvObject):
43+
self.nProcessed += 1
44+
self.logger.debug(f'Processing: {pvObject} (nProcessed: {self.nProcessed})')
45+
return pvObject
46+
47+
# Reset statistics for user processor
48+
def resetStats(self):
49+
self.nProcessed = 0
50+
51+
# Retrieve statistics for user processor
52+
def getStats(self):
53+
return {'nProcessed' : self.nProcessed}
54+
55+
if __name__ == '__main__':
56+
LoggingManager.addStreamHandler()
57+
LoggingManager.setLogLevel('DEBUG')
58+
udp = UmpDataProcessor2()
59+
iq = mp.Queue()
60+
uwpc = UserMpWorkerController(1, udp, iq)
61+
uwpc.start()
62+
import time
63+
for i in range(0,10):
64+
iq.put(i)
65+
time.sleep(1)
66+
print(uwpc.getStats())
67+
statsDict = uwpc.stop()
68+
print(statsDict)

0 commit comments

Comments
 (0)