Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
sveseli committed Dec 24, 2022
2 parents 24f3285 + e7b3ad5 commit b40fd1b
Show file tree
Hide file tree
Showing 20 changed files with 1,257 additions and 489 deletions.
4 changes: 2 additions & 2 deletions configure/BUILD.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BUILD_NUMBER=1
EPICS_BASE_VERSION=7.0.7
BOOST_VERSION=1.78.0
PVAPY_VERSION=5.2.0
BOOST_VERSION=1.81.0
PVAPY_VERSION=5.2.1
PVAPY_GIT_VERSION=master
11 changes: 11 additions & 0 deletions documentation/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## Release 5.2.1 (2022/11/DD)

- Fixed issue with put into PvObjectQueue when timeout is given
- Updated default value for PvTimeStamp userTag field to 0
- Area Detector Simulator enhancements:
- added ability to load images from HDF5 files (either compressed or uncompressed)
- Conda/pip package dependencies:
- EPICS BASE = 7.0.7
- BOOST = 1.81.0
- NUMPY >= 1.22 (for python >= 3.8); >= 1.19, < 1.21 (for python < 3.8)

## Release 5.2.0 (2022/11/04)

- Streaming Framework enhancements:
Expand Down
24 changes: 24 additions & 0 deletions documentation/sphinx/pvapy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,27 @@ AdImageDataEncryptor
:members:
:inherited-members:

UserMpDataProcessor
-------------------

.. autoclass:: pvapy.hpc.userMpDataProcessor.UserMpDataProcessor()
:show-inheritance:
:members:
:inherited-members:

UserMpWorker
------------

.. autoclass:: pvapy.hpc.userMpWorker.UserMpWorker()
:show-inheritance:
:members:
:inherited-members:

UserMpWorkerController
----------------------

.. autoclass:: pvapy.hpc.userMpWorkerController.UserMpWorkerController()
:show-inheritance:
:members:
:inherited-members:

68 changes: 68 additions & 0 deletions examples/umpDataProcessorExample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env python

from pvapy.utility.loggingManager import LoggingManager
from pvapy.hpc.userMpDataProcessor import UserMpDataProcessor
from pvapy.hpc.userMpWorkerController import UserMpWorkerController
import multiprocessing as mp

# Example for implementing data processor that spawns separate unix process
class UmpDataProcessor2(UserMpDataProcessor):
def __init__(self):
UserMpDataProcessor.__init__(self)
self.udp = UmpDataProcessor()
self.iq = mp.Queue()
self.uwpc = UserMpWorkerController(2, self.udp, self.iq)

def start(self):
self.uwpc.start()

def configure(self, configDict):
self.configure(configDict)

def process(self, pvObject):
self.iq.put(pvObject)
return pvObject

def resetStats(self):
self.uwpc.resetStats()

def getStats(self):
return self.uwpc.getStats()

def stop(self):
self.uwpc.stop()

class UmpDataProcessor(UserMpDataProcessor):

def __init__(self):
UserMpDataProcessor.__init__(self)
self.nProcessed = 0

# Process monitor update
def process(self, pvObject):
self.nProcessed += 1
self.logger.debug(f'Processing: {pvObject} (nProcessed: {self.nProcessed})')
return pvObject

# Reset statistics for user processor
def resetStats(self):
self.nProcessed = 0

# Retrieve statistics for user processor
def getStats(self):
return {'nProcessed' : self.nProcessed}

if __name__ == '__main__':
LoggingManager.addStreamHandler()
LoggingManager.setLogLevel('DEBUG')
udp = UmpDataProcessor2()
iq = mp.Queue()
uwpc = UserMpWorkerController(1, udp, iq)
uwpc.start()
import time
for i in range(0,10):
iq.put(i)
time.sleep(1)
print(uwpc.getStats())
statsDict = uwpc.stop()
print(statsDict)
Loading

0 comments on commit b40fd1b

Please sign in to comment.