1 | function aoinit(SubMachineName) |
---|
2 | %AOINIT - Initialization function for the Matlab Middle Layer (MML) |
---|
3 | % |
---|
4 | % |
---|
5 | % See Also boosterinit, setpathsoleil, setoperationalmode |
---|
6 | |
---|
7 | % Written by Laurent S. Nadolski |
---|
8 | |
---|
9 | if exist('SubMachineName', 'var') && ~strcmpi(SubMachineName, 'Booster') |
---|
10 | error('Wrong SubMachine %s', SubMachineName) |
---|
11 | end |
---|
12 | |
---|
13 | % The path should not be modified in standalone mode |
---|
14 | if ~isdeployed_local |
---|
15 | |
---|
16 | MMLROOT = getmmlroot; |
---|
17 | MMLDATAROOT = getmmldataroot; |
---|
18 | |
---|
19 | addpath(fullfile(MMLDATAROOT, 'measdata', 'SOLEIL', 'Boosterdata')); |
---|
20 | addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'BoosterOpsData')); |
---|
21 | addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'Booster', 'applications')); |
---|
22 | addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'Booster', 'bpm')); |
---|
23 | addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'Booster', 'Lattices')); |
---|
24 | |
---|
25 | % APPLICATIONS |
---|
26 | addpath(fullfile(MMLROOT, 'mml', 'setorbitbumpgui')); |
---|
27 | addpath(fullfile(MMLROOT, 'mml', 'setorbitgui')); |
---|
28 | |
---|
29 | |
---|
30 | % Make sure mml is high on the path |
---|
31 | addpath(fullfile(MMLROOT, 'mml'),'-begin'); |
---|
32 | |
---|
33 | disp(['TANGO/MATLAB binding version: ' tango_version]) |
---|
34 | disp('Startup file for Matlab Middle Layer read with success'); |
---|
35 | |
---|
36 | end |
---|
37 | |
---|
38 | % Initialize the MML for machine |
---|
39 | |
---|
40 | boosterinit; |
---|
41 | |
---|
42 | function RunTimeFlag = isdeployed_local |
---|
43 | % isdeployed is not in matlab 6.5 |
---|
44 | V = version; |
---|
45 | if str2double(V(1,1)) < 7 |
---|
46 | RunTimeFlag = 0; |
---|
47 | else |
---|
48 | RunTimeFlag = isdeployed; |
---|
49 | end |
---|
50 | |
---|