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