[4] | 1 | function aoinit(SubMachineName) |
---|
| 2 | %AOINIT - Initialization function for the Matlab Middle Layer (MML) |
---|
| 3 | % |
---|
| 4 | % |
---|
| 5 | % See Also soleilinit, setpathsoleil |
---|
| 6 | |
---|
| 7 | % Written by Laurent S. Nadolski |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | if exist('SubMachineName', 'var') && ~strcmpi(SubMachineName, 'LT2') |
---|
| 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 | MMLDATAROOT = getmmldataroot; |
---|
| 19 | |
---|
| 20 | addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'LT2OpsData')); |
---|
| 21 | addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'LT2')); |
---|
| 22 | addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'LT2', 'Lattices')); |
---|
| 23 | addpath(fullfile(MMLROOT, 'machine', 'SOLEIL', 'LT2', 'emittance')); |
---|
| 24 | |
---|
| 25 | % Make sure mml is high on the path |
---|
| 26 | addpath(fullfile(MMLROOT, 'mml'),'-begin'); |
---|
| 27 | |
---|
[5] | 28 | %disp(['TANGO/MATLAB binding version: ' tango_version]) |
---|
[4] | 29 | disp('Startup file for Matlab Middle Layer read with success'); |
---|
| 30 | |
---|
| 31 | end |
---|
| 32 | |
---|
| 33 | % Initialize the MML for machine |
---|
| 34 | |
---|
| 35 | LT2init; |
---|
| 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 |
---|