The delivery includes three test clients with source code, written in Microsoft VC++, VB and Borland Delphi, to demonstrate the capabilities of the SDM server. Those built from VB and Borland Delphi, are a subset of the VC++ test client. The following discussion is based on the one built with MS VC++.
The user interface is simply a collection of buttons, which are divided into four groups:
- Feature selection This group has an Obsolete subgroup with two buttons, Select Feature (2-way) and Select Feature (1-way). Below this sub-group, there is a group of five buttons: Select single feature (2-way), Select feature collection (2-way), Select single feature (1-way), Select feature collection (1-way) and Change selection color. When the selection is confirmed, some feature or features are selected, and a Query button appears under this sub-group. Finally there are two buttons at the bottom, Get List in Circle and Get List in Smoke Field.
- Add/Delete Features There are 10 buttons: Get Point (two-way), Get Point (one-way), Add Point Feature, Add Label Point Feature, Add Line, Add Point to Line, Add Circle, Add Smoke Field, Delete Feature and Delete All.
- Feature appearance There are four buttons that allow feature color control: Change Feature Color, Change Feature Code Color, Reset Feature Color and Reset Feature Code color. Feature or layer visibility can be manipulated with 4 buttons for features Feature Visibility Off, Feature Visibility On, Feature Code Visibility Off, and Feature Code Visibility On and 2 buttons for layer Layer Visibility Off and Layer Visibility On. Finally, there is one button to set feature symbolization on/off (Symbolization), and a button to turn a tracking line to a collection of points (Line as points).
- Display Control It consists of the following buttons: Overview, Center At Point, Center At Feature, Zoom In, Zoom Out, Zoom To Fit, Get Rect (2-way), Get Rect (1-way), Zoom to fit Points, Order Front, Get Display Extent, Set Display Extent, Get display scale, Print current display, Set zoom by rect, Maximize Main Wnd, Move/Resize Main Wnd, Minimize Main Wnd, Restore Main Wnd, Open New View, Minimize Overview Wnd, Restore Overview Wnd, set mouse neutral.
Five buttons appear in the lower left corner:
In the middle of the interface panel, there are three text entry fields for arguments required by some buttons. These buttons invoke client callback methods that call the services with the most important arguments obtained from the text entry fields or from information obtained via previous actions. Additional arguments are hard-wired. Table IV-1 serves as a combination client users guide and roadmap to the callback methods that contain the API examples.
When adding features, a CARIS key is required. The test client generates these keys automatically. For point, labeled point, and line features the key has the form: FCODEnnn, where FCODE is the feature code supplied by the user (via text field 1) and nnn is a number starting with zero. Point and Labeled Point features share the same counter, while Line Features have their own counter. Thus, if the first point feature added is given feature code MPAW, its key will be MPAW000. If a labeled point feature is then added with feature code DACA30, its key will be DACA30001. If a line feature is then added with feature code PADL, its key will be PADL000. Circle and smoke field features each have their own counters, and are given keys "circlennn" and "smkFldnnn", respectively.
When the test client adds a Line Feature, it is hard-wired to have the shape of a "W", with its top-left point at the currently stored point (obtained via the last getPoint). The lengths of the segments of the "W" are supplied by the user, via text field 2. Whether the end-points of the segments are 2D or 3D points is determined by the user via text field 3. If the points are 3D, the 3rd coordinate list is {0,3,6,9,12}.
When this testClient is executed, it brings up an SDM view that permits the user to load data from the client panel, or a File menu that allows the user to open a file. Note that the look and feel of the SDM is different from the standard SDM (Fig. IV-2), i.e the File and Readout on the menus becomes Chart and NAV, respectively, and a new menu item, MarineOps is added. This is done deliberately in order to show the new APIs from the SDM server, allowing the AP developer to modify menu names and to add one additional item to the menu.
![]()
Fig. IV-1 Test Client User Interface
Table IV-1 Test Client Button Summary
|
Button Title |
Prerequisites |
Text Entry Fields |
Callback |
API Method |
|
1. Feature Selection |
||||
| Select single feature (2-way) |
None |
1.
a feature code (wild card accepted) |
OnButton45 |
setSelectSingleFeature |
| Select feature collection (2-way) |
None |
1.
a feature code (wild card accepted) |
OnButton46 |
setSelectFeatureCollection |
| Select single feature (1-way) |
None |
1.
a feature code (wild card accepted) |
selectSingleFeature |
|
| Select feature collection (1-way) |
None |
1. a feature code (wild card accepted) |
OnButton47 |
selectFeatureCollection |
| Change selection color |
None |
Not used |
OnButton49 |
setSelectionColor |
| Query |
Valid selection, (via any of the above methods) |
1.
selection index or CARIS key 2. "C" or "S" (Client or Server displays query result 3. extra name/value pair (or blank) |
OnQuery |
GetKeys, OR querySelectionByKey |
| Get List in Circle |
At least one circle added |
1.
CARIS key of a circle, i.e. "circle"nnn 2. feature code: of points or labeled points |
OnButton37 |
getFeaturesInsideShape |
| Get List in Smoke Field |
At least one smoke field added |
1.
CARIS key of a smoke field, i.e. "smkFld"nnn 2. feature code: of points or labeled points |
OnButton33 |
getFeaturesInsideShape |
|
Button Title |
Prerequisites |
Text Entry Fields |
Callback |
API Method |
|
2. Add/Delete features |
||||
| Get Point (2-way) |
None |
Not used |
OnButton4 |
setSendPoint |
| Get Point (1-way) |
None |
Not used |
OnButton5 |
getPoint, |
|
Add Point Feature |
Get Point |
1.feature code |
OnButton1 |
createNewPointFeature |
|
Add Labeled Point Feature |
Get Point |
1.feature code 2.label(s) |
OnButton36 |
createNewLabeledPoint |
|
Add Line |
Get Point |
1.feature code 2.segment length "2D" or "3D" |
OnButton52 |
createNewLineFeature |
|
Add Point to Line |
Get Point |
1. CARIS key of a line feature 2. 3rd Coordinate, if line has 3D points |
OnAddtoline |
appendPointToLineFeature |
|
Add Circle |
None |
1. CARIS key of a point or labeled
point feature 2. radius |
OnButton15 |
addCircleToFeature |
|
Add Smoke Field |
Get Point |
1. long radius 2. short radius 3. angle |
OnButton21 |
addSmokeField |
|
Delete feature |
Transient fea-ture(s) added |
1. CARIS key of a transient feature |
OnButton12 |
deleteFeature |
|
Delete All |
Transient fea-ture(s) added |
1. feature code |
OnButton13 |
deleteFeatureAll |
|
Button Title |
Prerequisites |
Text Entry Fields |
Callback |
API Method |
|
3. Feature appearance |
||||
|
Change Feature Color |
None |
1. CARIS key |
OnButton17 |
setFeatureColor |
|
Reset Feature Color |
Change Feature Color |
1. CARIS key with changed color |
OnButton18 |
resetFeatureColor |
|
Change Feature Code Color |
None |
1. feature code |
OnButton19 |
setFeatureColorAll |
|
Reset Feature Code Color |
Change Feature Code Color |
1. feature code |
OnButton20 |
resetFeatureColorAll |
|
Move point feature |
Get Point |
1. CARIS key of a point or labeled point |
OnMovePoint |
movePointToNewPosition |
|
Rotate point feature |
None |
1. CARIS key of a point or labeled
point 2. angle |
OnRotPoint |
setSymbolOrientation |
|
Line as points |
Add Line |
1. CARIS key of a line 2. "0" for normal;"1" for as points;"2" for both 3. feature code of a point |
OnLineAsPoints |
showLineAsPoints |
|
Feature Visibility Off |
None |
1. CARIS key |
OnButton50 |
setFeatureVisibility |
|
Feature Visibility On |
Feature Visiblity Off |
1.CARIS key |
OnButton51 |
setFeatureVisibility |
|
Feature Code Visibility Off |
None |
1.feature code |
OnButton10 |
setFeatureVisibilityAll |
|
Feature Code Visibility On |
Feature Visibility Off |
1.feature code |
OnButton11 |
setFeatureVisibilityAll |
|
Layer Visibility Off |
None |
1.layer name |
OnButton39 |
setLayerVisibility |
|
Layer Visibility On |
Layer Visibility Off |
|
OnButton40 |
setLayerVisibility |
|
Symbolization |
None |
1. T or F |
OnButtonSymb |
set SymbolizationOn |
|
Button Title |
Prerequisites |
Text Entry Fields |
Callback |
API Method |
|
4. Display Control |
||||
| Overview |
None |
Not used |
OnButton6 |
setOverview |
| Center at Point |
Get Point |
Not used |
OnButton7 |
centerAtPoint |
| Center at Feature |
None |
1. CARIS key of a point feature |
OnButton16 |
centerAtFeature |
| Zoom In |
None |
Not used |
OnButton8 |
zoomByPercent |
| Zoom Out |
None |
Not used |
OnButton9 |
zoomByPercent |
| Zoom to Fit |
None |
1.CARIS key of extended feature |
OnButton14 |
zoomToFitFeature |
| Zoom to fit Points |
Add Point or |
1.
feature code of a group of point or labeled point features 2. number of points |
OnFitPoints |
zoomToFitPoints |
| Order Front |
None |
Not used |
OnButton34 |
orderFront |
| Get Display Extent |
None |
Not used |
OnButton35 |
getDisplayedMapExtent |
| Set Display Extent |
Get Display Extent |
Not used |
OnButton38 |
setDisplayedMapExtent |
| Get Display Scale |
None |
Not used |
OnButton41 |
getDisplayScale |
| Set Geodetic | ||||
| Set Zoom by rect |
None |
Not used |
OnButton43 |
setZoomByRectMode |
| LoadFile | ||||
| Maximize Main Wnd |
None |
Not used |
OnButtMaxmain |
maximizeMainWnd |
| Move/Resize Main Wnd |
None |
Not used |
OnButtMovemain |
MoveMainWnd |
| Minimize Main Wnd |
None |
Not used |
OnButtMinmain |
minimizeMainWnd |
| Restore Main Wnd |
maximizeMainWnd or minimizeMainWnd |
Not used |
OnButtRstrovrwnd |
restoreMainWnd |
| Open New View |
None |
Not used |
OnButtOpenview |
openNewView |
| Minimize Overview Wnd |
None |
Not used |
OnButtMinovrwnd |
minimizeOverviewWnd |
| Restore Overview Wnd |
None |
Not used |
OnButtRstrovrwnd |
restoreOverviewWnd |
| Load File |
None |
1. Full Path |
OnLoadFile |
OpenNewForFile |
| Redraw Current |
None |
Not used |
OnRedraw |
RedrawCurrent |
|
Button Title |
Prerequisites |
Text Entry Fields |
Callback |
API Method |
|
5. Miscellaneous |
||||
| Copy to Clipboard |
openNewView or view opened by SDM |
Not used |
OnButtC2CLPBRD |
copyToClipboard |
| Print Current Display |
None |
Not used |
OnButton42 |
printCurrentDisplay |
|
6. PlugIn |
||||
| Do composition |
None |
Not Used |
OnButton4 |
doComposition |
| Start SSM |
Add tracks to SDM |
Not Used |
OnbuttonssmSt |
None |
| Kill SSM |
SSM running |
|
||
|
Button Title |
Prerequisites |
Text Entry Fields |
Callback |
API Method |
Appendix >>>>