@@ -45,7 +45,7 @@ dependencies are available.
45
45
46
46
::
47
47
48
- $ python -m unittest -v test .test_ioc
48
+ (devioc) $ python -m unittest -v devioc.tests .test_ioc
49
49
50
50
51
51
Write your first IOC
@@ -64,14 +64,15 @@ Your IOC application can be structured at will although we recommend the followi
64
64
└── ioc.py # IOC module containing your IOC application
65
65
66
66
67
- A program is included to create a default IOC project.
67
+ A program is included to create a default IOC project. This can be run within the ` devioc ` virtual environment as follows
68
68
69
69
::
70
70
71
- $ devioc-startproject myioc
71
+ (devioc) $ devioc-startproject myioc
72
72
73
- That will create a directory structure similar to the one listed above, except the `opi.client ` file which you
74
- will have to create yourself based on your preferred EPICS display manager.
73
+ This will create a directory structure similar to the one listed above, except the `opi.client ` file which you
74
+ will have to create yourself based on your preferred EPICS display manager. The project created as such is
75
+ a fully functional example application that you can modify as needed.
75
76
76
77
77
78
Creating the IOC Model
@@ -196,13 +197,13 @@ The script **bin/app.server** is responsible for running the IOC Application. An
196
197
197
198
# Setup command line arguments
198
199
parser = argparse.ArgumentParser(description = ' Run IOC Application' )
199
- parser.add_argument(' -v ' , action = ' store_true' , help = ' Verbose Logging' )
200
+ parser.add_argument(' --verbose ' , action = ' store_true' , help = ' Verbose Logging' )
200
201
parser.add_argument(' --device' , type = str , help = ' Device Name' , required = True )
201
202
202
203
203
204
if __name__ == ' __main__' :
204
205
args = parser.parse_args()
205
- if args.v :
206
+ if args.verbose :
206
207
log.log_to_console(logging.DEBUG )
207
208
else :
208
209
log.log_to_console(logging.INFO )
@@ -219,6 +220,13 @@ The script **bin/app.server** is responsible for running the IOC Application. An
219
220
220
221
This example uses the `Twisted <https://pypi.org/project/Twisted/ >`_ framework. It is highly recommended to use it too.
221
222
223
+ The above script is executed to start the application within the `devioc ` virtual environment as follows:
224
+
225
+ ::
226
+
227
+ (devioc) $ myioc/bin/app.sever --device MYIOC-001
228
+
229
+
222
230
Record Types
223
231
============
224
232
0 commit comments