Rev | Line | |
---|
[113] | 1 | function dataConnectionMode = dataMode(h)
|
---|
| 2 | % dataMode Change to active mode
|
---|
| 3 | % dataMode(FTP) returns the current connection status.
|
---|
| 4 | % Possible return strings are:
|
---|
| 5 | % 'ACTIVE_LOCAL_DATA_CONNECTION_MODE'
|
---|
| 6 | % 'ACTIVE_REMOTE_DATA_CONNECTION_MODE'
|
---|
| 7 | % 'PASSIVE_LOCAL_DATA_CONNECTION_MODE'
|
---|
| 8 | % 'PASSIVE_REMOTE_DATA_CONNECTION_MODE'
|
---|
| 9 |
|
---|
| 10 | % Idin Motedayen-Aval
|
---|
| 11 | % December 2004
|
---|
| 12 |
|
---|
| 13 | % Make sure we're still connected.
|
---|
| 14 | connect(h)
|
---|
| 15 |
|
---|
| 16 | if (nargin ~= 1)
|
---|
| 17 | error('Incorrect number of arguments.')
|
---|
| 18 | end
|
---|
| 19 |
|
---|
| 20 | modeNumber = h.jobject.getDataConnectionMode;
|
---|
| 21 |
|
---|
| 22 | switch modeNumber
|
---|
| 23 | case 0
|
---|
| 24 | dataConnectionMode = 'ACTIVE_LOCAL_DATA_CONNECTION_MODE';
|
---|
| 25 | case 1
|
---|
| 26 | dataConnectionMode = 'ACTIVE_REMOTE_DATA_CONNECTION_MODE';
|
---|
| 27 | case 2
|
---|
| 28 | dataConnectionMode = 'PASSIVE_LOCAL_DATA_CONNECTION_MODE';
|
---|
| 29 | case 3
|
---|
| 30 | dataConnectionMode = 'PASSIVE_REMOTE_DATA_CONNECTION_MODE';
|
---|
| 31 | otherwise
|
---|
| 32 | error ('Invalid data connection mode returned.');
|
---|
| 33 | end
|
---|
Note: See
TracBrowser
for help on using the repository browser.