00001
00066 #ifndef INC_MI32_MNETFUNC_H
00067 #define INC_MI32_MNETFUNC_H
00068
00069 #ifndef INC_RVC_OBJECTNAME_H
00070 #include <rvc/objectname.h>
00071 #endif
00072
00073 namespace RVC {
00074 class OBJITEM;
00075 }
00076
00077 struct COLOR;
00078
00079
00080
00081
00082
00083
00084
00085 #define NETWORK_TABLE_Line 0
00086 #define NETWORK_TABLE_Turn 1
00087 #define NETWORK_TABLE_Barrier 2
00088 #define NETWORK_TABLE_Angle 3
00089 #define NETWORK_TABLE_Count 4
00090
00091 #define NETWORK_ALLOCATION_In 0
00092 #define NETWORK_ALLOCATION_Out 1
00093
00094 #define NETWORK_LINE_DIRECTION_FromTo 0
00095 #define NETWORK_LINE_DIRECTION_ToFrom 1
00096
00097 #define NETWORK_LINE_DIRECTION_Disable 0
00098 #define NETWORK_LINE_DIRECTION_Enable 1
00099
00100 #define NETWORK_NODE_BARRIER_Off 0
00101 #define NETWORK_NODE_BARRIER_On 1
00102
00103 #define NETWORK_ANGLE_MAX 360
00104
00105
00106
00107
00108
00109
00110
00111
00112 typedef void *MNETWORKHANDLE;
00113 typedef void *MNETWORKSTOPHANDLE;
00114 typedef void *MNETWORKCENTERHANDLE;
00115 typedef void *MNETWORKROUTEHANDLE;
00116 typedef void *MNETWORKMULTIROUTEHANDLE;
00117 typedef void *MNETWORKALLOCATIONHANDLE;
00118
00119 typedef int (*MnetworkLineNameCallbackFunc)(void*, INT32, MIUNICODE*, int);
00120
00121
00122
00123
00124
00125
00126
00127 #if defined(__cplusplus)
00128 extern "C" {
00129 #endif
00130
00131
00132
00136
00137
00138
00140 int MnetworkMainInit (
00141 MNETWORKHANDLE *handle,
00142 const RVC::OBJITEM& VectObjItem
00143 );
00144
00146 int MnetworkMainFree (
00147 MNETWORKHANDLE *handle
00148 );
00149
00151 int MnetworkMainCreateStop (
00152 MNETWORKHANDLE handle,
00153 MNETWORKSTOPHANDLE *stopHandle
00154 );
00155
00157 int MnetworkMainCreateCenter (
00158 MNETWORKHANDLE handle,
00159 MNETWORKCENTERHANDLE *centerHandle
00160 );
00161
00163 int MnetworkMainSetDefault (
00164 MNETWORKHANDLE handle
00165 );
00166
00174 int MnetworkMainIsTable (
00175 MNETWORKHANDLE handle,
00176 const RVC::OBJECTNAME& tablename,
00177 UINT32 tabletype
00178 );
00179
00185 int MnetworkMainGetTableNames (
00186 MNETWORKHANDLE handle,
00187 RVC::OBJECTNAME **tablename,
00188 INT32 *tablecount,
00189 UINT32 tabletype
00190 );
00191
00197 int MnetworkMainReadTable (
00198 MNETWORKHANDLE handle,
00199 const RVC::OBJECTNAME& tablename,
00200 UINT32 tabletype
00201 );
00202
00208 int MnetworkMainWriteTable (
00209 MNETWORKHANDLE handle,
00210 RVC::OBJECTNAME& tablename,
00211 UINT32 tabletype
00212 );
00213
00215 int MnetworkMainSetLineNameAsCallback (
00216 MNETWORKHANDLE handle,
00217 MnetworkLineNameCallbackFunc cbfunc,
00218 void* cbdata
00219 );
00220
00222 int MnetworkMainSetLineNameAsTableAndField (
00223 MNETWORKHANDLE handle,
00224 RVC::OBJECTNAME& tablename,
00225 RVC::OBJECTNAME& fieldname
00226 );
00227
00231 INT32 MnetworkLineGetNumber (
00232 MNETWORKHANDLE handle
00233 );
00234
00238 int MnetworkLineIsUpdated (
00239 MNETWORKHANDLE handle
00240 );
00241
00247 int MnetworkLineSetImpedance (
00248 MNETWORKHANDLE handle,
00249 INT32 line,
00250 int direction,
00251 DOUBLE impedance
00252 );
00253
00259 int MnetworkLineGetImpedance (
00260 MNETWORKHANDLE handle,
00261 INT32 line,
00262 int direction,
00263 DOUBLE *impedance
00264 );
00265
00267 int MnetworkLineSetDemand (
00268 MNETWORKHANDLE handle,
00269 INT32 line,
00270 DOUBLE demand
00271 );
00272
00274 int MnetworkLineGetDemand (
00275 MNETWORKHANDLE handle,
00276 INT32 line,
00277 DOUBLE *demand
00278 );
00279
00289 int MnetworkLineSetDirectionState (
00290 MNETWORKHANDLE handle,
00291 INT32 line,
00292 int direction,
00293 int state
00294 );
00295
00305 int MnetworkLineGetDirectionState (
00306 MNETWORKHANDLE handle,
00307 INT32 line,
00308 int direction,
00309 int *state
00310 );
00311
00313 int MnetworkLineGetName (
00314 MNETWORKHANDLE handle,
00315 INT32 line,
00316 MIUNICODE *name,
00317 int size
00318 );
00319
00321 INT32 MnetworkLineGetNodeFrom (
00322 MNETWORKHANDLE handle,
00323 INT32 line
00324 );
00325
00327 INT32 MnetworkLineGetNodeTo (
00328 MNETWORKHANDLE handle,
00329 INT32 line
00330 );
00331
00333 INT32 MnetworkLineGetClosest (
00334 MNETWORKHANDLE handle,
00335 DPOINT2D *point,
00336 DOUBLE radius
00337 );
00338
00342 INT32 MnetworkNodeGetNumber (
00343 MNETWORKHANDLE handle
00344 );
00345
00351 int MnetworkNodeSetBarrierState (
00352 MNETWORKHANDLE handle,
00353 INT32 node,
00354 int state
00355 );
00356
00362 int MnetworkNodeGetBarrierState (
00363 MNETWORKHANDLE handle,
00364 INT32 node,
00365 int *state
00366 );
00367
00369 int MnetworkNodeGetName (
00370 MNETWORKHANDLE handle,
00371 INT32 node,
00372 MIUNICODE *name,
00373 int size
00374 );
00375
00379 int MnetworkNodeGetNumberOfLines (
00380 MNETWORKHANDLE handle,
00381 INT32 node
00382 );
00383
00387 INT32 MnetworkNodeGetLine (
00388 MNETWORKHANDLE handle,
00389 INT32 node,
00390 int position
00391 );
00392
00396 INT32 MnetworkNodeGetClosest (
00397 MNETWORKHANDLE handle,
00398 DPOINT2D *point,
00399 DOUBLE radius
00400 );
00401
00405 int MnetworkBarrierIsUpdated (
00406 MNETWORKHANDLE handle
00407 );
00408
00410 int MnetworkTurnSetImpedance (
00411 MNETWORKHANDLE handle,
00412 INT32 node,
00413 int in,
00414 int out,
00415 DOUBLE impedance
00416 );
00417
00419 int MnetworkTurnGetImpedance (
00420 MNETWORKHANDLE handle,
00421 INT32 node,
00422 int in,
00423 int out,
00424 DOUBLE *impedance
00425 );
00426
00428 int MnetworkTurnGetAngle (
00429 MNETWORKHANDLE handle,
00430 INT32 node,
00431 int in,
00432 int out,
00433 DOUBLE *angle
00434 );
00435
00439 int MnetworkTurnIsUpdated (
00440 MNETWORKHANDLE handle
00441 );
00442
00444 int MnetworkAngleApply (
00445 MNETWORKHANDLE handle
00446 );
00447
00451 int MnetworkAngleIsUpdated (
00452 MNETWORKHANDLE handle
00453 );
00454
00456 int MnetworkAngleSetImpedance (
00457 MNETWORKHANDLE handle,
00458 int angle,
00459 DOUBLE impedance
00460 );
00461
00463 int MnetworkAngleGetImpedance (
00464 MNETWORKHANDLE handle,
00465 int angle,
00466 DOUBLE *impedance
00467 );
00468
00469
00470
00472 int MnetworkStopCalculateRoute (
00473 MNETWORKSTOPHANDLE stopHandle,
00474 MNETWORKROUTEHANDLE *routeHandle
00475 );
00476
00478 int MnetworkStopClone (
00479 MNETWORKSTOPHANDLE stopHandle,
00480 MNETWORKSTOPHANDLE *cloneStopHandle
00481 );
00482
00484 int MnetworkStopFree (
00485 MNETWORKSTOPHANDLE *stopHandle
00486 );
00487
00491 int MnetworkStopIsUpdated (
00492 MNETWORKSTOPHANDLE stopHandle
00493 );
00494
00498 int MnetworkStopIsTable (
00499 MNETWORKSTOPHANDLE stopHandle,
00500 const RVC::OBJECTNAME& tablename
00501 );
00502
00504 int MnetworkStopGetTableNames (
00505 MNETWORKSTOPHANDLE stopHandle,
00506 RVC::OBJECTNAME **tablename,
00507 INT32 *tablecount
00508 );
00509
00511 int MnetworkStopOpenTable (
00512 MNETWORKSTOPHANDLE stopHandle,
00513 const RVC::OBJECTNAME& tablename
00514 );
00515
00517 int MnetworkStopSaveTable (
00518 MNETWORKSTOPHANDLE stopHandle,
00519 RVC::OBJECTNAME& tablename
00520 );
00521
00523 int MnetworkStopAdd (
00524 MNETWORKSTOPHANDLE stopHandle,
00525 INT32 node,
00526 int position
00527 );
00528
00530 int MnetworkStopDelete (
00531 MNETWORKSTOPHANDLE stopHandle,
00532 int *positions,
00533 int numPositions
00534 );
00535
00537 int MnetworkStopDeleteAll (
00538 MNETWORKSTOPHANDLE stopHandle
00539 );
00540
00542 int MnetworkStopMove (
00543 MNETWORKSTOPHANDLE stopHandle,
00544 int oldPosition,
00545 int newPosition
00546 );
00547
00551 INT32 MnetworkStopGet (
00552 MNETWORKSTOPHANDLE stopHandle,
00553 int position
00554 );
00555
00557 int MnetworkStopGetNumber (
00558 MNETWORKSTOPHANDLE stopHandle
00559 );
00560
00562 int MnetworkStopGetAll (
00563 MNETWORKSTOPHANDLE stopHandle,
00564 INT32 **nodes,
00565 INT32 *numNodes
00566 );
00567
00569 int MnetworkStopSetDemand (
00570 MNETWORKSTOPHANDLE stopHandle,
00571 int position,
00572 DOUBLE demand
00573 );
00574
00576 int MnetworkStopGetDemand (
00577 MNETWORKSTOPHANDLE stopHandle,
00578 int position,
00579 DOUBLE *demand
00580 );
00581
00582
00583
00584
00586 int MnetworkCalculateMultiRoute (
00587 MNETWORKHANDLE handle,
00588 INT32 source,
00589 INT32 *destinations,
00590 INT32 numDestinations,
00591 MNETWORKROUTEHANDLE *multiRouteHandle
00592 );
00593
00594 int MnetworkMultiRouteGetRoute (
00595 MNETWORKMULTIROUTEHANDLE multiRouteHandle,
00596 INT32 destination,
00597 MNETWORKROUTEHANDLE *routeHandle
00598 );
00599
00601 int MnetworkMultiRouteFree (
00602 MNETWORKMULTIROUTEHANDLE *multiRouteHandle
00603 );
00604
00605
00606
00608 int MnetworkRouteRestoreStop (
00609 MNETWORKROUTEHANDLE routeHandle,
00610 MNETWORKSTOPHANDLE *stopHandle
00611 );
00612
00614 int MnetworkRouteFree (
00615 MNETWORKROUTEHANDLE *routeHandle
00616 );
00617
00621 INT32 MnetworkRouteGetNumberOfNodes (
00622 MNETWORKROUTEHANDLE routeHandle
00623 );
00624
00628 INT32 MnetworkRouteGetNode (
00629 MNETWORKROUTEHANDLE routeHandle,
00630 int position
00631 );
00632
00636 INT32 MnetworkRouteGetNumberOfLines (
00637 MNETWORKROUTEHANDLE routeHandle
00638 );
00639
00643 INT32 MnetworkRouteGetLine (
00644 MNETWORKROUTEHANDLE routeHandle,
00645 int position
00646 );
00647
00651 int MnetworkRouteIsNodeStop (
00652 MNETWORKROUTEHANDLE routeHandle,
00653 int position
00654 );
00655
00659 int MnetworkRouteIsNodeTurn (
00660 MNETWORKROUTEHANDLE routeHandle,
00661 int position
00662 );
00663
00671 int MnetworkRouteGetLineDirection (
00672 MNETWORKROUTEHANDLE routeHandle,
00673 int position
00674 );
00675
00677 int MnetworkRouteGetResultAsNodes (
00678 MNETWORKROUTEHANDLE routeHandle,
00679 INT32 **nodes,
00680 INT32 *numNodes
00681 );
00682
00684 int MnetworkRouteGetResultAsLines (
00685 MNETWORKROUTEHANDLE routeHandle,
00686 INT32 **lines,
00687 INT32 *numLines
00688 );
00689
00691 int MnetworkRouteGetResultAsPoints (
00692 MNETWORKROUTEHANDLE routeHandle,
00693 DPOINT2D **points,
00694 INT32 *numPoints
00695 );
00696
00698 int MnetworkRouteGetReport (
00699 MNETWORKROUTEHANDLE routeHandle,
00700 MIUNICODE **report
00701 );
00702
00703
00704
00710 int MnetworkCenterCalculateAllocation (
00711 MNETWORKCENTERHANDLE centerHandle,
00712 int type,
00713 MNETWORKALLOCATIONHANDLE *allocationHandle
00714 );
00715
00717 int MnetworkCenterClone (
00718 MNETWORKCENTERHANDLE centerHandle,
00719 MNETWORKCENTERHANDLE *cloneCenterHandle
00720 );
00721
00723 int MnetworkCenterFree (
00724 MNETWORKCENTERHANDLE *centerHandle
00725 );
00726
00730 int MnetworkCenterIsUpdated (
00731 MNETWORKCENTERHANDLE centerHandle
00732 );
00733
00737 int MnetworkCenterIsTable (
00738 MNETWORKCENTERHANDLE centerHandle,
00739 const RVC::OBJECTNAME& tablename
00740 );
00741
00743 int MnetworkCenterGetTableNames (
00744 MNETWORKCENTERHANDLE centerHandle,
00745 RVC::OBJECTNAME **tablename,
00746 INT32 *tablecount
00747 );
00748
00750 int MnetworkCenterOpenTable (
00751 MNETWORKCENTERHANDLE centerHandle,
00752 const RVC::OBJECTNAME& tablename
00753 );
00754
00756 int MnetworkCenterSaveTable (
00757 MNETWORKCENTERHANDLE centerHandle,
00758 RVC::OBJECTNAME& tablename
00759 );
00760
00762 int MnetworkCenterAdd (
00763 MNETWORKCENTERHANDLE centerHandle,
00764 INT32 node
00765 );
00766
00768 int MnetworkCenterDelete (
00769 MNETWORKCENTERHANDLE centerHandle,
00770 int *positions,
00771 int numPositions
00772 );
00773
00775 int MnetworkCenterDeleteAll (
00776 MNETWORKCENTERHANDLE centerHandle
00777 );
00778
00782 INT32 MnetworkCenterGet (
00783 MNETWORKCENTERHANDLE centerHandle,
00784 int position
00785 );
00786
00790 int MnetworkCenterGetPosition (
00791 MNETWORKCENTERHANDLE centerHandle,
00792 INT32 node
00793 );
00794
00798 int MnetworkCenterGetNumber (
00799 MNETWORKCENTERHANDLE centerHandle
00800 );
00801
00803 int MnetworkCenterGetAll (
00804 MNETWORKCENTERHANDLE centerHandle,
00805 INT32 **nodes,
00806 INT32 *numNodes
00807 );
00808
00810 int MnetworkCenterSetCapacity (
00811 MNETWORKCENTERHANDLE centerHandle,
00812 int position,
00813 DOUBLE capacity
00814 );
00815
00817 int MnetworkCenterGetCapacity (
00818 MNETWORKCENTERHANDLE centerHandle,
00819 int position,
00820 DOUBLE *capacity
00821 );
00822
00824 int MnetworkCenterSetImpedanceLimit (
00825 MNETWORKCENTERHANDLE centerHandle,
00826 int position,
00827 DOUBLE limit
00828 );
00829
00831 int MnetworkCenterGetImpedanceLimit (
00832 MNETWORKCENTERHANDLE centerHandle,
00833 int position,
00834 DOUBLE *limit
00835 );
00836
00838 int MnetworkCenterSetImpedanceDelay (
00839 MNETWORKCENTERHANDLE centerHandle,
00840 int position,
00841 DOUBLE delay
00842 );
00843
00845 int MnetworkCenterGetImpedanceDelay (
00846 MNETWORKCENTERHANDLE centerHandle,
00847 int position,
00848 DOUBLE *delay
00849 );
00850
00852 int MnetworkCenterSetColor (
00853 MNETWORKCENTERHANDLE centerHandle,
00854 int position,
00855 COLOR *color
00856 );
00857
00859 int MnetworkCenterGetColor (
00860 MNETWORKCENTERHANDLE centerHandle,
00861 int position,
00862 COLOR *color
00863 );
00864
00865
00866
00868 int MnetworkAllocationRestoreCenter (
00869 MNETWORKALLOCATIONHANDLE allocationHandle,
00870 MNETWORKCENTERHANDLE *centerHandle
00871 );
00872
00874 int MnetworkAllocationFree (
00875 MNETWORKALLOCATIONHANDLE *allocationHandle
00876 );
00877
00879 int MnetworkAllocationGetResultAsPositions (
00880 MNETWORKALLOCATIONHANDLE allocationHandle,
00881 INT32 **positions,
00882 INT32 *numPositions
00883 );
00884
00892 int MnetworkAllocationGetType (
00893 MNETWORKALLOCATIONHANDLE allocationHandle
00894 );
00895
00897 int MnetworkAllocationGetReport (
00898 MNETWORKALLOCATIONHANDLE allocationHandle,
00899 MIUNICODE **report
00900 );
00901
00905 INT32 MnetworkAllocatedCenterGet (
00906 MNETWORKALLOCATIONHANDLE allocationHandle,
00907 int position
00908 );
00909
00913 INT32 MnetworkAllocatedCenterGetNumber (
00914 MNETWORKALLOCATIONHANDLE allocationHandle
00915 );
00916
00920 int MnetworkAllocatedCenterGetPosition (
00921 MNETWORKALLOCATIONHANDLE allocationHandle,
00922 INT32 node
00923 );
00924
00926 int MnetworkAllocatedCenterGetColor (
00927 MNETWORKALLOCATIONHANDLE allocationHandle,
00928 int position,
00929 COLOR *color
00930 );
00931
00935 INT32 MnetworkAllocatedCenterGetNumberOfLines (
00936 MNETWORKALLOCATIONHANDLE allocationHandle,
00937 int position
00938 );
00939
00941 int MnetworkAllocatedCenterGetCapacity (
00942 MNETWORKALLOCATIONHANDLE allocationHandle,
00943 int position,
00944 DOUBLE *capacity
00945 );
00946
00948 int MnetworkAllocatedCenterGetDemand (
00949 MNETWORKALLOCATIONHANDLE allocationHandle,
00950 int position,
00951 DOUBLE *demand
00952 );
00953
00955 int MnetworkAllocatedCenterGetImpedanceLimit (
00956 MNETWORKALLOCATIONHANDLE allocationHandle,
00957 int position,
00958 DOUBLE *limit
00959 );
00960
00962 int MnetworkAllocatedCenterGetImpedanceDelay (
00963 MNETWORKALLOCATIONHANDLE allocationHandle,
00964 int position,
00965 DOUBLE *delay
00966 );
00967
00969 int MnetworkAllocatedCenterGetMaximumImpedance (
00970 MNETWORKALLOCATIONHANDLE allocationHandle,
00971 int position,
00972 DOUBLE *maximum
00973 );
00974
00976 int MnetworkAllocatedCenterGetAverageImpedance (
00977 MNETWORKALLOCATIONHANDLE allocationHandle,
00978 int position,
00979 DOUBLE *average
00980 );
00981
00985 INT32 MnetworkAllocatedLineGetNumber (
00986 MNETWORKALLOCATIONHANDLE allocationHandle
00987 );
00988
00990 int MnetworkAllocatedLineGetPosition (
00991 MNETWORKALLOCATIONHANDLE allocationHandle,
00992 INT32 line
00993 );
00994
00996
00997 #if defined(__cplusplus)
00998 }
00999 #endif
01000
01001 #endif