Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions python/pyrogue_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ def exit_message(message):
def get_host_name():
return subprocess.check_output("hostname").strip().decode("utf-8")

class DataBuffer(rogue.interfaces.stream.Slave):
class DataBuffer(rogue.interfaces.stream.Subordinate):
"""
Data buffer class use to capture data coming from the stream FIFO \
and copy it into a local buffer using a specific data format.
"""
def __init__(self, size, data_type):
rogue.interfaces.stream.Slave.__init__(self)
rogue.interfaces.stream.Subordinate.__init__(self)
self._buf = [0] * size

# Supported data format and byte order
Expand Down Expand Up @@ -278,11 +278,11 @@ def __init__(self, ip_addr, config_file, server_mode, group_name, epics_prefix,\
else:
fifo_size = stream_pv_size * 4

# Setup a FIFO tapped to the stream data and a Slave data buffer
# Setup a FIFO tapped to the stream data and a Subordinate data buffer
# Local variables will talk to the data buffer directly.
stream_fifo = rogue.interfaces.stream.Fifo(0, fifo_size)
data_buffer = DataBuffer(size=stream_pv_size, data_type=stream_pv_type)
stream_fifo._setSlave(data_buffer)
stream_fifo._setSubordinate(data_buffer)

pyrogue.streamTap(fpga.stream.application(0x80 + i), stream_fifo)

Expand Down Expand Up @@ -404,7 +404,7 @@ def __init__(self, ip_addr, config_file, server_mode, group_name, epics_prefix,\
.format(stream_pv_size,stream_pv_type))

for i in range(8):
stream_slave = self.epics.createSlave(name="AMCc:Stream{}".format(i), maxSize=stream_pv_size, type=stream_pv_type)
stream_subordinate = self.epics.createSubordinate(name="AMCc:Stream{}".format(i), maxSize=stream_pv_size, type=stream_pv_type)

# Calculate number of bytes needed on the fifo
if '16' in stream_pv_type:
Expand All @@ -413,7 +413,7 @@ def __init__(self, ip_addr, config_file, server_mode, group_name, epics_prefix,\
fifo_size = stream_pv_size * 4

stream_fifo = rogue.interfaces.stream.Fifo(0, fifo_size)
stream_fifo._setSlave(stream_slave)
stream_fifo._setSubordinate(stream_subordinate)
pyrogue.streamTap(fpga.stream.application(0x80+i), stream_fifo)

self.epics.start()
Expand Down