--- /dev/null
+# How to run this IOC as a Docker image
+
+ docker run --rm -it -p 5064-5065:5064-5065 -p 5064-5065:5064-5065/udp pklaus/mvd_trbnet:latest
+
+Press Ctrl-C to stop. If everything worked well, you may proceed with starting the IOC in background and restarting on reboot.
+
+To start the container with the IOC in the background, the daemon parameter `-d` can be used. To have it reboot upon
+
+To start the example IOC in background (-d), run:
+
+ docker run \
+ -d -i -t \
+ --restart=always \
+ -p 5064-5065:5064-5065 \
+ -p 5064-5065:5064-5065/udp \
+ -w /epics/iocs/example/iocBoot/iocEXAMPLE \
+ pklaus/mvd_trbnet:latest
+
+To attach to the IOC later on, you may run
+
+ docker attach $(docker ps -q)
+
+To leave the attached process again, press Ctrl-p followed by Ctrl-q.
--- /dev/null
+#!/usr/bin/env python
+
+from trbnet.epics import TrbNetIOC
+
+ioc = TrbNetIOC()
+ioc.prefix = 'CBM:MVD:TRB:'
+
+print("\n______________________________________________\n\n")
+print("MVD TrbNet PCASpy IOC starting up.")
+print("Prefix: {}".format(ioc.prefix))
+print("\n______________________________________________\n\n")
+
+expected_trbs = {
+ 0xffff: [0xd010, 0xd011, 0xd012, 0xd013, 0xc010],
+ 0xfe4d: [0xd010, 0xd011, 0xd012, 0xd013],
+}
+
+for send_to_trb_address, answer_from_trb_addresses in expected_trbs.items():
+ ioc.add_expected_trb_addresses(send_to_trb_address, answer_from_trb_addresses)
+
+ioc.add_subscription(0xffff, 'TrbNet', 'StatusRegisters')
+ioc.add_subscription(0xfe4d, 'Mvd', 'ReadoutController')
+ioc.add_subscription(0xfe4d, 'CbController', 'CbCtrlReg')
+ioc.add_subscription(0xfe4d, 'CbController', 'CbSpiStream')
+ioc.add_subscription(0xfe4d, 'CbController', 'CbSpiRam')
+ioc.add_subscription(0xfe4d, 'CbController', 'CbUcReg')
+ioc.add_subscription(0xfe4d, 'JtagController', 'JtagCommonControl')
+ioc.add_subscription(0xfe4d, 'JtagController', 'JtagControl')
+ioc.add_subscription(0xfe4d, 'JtagController', 'JtagStatus')
+
+print("Failures to reach TrbNet or to read certain registers might show up"
+ "following this line...\n")
+ioc.initialize()
+
+all_pvs = ioc.all_pvs
+print("\n\n______________________________________________\n\n")
+print("Number of PVs monitored by this IOC: {}".format(len(all_pvs)))
+print("The first 10 PVs are named:\n" + "\n".join(all_pvs[0:10]))
+print("\n______________________________________________\n\n")
+
+ioc.run()